Page 1 of 1

Weirdness going from Core to XI with notifications

Posted: Mon Dec 01, 2014 1:41 pm
Our Nagios Core instance somehow just vanished. Rather than rebuild it I had our XI version about 90% done aside from notifications. I set up the notifications and they appear to be firing right, however it appears as if they're the old 'Core' style notifications. Including the old URL. We imported all our Core configs into this instance several months back so I'm guessing that's where it's getting the notification from. Something seems to be over riding the UI. Not sure where.........

This is what everything looks like.
Image

Also no matter what I change I can never get this to stay not grayed out. I'll make the change, update settings, then come back and it's changed back.
Image

I've found 2 places that seem to manage notifications and they are both the same.
Image


We're running on CentOS 6.5
Nagios version: Nagios XI 2014R1.0

Re: Weirdness going from Core to XI with notifications

Posted: Mon Dec 01, 2014 2:02 pm
by lmiltchev
Users and contacts are similar but not the same. Users can modify their notification options but contacts cannot. Did you create corresponding "xi users" for your "contact only" contacts? Please, review our documentation on configuring email and text notifications here:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf

Also, see this:

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

Hope this helps.

Re: Weirdness going from Core to XI with notifications

Posted: Mon Dec 01, 2014 7:15 pm
by Box293
Can you please post the file:

Code: Select all

/usr/local/nagios/etc/commands.cfg

Re: Weirdness going from Core to XI with notifications

Posted: Tue Dec 02, 2014 8:28 am
lmiltchev wrote:Users and contacts are similar but not the same. Users can modify their notification options but contacts cannot. Did you create corresponding "xi users" for your "contact only" contacts? Please, review our documentation on configuring email and text notifications here:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf

Also, see this:

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

Hope this helps.
Yup all that is set up right. That's not the issue. Notifications are going to the correct mailer, they just appear like the old Nagios Core style not the new XI style and information.

Code: Select all

***** Nagios *****

Notification Type:	PROBLEM
Host:			ias-monitor
State:			DOWN
Address:		xxx.xx.xxx.xx
Info:			CRITICAL - Host Unreachable ()
Date/Time:		Mon Dec 1 19:39:40 EST 2014




https://ias-monitor.cisco.com/nagios/cgi-bin/extinfo.cgi?type=1&host=ias-monitor

https://ias-monitor.cisco.com/nagios
that's our old URL, old style, etc. It should have the ***** Nagios XI ******, etc.

Re: Weirdness going from Core to XI with notifications

Posted: Tue Dec 02, 2014 8:43 am
Box293 wrote:Can you please post the file:

Code: Select all

/usr/local/nagios/etc/commands.cfg

BINGO! Found out where it is in that file.

Code: Select all

define command {
       command_name                             notify-host-by-email
       command_line                             /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -r [email protected] -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$ -- -f [email protected]
}

define command {
       command_name                             notify-service-by-email
       command_line                             /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -r [email protected] -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}

define command {
       command_name                             pki-host-notify-by-email
       command_line                             /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type:\t$NOTIFICATIONTYPE$\nHost:\t\t\t$HOSTNAME$\nState:\t\t\t$HOSTSTATE$\nAddress:\t\t$HOSTADDRESS$\nInfo:\t\t\t$HOSTOUTPUT$\nDate/Time:\t\t$LONGDATETIME$\n\n\n\n\nhttps://ias-monitor.cisco.com/nagios/cgi-bin/extinfo.cgi?type=1&host=$HOSTALIAS$\n\nhttps://ias-monitor.cisco.com/nagios" | /bin/mail -r [email protected] -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}

define command {
       command_name                             pki-notify-by-email
       command_line                             /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type:\t$NOTIFICATIONTYPE$\nService:\t\t$SERVICEDESC$\nHost:\t\t\t$HOSTALIAS$\nAddress:\t\t$HOSTADDRESS$\nState:\t\t\t$SERVICESTATE$\nDate/Time:\t\t$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n\nhttps://ias-monitor.cisco.com/nagios/cgi-bin/extinfo.cgi?type=1&host=$HOSTALIAS$\n\nhttps://ias-monitor.cisco.com/nagios" | /bin/mail -r [email protected] -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}


The file says not to edit it by hand. So where do I find out to edit it in the UI? I'm going to venture to guess I'll need to use the Legacy CCM, no?

Re: Weirdness going from Core to XI with notifications

Posted: Tue Dec 02, 2014 10:12 am
by slansing
The notify host and service by email commands can be found under Configure > CCM > Commands.

Re: Weirdness going from Core to XI with notifications

Posted: Tue Dec 02, 2014 11:27 am
slansing wrote:The notify host and service by email commands can be found under Configure > CCM > Commands.
GOT IT!!!!! Thanks so much!

Re: Weirdness going from Core to XI with notifications

Posted: Tue Dec 02, 2014 11:47 am
by slansing
No problem at all! Let us know if you need any further assistance on this.