Page 1 of 2

Emails are not being sent in 2011R2.0

Posted: Tue Feb 07, 2012 3:25 pm
by Mitchell
We were not getting emails when I was using 2011R1.9 . I upgraded to 2011R2.0 yesterday hoping it had the email fixes. I am still having trouble receiving notification emails. here is the event log from my NagiosXI installation. I have also attached the system profile.
2012-02-07 12:19:34Warning: Attempting to execute the command "/usr/bin/printf "%b" "***** Nagios Monitor XI Alert ***** Notification Type: PROBLEM Host: OPSPCPMSIS01 State: DOWN Address: OPSPCPMSIS01 Info: Connection refused Date/Time: Tue Feb 7 12:19:34 PST 2012 " | /bi
2012-02-07 12:19:34HOST NOTIFICATION: Ashish Jain;OPSPCPMSIS01;DOWN;notify-host-by-email;Connection refused

Re: Emails are not being sent in 2011R2.0

Posted: Tue Feb 07, 2012 3:58 pm
by scottwilkerson
Go to
Configure -> Core Config Manager -> Contact -> Modify (select contact not getting message)

In Host command* What is specified? Should be xi_host_notification_handler
and
Service command* What is specified? Should be xi_service_notification_handler

Also,
Time period hosts*/services* What is specified? Should be <USERNAME>_notification_times

Re: Emails are not being sent in 2011R2.0

Posted: Tue Feb 07, 2012 4:40 pm
by Mitchell
okay. I modified this contact now to use the 'xi_contact_generic' and also added the host and service commands as you indicated 'xi_host_notification_handler' & 'xi_service_notification_handler'

This contact is not a user so I did not see any speciifc time period so I used 24*7 for both host and service notifications.

I am still not getting the email.. Here is what I see in even logs now...
2012-02-07 13:35:03HOST NOTIFICATION: Ashish Jain;OPSPCPMSIS01;DOWN;xi_host_notification_handler;Connection refused
2012-02-07 13:31:03HOST NOTIFICATION: Ashish Jain;OPSPCPMSIS01;DOWN;xi_host_notification_handler;Connection refused

Re: Emails are not being sent in 2011R2.0

Posted: Tue Feb 07, 2012 5:11 pm
by scottwilkerson
What do you have in Admin -> Manage Email Settings

Re: Emails are not being sent in 2011R2.0

Posted: Tue Feb 07, 2012 5:17 pm
by Mitchell
SMTP Email server. I am able to send test email notification .

Re: Emails are not being sent in 2011R2.0

Posted: Tue Feb 07, 2012 5:46 pm
by scottwilkerson
Is it just this contact, or all contacts that are having this issue?

Re: Emails are not being sent in 2011R2.0

Posted: Tue Feb 07, 2012 6:11 pm
by Mitchell
I have only 2 contacts defined and both are not working.

Re: Emails are not being sent in 2011R2.0

Posted: Wed Feb 08, 2012 1:28 pm
by lmiltchev
Are these "users" or "contacts"? Other words, did you create them by going to:

1. Admin->Users->Manage Users->Add New User

or

2. Core Config Manager->Alerting->Contacts->Add New ?

In Nagios XI you should use the first method. If you don't want to make your contacts users, you can use the second method, but then you will have to use: "notify-host-by-email" and "notify-service-by-email" notification handlers. Contacts have many limitations - they can't modify their notification preferences, change e-mail, etc.

You can create of brake relationships between users and contacts. Please, read more on the topic here:

http://assets.nagios.com/downloads/nagi ... ntacts.pdf

Re: Emails are not being sent in 2011R2.0

Posted: Fri Feb 17, 2012 6:49 pm
by Mitchell
apologize for the delay in follow-up.

I am trying to create the contact (since this is a mailing list and not really user). when I use "notify-host-by-email" and "notify-service-by-email" notification handlers for the newly created contact, I get the following error.
2012-02-17 15:40:29Warning: Attempting to execute the command "/usr/bin/printf "%b" "***** Nagios Monitor XI Alert ***** Notification Type: PROBLEM Host: PNAGIOS01NTV State: DOWN Address: PNAGIOS02NTV Info: check_icmp: Failed to resolve PNAGIOS02NTV Date/Time: Fri Feb 17
2012-02-17 15:40:29HOST NOTIFICATION: TestMe;PNAGIOS01NTV;DOWN;notify-host-by-email;check_icmp: Failed to resolve PNAGIOS02NTV
2012-02-17 15:38:49Warning: Attempting to execute the command "/usr/bin/printf "%b" "***** Nagios Monitor XI Alert ***** Notification Type: PROBLEM Host: PNAGIOS01NTV State: DOWN Address: PNAGIOS02NTV Info: check_icmp: Failed to resolve PNAGIOS02NTV Date/Time: Fri Feb 17
2012-02-17 15:38:49HOST NOTIFICATION: TestMe;PNAGIOS01NTV;DOWN;notify-host-by-email;check_icmp: Failed to resolve PNAGIOS02NTV
if I create a user with a contact (which is by default configured with 'xi_host_notification_handler' & 'xi_service_notification_handler') works fine.

Re: Emails are not being sent in 2011R2.0

Posted: Mon Feb 20, 2012 11:34 am
by scottwilkerson
From the command prompt can I have you run the following command and report the results

Code: Select all

su nagios -c '/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n"'