Monit test email

Started by j_s, January 31, 2025, 06:20:47 PM

Previous topic - Next topic
Is there a way to have monit send a test email to make sure everything works properly?  I'm 99% sure monit isn't actually working for me, but I can't figure out how to tell monit to send a test email.

I even tried a service test by creating one with condition 'failed host 127.0.0.1 port 1234', but then after saving it and such, I went to my recipient under alert settings, but I can't even select my test condition.

I was hoping I could just go to the CLI and do something like "monit emailtest" and have an email get sent

Okay, so not as easy as doing something from the CLI, but this does work.

First, setup everything in General Settings and Alert Settings.  Under your recipient, make sure the event "Monit instance changed" is checked.  Save and click Apply.  Poof, you'll get an email because that alone will trigger monit to reload itself, and the instance changing will send you an email.

Of course, you can also trigger it anytime now if you keep the "Monit instance changed" setting enabled by simply reloading Monit.

As I'm new to using monit heavily, this took me a long time.  Way too long.