Nagios is not generating any email alerts
Hi,
I have CentOS 5 with nagios installed as instructed by nagios.org , i have an issue related to email alerts , i have added one linux host for testing ping server and getting alerts in the nagios.log file , but not receiving email for that even though sendmail is running fine in the system. Here is the details as below:- # tail -f /usr/local/nagios/var/nagios.log 1323592672] HOST ALERT: master;DOWN;SOFT;7;CRITICAL - Host Unreachable (192.168.202.137) [1323592695] Caught SIGTERM, shutting down... [1323592695] Successfully shutdown... (PID=4577) [1323592695] Nagios 3.2.3 starting... (PID=5208) [1323592695] Local time is Sun Dec 11 14:08:15 IST 2011 [1323592695] LOG VERSION: 2.0 [1323592695] Finished daemonizing... (New PID=5209) [1323592735] HOST ALERT: master;DOWN;SOFT;2;CRITICAL - Host Unreachable (192.168.202.137) [1323592805] HOST ALERT: master;DOWN;SOFT;3;CRITICAL - Host Unreachable (192.168.202.137) [1323592875] HOST ALERT: master;UP;SOFT;4;PING OK - Packet loss = 0%, RTA = 0.34 ms [1323592905] SERVICE ALERT: master;PING;OK;SOFT;4;PING OK - Packet loss = 0%, RTA = 0.56 ms root@monitorserver objects]# pwd /usr/local/nagios/etc/objects [root@monitorserver objects]# grep vijay contacts.cfg email vijay@localhost When i tested email for user vijay i got email like # mail -v vijay@localhost , but when my testing host ping up / down i did not receive any email alert, Please anyone help on this issue and let me know what else i have to check into nagios for this. Thanks in Advance. Vijay |
Hi mail4vijay,
The ping check test that you are doing need to contain this line: Code:
notification_options d,r r = Recovery If this is already the case Here is a lead to help you understand how Nagios works: (if you follow the Nagios quickstart guide for your installation) Schema: Code:
1) Pingcheck.cfg-| 2) In that file is where your template are defined. Here you MUST find the What_ever_template used in your check file. This is where I put my notification_options d,r, you must have as well the "contact_groups eMail-Admin" 3) In that file you MUST find the eMail-Admin group that you specify in your template.cfg file And here is an example of contact.cfg Code:
define contact{ (for instance: notify-service-by-email and notify-service-by-sms if you want SMS notification) command.cfg: Code:
define command{ if not please let me know. Best regards, Angel. |
Thanks for the reply , i will check and come to to LQ if i face any issue.
|
Thanks it is working now but i did some changes below in the default settings
vi contacts.cfg Quote:
Quote:
|
All times are GMT -5. The time now is 10:19 AM. |