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
Notification Message question
Re: Notification Message question
Absolutely! Have you looked at our macro list? $HOSTGROUPALIAS$ should be what you are looking for.
Former Nagios employee
Re: Notification Message question
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
_______________________________________________________________________________
***** 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
Re: Notification Message question
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
Re: Notification Message question
Here where i make the change is that the right place to do so?
Regard
PO
Regard
PO
You do not have the required permissions to view the files attached to this post.
Re: Notification Message question
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:
Save and apply configuration.
Now edit the notification message to include the following (instead of $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
Code: Select all
--hostgroupnames="$HOSTGROUPNAMES$"Now edit the notification message to include the following (instead of $HOSTGROUPNAMES$):
Code: Select all
Host Group Membership: %hostgroupnames%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.
"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.
Re: Notification Message question
You rock man! you can lock this thread !
Many thx
PO
Many thx
PO