Page 1 of 1

Notification Email - User vs Contact

Posted: Fri Mar 27, 2015 10:43 am
by brdr
Hi guys,

We have XI 2014R2.3...

In Admin->Manage Users-> we have 'nagiosadmin' user, with an address of my gmail account for testing purposes.
In CCM->Contacts we have 'nagiosadmin' contact, with an address of my corporate email account.

When notification event is triggered, and contact 'nagiosadmin' is configured to receive it, the notification goes to my gmail account. Is this by design?

Thx

Re: Notification Email - User vs Contact

Posted: Fri Mar 27, 2015 10:44 am
by BanditBBS
That contact probably has XINotificationHandlers assigned to it, which means it'll use the XI user's contact information and not the underlying nagios Core information

Re: Notification Email - User vs Contact

Posted: Fri Mar 27, 2015 10:57 am
by brdr
Ok...

We use xi_host_notification_handler & xi_service_notification for all contacts. In this particular problem it was a service.

xi_service_definition_handler command line is:

Code: Select all

/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=service [color=#FF4000]--contact="$CONTACTNAME$" --contactemail="$CONTACTEMAIL$"[/color] --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$" --hostgroupname="$HOSTGROUPNAME$"
Are you recommending we only use User's (Admin->Manage Users) email address and not enter email address in the Contact form within CCM?

Re: Notification Email - User vs Contact

Posted: Fri Mar 27, 2015 11:08 am
by BanditBBS
brdr wrote:Are you recommending we only use User's (Admin->Manage Users) email address and not enter email address in the Contact form within CCM?
If they are a NagiosXI user and they have those handlers you stated, then it will always use the user's notification options on their NagiosXI account.

You can create contacts in the CCM that are not XI users and they would then follow whats in the contact definition as they would not be using the XI handlers.

Edit - I have about 150 XI users in my system and maybe 1 or 2 contacts. I prefer using all XI users so they can control their notification settings themselves.

Re: Notification Email - User vs Contact

Posted: Fri Mar 27, 2015 11:23 am
by brdr
ok. i was just racking my brain as to why i wasn't getting my notification email as nagiosadmin until i looked at my gmail account :o I knew they were being sent. At this point most users are contacts, and understanding the handlers a little better, i won't need to enter contact email if they are user.

Thx. safe to close.