I am using monit free edition to monitor server status, but in that the alerts works only when some triggering action done. However, I want to send a daily alert of all the details of server as monit shows.
1 Answers
What are you trying to do ? Some kind of "reporting" ?
Monit
is not able to do this. As you said, Monit
sends an alert when a service check is triggered. This is by design.
I would suggest to setup a daily cron job that will run a Bash
script of your own.
Your script could parse Monit
log file, retrieve events for the given day, organize informations for a more user-friendly reading and send the report.
However, if you don't want to use Cron
but still use Monit
, you could use the service poll time feature from Monit
.
The idea here, is to trigger a fake service check, once a day, that will also run a Bash
script of your own, to perform the same things as described above for the cron job.
The fake service definition could look like this :
check process fake with pidfile /var/run/fake.pid
start program = "/root/report.sh"
stop program = "/root/report.sh"
every "00 23 * * 0-6"
This will be triggered every day at 11 PM.
But, in my opinion, this solution is not the most suitable because :
- you will have "wrong" alerts in your Monit log file
- this could be triggered more than once if you have setup
Monit
deamon polling interval less than one minute (e.g. 30 seconds).

- 13,280
- 4
- 36
- 42
-
hi,thanks for the reply. I am really impressed by your answer. is there any other tool that you can you suggest me which suits to my requirement. able to send daily email alerts which consists all the status of the server and also able to alert based on some condition. thank you once again. – ɹɐqʞɐ zoɹǝɟ Mar 16 '14 at 14:26
-
@feroz akbar Sofware recommendations are off-topic here, however i would suggest `Nagios` and all related softwares like `Centreon` or `Icinga`. `Nagios` has tons of plugins for everything, including reportings http://exchange.nagios.org/directory/Addons/Reporting. Have a look by yourself by Googling these softwares and choose the best for you ! The fact is that these tools are a lot more improved and versatile than Monit – krisFR Mar 16 '14 at 14:38