Help with notification emails

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Help with notification emails

Post by jbennett »

I am trying to correct a link in our notification emails and I simply cannot find where it is referenced.

The host is using a notification that is set by a template. That notification is as follows:

Code: Select all

host-notify-by-email
/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
The email is as follows:

Code: Select all

***** Nagios XI Alert *****

Nagios has detected a problem with this host.

Notification Type: PROBLEM
Host: [HOSTNAME]
State: DOWN
Address: xx.xx.xx.xx
Info: CRITICAL - xx.xx.xx.xx: rta nan, lost 100%
Date/Time: 2012-08-01 19:24:41

Respond: http://xx.xx.xx.xx/nagiosxi//rr.php?uid=11-10849-d310e95ff0f905091d1579b4cfa90ba4
Nagios URL: http://xx.xx.xx.xx/nagiosxi/
I don't see anywhere that the link is being referenced in the command for the notification.

Also, I notice that the first line of the email does not match what the beginning of the notification states.

Is there somewhere else that I should be looking to edit this?

Thank you in advance for any assistance.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Help with notification emails

Post by lmiltchev »

Users and contacts in XI are similar but not the same and they use different notification handlers.

Users use: xi_host_notification_handler & xi_service_notification_handler (the default)
Contacts use: notify-host-by-email & notify-service-by-email

Please, read this document for more info.

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Help with notification emails

Post by jbennett »

Unfortunately, that doesn't help. Those templates don't resemble the email format at all.

I'm thinking that the previous admin might have edited a macro or created a custom variable with this link. I have searched and searched and I simply cannot find where these are stored in the system so that I might just be able to take a look. Can you please tell me where they are located?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Help with notification emails

Post by mguthrie »

Notification messages like what you're displaying are actually probably coming from the xi_host/service_notification_handler command, and those use the template that is specific to each XI user. If you access the Configure->My Account Settings->Notification Messages page, you'll see the template that is specific to your user.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Help with notification emails

Post by jbennett »

Thank you, however, I'm still needing to know where to edit the macros since this template is calling a macro that is referencing an old address for our nagios box.

%responseurl%
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Help with notification emails

Post by nscott »

I believe you can edit that by, in your NagiosXI web interface:

> Login
> Admin Tab in the Top
> Manage System Config in the left side bar

And editing the Program URL or External URL, whichever you need to edit
Nicholas Scott
Former Nagios employee
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Help with notification emails

Post by jbennett »

Thank you! I was looking in all of the wrong places.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Help with notification emails

Post by nscott »

Glad we could get that resolved!
Nicholas Scott
Former Nagios employee
Locked