Notification Message question

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
povachon
Posts: 44
Joined: Thu Apr 10, 2014 9:24 am
Contact:

Notification Message question

Post by povachon »

Hi there
I would like to add the hostgroup membership of a host in the notification message.
Is there anyway to do so?
Regard
PO
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Notification Message question

Post by tmcdonald »

Absolutely! Have you looked at our macro list? $HOSTGROUPALIAS$ should be what you are looking for.
Former Nagios employee
povachon
Posts: 44
Joined: Thu Apr 10, 2014 9:24 am
Contact:

Re: Notification Message question

Post by povachon »

Not sure if im doing the write thing but it not working. Here the result of the notification :
_______________________________________________________________________________
***** Nagios XI Alert *****



Notification Type: CUSTOM
Host: ABUS_VPN-1
State: DOWN
Address: 10.50.20.1
Info: CRITICAL - 10.50.20.1: rta nan, lost 100%
Date/Time: 2014-05-01 09:38:43
Host Group Membership : $HOSTGROUPNAMES$

Respond: http://10.10.20.10/nagiosxi//rr.php?uid ... 174ebea7aa
Nagios URL: http://10.10.20.10/nagiosxi/
________________________________________________________________________________________

As you can see the the macro seem not to trigger the output ! It should list the hostgroup that belong this host in this case ABUS_VPN-1
Can you help me with that plz.
Regard
PO
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Notification Message question

Post by tmcdonald »

Where did you make that edit? Are you changing the notification command in the CCM or are you clicking Notification Messages after clicking your name? The $$ macros will only work in the first case and the edit must be made there.
Former Nagios employee
povachon
Posts: 44
Joined: Thu Apr 10, 2014 9:24 am
Contact:

Re: Notification Message question

Post by povachon »

Here where i make the change is that the right place to do so?

Regard
PO
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Notification Message question

Post by abrist »

You need to first edit the command for the notification. Go to Configure --> Core Config Manager --> Commands. Edit "xi_host_notification_handler". Add the following to the end of the command:

Code: Select all

--hostgroupnames="$HOSTGROUPNAMES$"
Save and apply configuration.

Now edit the notification message to include the following (instead of $HOSTGROUPNAMES$):

Code: Select all

Host Group Membership: %hostgroupnames%
Save the changes. It should now be configured.
More information can be found in the following doc:
http://assets.nagios.com/downloads/nagi ... iables.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
povachon
Posts: 44
Joined: Thu Apr 10, 2014 9:24 am
Contact:

Re: Notification Message question

Post by povachon »

You rock man! you can lock this thread !
Many thx
PO
Locked