Passing Host Group via XI SNMP Trap Sender

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Passing Host Group via XI SNMP Trap Sender

Post by JakeHatMacys »

In regards to this old topic: http://support.nagios.com/forum/viewtop ... 16&t=31152

I have a quick question, what is the correct variable to get host group name into the PHP?

One of our coders is going to take a stab at getting it to work.

Thanks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Passing Host Group via XI SNMP Trap Sender

Post by scottwilkerson »

You would need to modify in the CCM the command

Code: Select all

xi_host_event_handler
and you can add something like the following to the end of the command

Code: Select all

 --hostgroupnames=$HOSTGROUPNAMES$
this would add the hostgroupnames to the event_meta array, and it could be accessed with %hostgroupnames% in the command.

You can do the same with any of the macros that are available to even handlers
http://nagios.sourceforge.net/docs/nagi ... olist.html


For services you would need to make similar changes to the following command

Code: Select all

xi_service_event_handler
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked