Upgrade to 2012 1.7 stops all email notifications

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
uidaho
Posts: 89
Joined: Tue Feb 12, 2013 11:58 am

Re: Upgrade to 2012 1.7 stops all email notifications

Post by uidaho »

Could it be that the administrator email address is no longer being re-written by XI?

Our mail servers will drop mail from root@localhost. We've set the from address in Nagios XI as [email protected] (Admin -> System Config -> Manage System Settings"). However, the maillogs are reporting the from address as [email protected]

From our maillog:

Apr 8 15:58:35 nagios01 postfix/qmgr[7902]: 661E7600DE: removed
Apr 8 16:01:44 nagios01 postfix/pickup[7901]: A0017600F9: uid=500 from=<root@localhost>
Apr 8 16:01:44 nagios01 postfix/cleanup[9308]: A0017600F9: message-id=<[email protected]>
Apr 8 16:01:44 nagios01 postfix/qmgr[7902]: A0017600F9: from=<[email protected]>, size=1930, nrcpt=1 (queue active)
Apr 8 16:01:44 nagios01 postfix/smtp[9310]: A0017600F9: to=<[email protected]>, relay=smtpanon.uidaho.edu[129.101.177.56]:25, delay=0.09, delays=0.03/0/0/0.05, dsn=2.6.0, status=sent (250 2.6.0 <[email protected]> Queued mail for delivery)
Apr 8 16:01:44 nagios01 postfix/qmgr[7902]: A0017600F9: removed
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Re: Upgrade to 2012 1.7 stops all email notifications

Post by aap »

Hi,

I received an alert this morning for a service that was configured to only alert myself. We are still not receiving alert notifications sent out to specific contact groups.

It seems there was a change to how the contact groups work and how Nagios sends emails to them.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Upgrade to 2012 1.7 stops all email notifications

Post by abrist »

Are your contact groups configured with the notify-*-by-email for "notification commands" or the xi_*_event_handlers?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Re: Upgrade to 2012 1.7 stops all email notifications

Post by aap »

Hi,

Please can you specify where exactly I will locate this. I'm a little confused as to what you are asking. All the contact groups are based on the xi_contact_generic which has the host command xi_host_notification_handler assigned.

I hope this helps.

Thanks.
Last edited by aap on Tue Apr 09, 2013 1:33 pm, edited 1 time in total.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Upgrade to 2012 1.7 stops all email notifications

Post by slansing »

You can see this via CCM > Contacts > Edit one of your contacts that you are using > Click Alert Settings > And open Manage Host Notification Commands, and Service Notification Commands. Let us know what handler command you have set within each.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Upgrade to 2012 1.7 stops all email notifications

Post by abrist »

I guess a bit of clarity is in order. The contacts that are members of the contact groups that are not receiving emails - what notification commands are set on them? Click on one of the contacts in the ccm and then click on the alert settings tab. Check the settings for both "manage * notification commands" buttons. These should be set to their respective "xi_*_notification_handler".

Also, check your contact templates for correct alert settings.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Re: Upgrade to 2012 1.7 stops all email notifications

Post by aap »

Thanks I thought so but was not sure that was what you were looking for.

All the contact groups we have are based on the xi_contact_generic template which has the host command xi_host_notification_handler assigned.
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Re: Upgrade to 2012 1.7 stops all email notifications

Post by aap »

Sorry for the confusion here..

The contact groups that are not receiving emails do not have anything assigned in the host notification commands. The feild is blank.

However, they are all based on a template which has xi_host_notification_handler assigned.

Is that a bit clearer ? Apologies
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Upgrade to 2012 1.7 stops all email notifications

Post by abrist »

Lets look at that old backup. It should be a rather large tarball. You should find a configuration snapshot tarball rolled up in the backup tarball. In the snapshot tarball you are looking for commands.cfg. We are specifically interested in the "xi_*_notification_handler" commands. Post those commands here.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
aap
Posts: 180
Joined: Wed Oct 12, 2011 4:01 am

