OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: elektroinside on February 12, 2018, 10:04:04 am

Title: Monit plugin GUI inconsistencies
Post by: 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).

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 (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.
Title: Re: Monit plugin GUI inconsistencies
Post by: dcol on February 12, 2018, 04:40:53 pm
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.
Title: Re: Monit plugin GUI inconsistencies
Post by: faunsen on February 12, 2018, 04:47:54 pm
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 (https://mmonit.com/monit/documentation/monit.html) but not all in the UI.

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.

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 (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?

Title: Re: Monit plugin GUI inconsistencies
Post by: dcol on February 12, 2018, 04:57:19 pm
A "Reset to Defaults" Button is always a good addition.
Title: Re: Monit plugin GUI inconsistencies
Post by: guest15389 on February 12, 2018, 05:05:22 pm
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.
Title: Re: Monit plugin GUI inconsistencies
Post by: elektroinside on February 12, 2018, 05:06:51 pm
Yep, I know, just wanted to point out some stuff I discovered :)

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!
Title: Re: Monit plugin GUI inconsistencies
Post by: faunsen on February 15, 2018, 01:06:27 pm
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