Monit plugin GUI inconsistencies

Started by elektroinside, February 12, 2018, 10:04:04 AM

Previous topic - Next topic
February 12, 2018, 10:04:04 AM Last Edit: February 12, 2018, 11:19:12 AM by elektroinside
Monit itself is a great plugin, but the OPNsense implementation has some inconsistencies IMO.
Let's start with this: if it cannot notify the user, the plugin is almost useless (I'm sorry if it sounds harsh).

1. The alerting (general settings) page has features specific to a general email client (like "Secure Connection"), but it cannot take hostnames, making it unusable with most public email servers.
2. There is no easy way to select the OPNsense notification system. Once you have edited the Monit server settings (with plugin-validated settings - but inexistent email servers -> because of a misspelling for example), and you want to get back to the OPNsense notification system, according to https://forum.opnsense.org/index.php?topic=7103.msg32293#msg32293, you have to uninstall the plugin, export the entire OPNsense backup, edit the xml and delete the monit section, then import the backup. Just not practical and also dangerous.
3. It is unclear what "Secure connection" mean" (SSL, TLS, StartTLS)
4. The "Apply" button sometimes never stops spinning (or it spins for a long time), I need to go to some other settings and go back to the Monit plugin. Might be some performance or cosmetic issues with it, because the settings are applied (so it works) :)

I now got to the point where I cannot be notified if an alert matches my settings, unless i use my own public email server and add it as IP (also had to modify some encryption settings). The OPNsense notifications are working fine, receiving emails. I'm constantly (according to the poll interval) getting errors (again, without my public email server):

Mail: Delivery failed -- no mail server is available

Thank you.
OPNsense v18 | HW: Gigabyte Z370N-WIFI, i3-8100, 8GB RAM, 60GB SSD, | Controllers: 82575GB-quad, 82574, I221, I219-V | PPPoE: RDS Romania | Down: 980Mbit/s | Up: 500Mbit/s

Team Rebellion Member

Setting up monit email was a challenge. Best to use a local email server.
I have monit working, but I have an email server inside the OPNsense network and I just go to there.
Also had issues with the Secure Connection, so I don't use it. But it doesn't need one since the port I use is not accessible externally.

I did look at the SMTP log and it accepted a STARTTLS from monit. Couldn't get SSL to work though.

Quote from: elektroinside on February 12, 2018, 10:04:04 AM
Monit itself is a great plugin, but the OPNsense implementation has some inconsistencies IMO.
Let's start with this: if it cannot notify the user, the plugin is almost useless (I'm sorry if it sounds harsh).
Monit is a monitoring software and the os-monit plugin is a UI to the Monit configuration.
I've tried to implement the most options 1:1. So you'll find the same options as from the Monit documentation but not all in the UI.

Quote from: elektroinside on February 12, 2018, 10:04:04 AM
1. The alerting (general settings) page has features specific to a general email client (like "Secure Connection"), but it cannot take hostnames, making it unusable with most public email servers.
As you know it's already in progress.

Quote from: elektroinside on February 12, 2018, 10:04:04 AM
2. There is no easy way to select the OPNsense notification system. Once you have edited the Monit server settings (with plugin-validated settings - but inexistent email servers -> because of a misspelling for example), and you want to get back to the OPNsense notification system, according to https://forum.opnsense.org/index.php?topic=7103.msg32293#msg32293, you have to uninstall the plugin, export the entire OPNsense backup, edit the xml and delete the monit section, then import the backup. Just not practical and also dangerous.
The OPNsense notification system has nothing to do with the os-monit plugin.
OK, it's confusing from the users view but it's planned to integrate the plugin in core and replace the old notification system.
Would a "Reset to Defaults" Button help?


A "Reset to Defaults" Button is always a good addition.

I find that netdata with grafana does everything that I need.

The only caveat is that I have Grafana running on a different server for all my alerting and visualization since I already run a plex server, it runs there.

I foward all my netdata to there for alerting and such.

Yep, I know, just wanted to point out some stuff I discovered :)

Quote from: faunsen on February 12, 2018, 04:47:54 PM
OK, it's confusing from the users view but it's planned to integrate the plugin in core and replace the old notification system.
Would a "Reset to Defaults" Button help?

Definitely yes :)

Many thanks!
OPNsense v18 | HW: Gigabyte Z370N-WIFI, i3-8100, 8GB RAM, 60GB SSD, | Controllers: 82575GB-quad, 82574, I221, I219-V | PPPoE: RDS Romania | Down: 980Mbit/s | Up: 500Mbit/s

Team Rebellion Member

Unfortunately a complete reset is not possible.
But I've integrated a 'Import System Notification' button.
Actually, that's what you wanted, right?.
To reset Services and Tests simply remove them and afterwards reinstall the plugin.

https://github.com/opnsense/plugins/pull/563