Notification Email - User vs Contact

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Notification Email - User vs Contact

Post 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
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Notification Email - User vs Contact

Post 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
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: Notification Email - User vs Contact

Post 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?
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Notification Email - User vs Contact

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: Notification Email - User vs Contact

Post 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.
Locked