How to setup monit for email alerts.
Issue #864
closed
I have monit on my linux (ubuntu 16.04) system working fine.
how to setup monit for email alerts. (how to set mailserver).
if I want alerts on “myemail@gmail.com“ for the following process when cpu > 95%,
what extra things do I need to install?
Thanks in advance.
following is my monitrc file.
check process eat_cpu_x86 with pidfile /var/run/eat_cpu_x86.pid
start program = "/etc/init.d/eat_cpu_x86 start" with timeout 10 seconds
stop program = "/etc/init.d/eat_cpu_x86 stop"
if cpu > 95% for 2 cycles then alert
Comments (3)
-
-
- changed status to closed
-
reporter Thank you Martin .
It is working fine for me.
- Log in to comment
Hello Mayur,
you need to set the email recipient, example:
set alert myemail@gmail.com
You also need to set the SMTP server that'll be used to deliver alerts, example for Gmail: https://mmonit.com/wiki/Monit/Gmail
Best regards,
The M/Monit team