Page 4 of 5
Re: Upgrade to 2012 1.7 stops all email notifications
Posted: Mon Apr 08, 2013 6:11 pm
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
Re: Upgrade to 2012 1.7 stops all email notifications
Posted: Tue Apr 09, 2013 4:28 am
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.
Re: Upgrade to 2012 1.7 stops all email notifications
Posted: Tue Apr 09, 2013 10:41 am
by abrist
Are your contact groups configured with the notify-*-by-email for "notification commands" or the xi_*_event_handlers?
Re: Upgrade to 2012 1.7 stops all email notifications
Posted: Tue Apr 09, 2013 1:20 pm
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.
Re: Upgrade to 2012 1.7 stops all email notifications
Posted: Tue Apr 09, 2013 1:33 pm
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.
Re: Upgrade to 2012 1.7 stops all email notifications
Posted: Tue Apr 09, 2013 1:33 pm
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.
Re: Upgrade to 2012 1.7 stops all email notifications
Posted: Tue Apr 09, 2013 1:35 pm
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.
Re: Upgrade to 2012 1.7 stops all email notifications
Posted: Tue Apr 09, 2013 1:39 pm
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
Re: Upgrade to 2012 1.7 stops all email notifications
Posted: Tue Apr 09, 2013 1:56 pm
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.
Re: Upgrade to 2012 1.7 stops all email notifications
Posted: Tue Apr 09, 2013 3:22 pm
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$"
}