Nagios Email Notification
I think what you trying to do is possible. Although I am new to this forum and I have also got a question similar to this, what you need to do is to first make sure you have definition in contact.cfg, contactgroups.cfg. This is tricky as you have to have entries in this format in timeperiods.cfg to look something like this::
alias jack mail Hours
This is the one I did of resent but I have edited my company details of the time period and the alias.
You can give the timeperiod_name anything you want and alias in a format similar to the time period name.
Your contactgroup.cfg settings should look like this:
alias jack mail
members jack-mail-monitoring (depending on what your group name is)
alias jack mail
email jack-mail-monitoring@whatever -youlike.com
Make sure there is aliases entries for jack-mail-monitoring
jack-mail-monitoring: jack.smith, yyy.peter (Depending on the format used in you mail system)
Now you can use a cron to sort out the rest, at best I would advice you set out the cron in /etc/nagios if your environment is using subversion then you would not miss out
your cron should look this formatin /etc/nagios/crontab/nagios
# crontab for nagios.
MAILTO= (group e-mail without brackets)
# check jack-email status & mail
0 8 * * * python /etc/nagios/plugins/jackmail.py | mail -s "comment like hello world" (followed by all emails seperated by space without brackets)
If you have a plugin to be check make entries for it otherwise you can omit it.
This works for me and I hope it works for you.