Re: Upgrade to 2012 1.7 stops all email notifications

Post by aap »

Code: Select all

define command {
       command_name                  		xi_host_event_handler
       command_line                  		/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_event.php --handler-type=host --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --lasthoststate=$LASTHOSTSTATE$ --lasthoststateid=$LASTHOSTSTATEID$ --hoststatetype=$HOSTSTATETYPE$ --currentattempt=$HOSTATTEMPT$ --maxattempts=$MAXHOSTATTEMPTS$ --hosteventid=$HOSTEVENTID$ --hostproblemid=$HOSTPROBLEMID$ --hostoutput="$HOSTOUTPUT$" --longhostoutput="$LONGHOSTOUTPUT$"
}	

define command {
       command_name                  		xi_host_notification_handler
       command_line                  		/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=host --contact="$CONTACTNAME$" --contactemail="$CONTACTEMAIL$" --type=$NOTIFICATIONTYPE$ --escalated="$NOTIFICATIONISESCALATED$" --author="$NOTIFICATIONAUTHOR$" --comments="$NOTIFICATIONCOMMENT$" --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hostalias="$HOSTALIAS$" --hostdisplayname="$HOSTDISPLAYNAME$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --lasthoststate=$LASTHOSTSTATE$ --lasthoststateid=$LASTHOSTSTATEID$ --hoststatetype=$HOSTSTATETYPE$ --currentattempt=$HOSTATTEMPT$ --maxattempts=$MAXHOSTATTEMPTS$ --hosteventid=$HOSTEVENTID$ --hostproblemid=$HOSTPROBLEMID$ --hostoutput="$HOSTOUTPUT$" --longhostoutput="$LONGHOSTOUTPUT$" --datetime="$LONGDATETIME$"
}	

define command {
       command_name                  		xi_service_event_handler
       command_line                  		/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_event.php --handler-type=service --host="$HOSTNAME$" --service="$SERVICEDESC$" --hostaddress="$HOSTADDRESS$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --hosteventid=$HOSTEVENTID$ --hostproblemid=$HOSTPROBLEMID$ --servicestate=$SERVICESTATE$ --servicestateid=$SERVICESTATEID$ --lastservicestate=$LASTSERVICESTATE$ --lastservicestateid=$LASTSERVICESTATEID$ --servicestatetype=$SERVICESTATETYPE$ --currentattempt=$SERVICEATTEMPT$ --maxattempts=$MAXSERVICEATTEMPTS$ --serviceeventid=$SERVICEEVENTID$ --serviceproblemid=$SERVICEPROBLEMID$ --serviceoutput="$SERVICEOUTPUT$" --longserviceoutput="$LONGSERVICEOUTPUT$"
}	

define command {
       command_name                  		xi_service_notification_handler
       command_line                  		/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=service --contact="$CONTACTNAME$" --contactemail="$CONTACTEMAIL$" --type=$NOTIFICATIONTYPE$ --escalated="$NOTIFICATIONISESCALATED$" --author="$NOTIFICATIONAUTHOR$" --comments="$NOTIFICATIONCOMMENT$" --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hostalias="$HOSTALIAS$" --hostdisplayname="$HOSTDISPLAYNAME$" --service="$SERVICEDESC$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --servicestate=$SERVICESTATE$ --servicestateid=$SERVICESTATEID$ --lastservicestate=$LASTSERVICESTATE$ --lastservicestateid=$LASTSERVICESTATEID$ --servicestatetype=$SERVICESTATETYPE$ --currentattempt=$SERVICEATTEMPT$ --maxattempts=$MAXSERVICEATTEMPTS$ --serviceeventid=$SERVICEEVENTID$ --serviceproblemid=$SERVICEPROBLEMID$ --serviceoutput="$SERVICEOUTPUT$" --longserviceoutput="$LONGSERVICEOUTPUT$" --datetime="$LONGDATETIME$"
}	
Locked