Archive > 20.1 Legacy Series

Monit examples

(1/2) > >>


I'd like to start using Monit but I'm really struggling to find good examples and walkthroughs to explain in detail how the components plug together. Granted, there is the FTP server restart example here: but that only addresses restarting a failed service on OPNSense.

My initial requirement was that I wanted to monitor if a VPN had gone down and alert me via email if it had. I managed to find an official script that seems to do the job here: which I guessed I had to set up as a Custom Service Setting pointing to that script within OPNSense with a Test Setting of "ChangedStatus" (no idea if that's right as there is no guidance anywhere). Having done that, I now see it in the Monit Status page stating that the status is "OK". I'm not sure what exactly is "OK" as I've not asked it to monitor any gateway yet as far as I can tell.

The Service Test Settings for "ChangedStatus" are already configured to "Alert" so I assumed it would then pass it to the Alert stage and fire off an alert to the email address I have configured in my one and only alert (and yes, I have configured my email relay agent in the General tab and also set it up and tested it with Sensei so I know it's working).

Within the Alert config I have a drop down box of Events. I have no idea where these are pulled from. For example, there is an option in the Events drop-down for "Connection Failed" which its name would suggest is what I need but ultimately, I'm just blindly clicking on options hoping I'll get lucky (*I didn't get lucky...).

I'm sure those of you that have experience with Monit outside of OPNSense and have been tinkering for a while might think these questions are a bit amateur but coming into it blind, it is really not clear which options are supposed to tied to which component.



Awesome, thanks.

Spoke too soon. While the Service Tests Setting will apply, trying to apply the given "Service Settings" prevents me form applying the config. No error, no warning, just won't apply.

Screenshots please


[0] Message Index

[#] Next page

Go to full version