$SERVICESTATEID$ Macro
Posted: Fri Apr 04, 2014 2:49 pm
Hello,
We created a command in Nagios CCM called "send_snmptrap" which contains the following line:
/usr/bin/snmptrap -v 2c -c public 10.10.10.99 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "$HOSTNAME$" nSvcDesc s "$SERVICEDESC$" nSvcStateID i $SERVICESTATEID$ nSvcOutput s "$SERVICEOUTPUT$"
We are trying to configure an Event Handler to use the $SERVICESTATEID$ macro to pass the actual state of a Service Event via snmptrap.
Currently, the macro $SERVICESTATEID$ is not returning with a value (integer) for this service check command. If we replace the macro with a static value, e.g. 1, then the trap message arrives as expected. Otherwise, the event never makes it to the SNMP logs. We understand that not all macros may be "valid" in a particular type of command. However, the MACRO $SERVICESTATEID$ is supposed to be valid for Service Event Handlers.
Can someone please advise?
Thanks,
KLee
We created a command in Nagios CCM called "send_snmptrap" which contains the following line:
/usr/bin/snmptrap -v 2c -c public 10.10.10.99 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "$HOSTNAME$" nSvcDesc s "$SERVICEDESC$" nSvcStateID i $SERVICESTATEID$ nSvcOutput s "$SERVICEOUTPUT$"
We are trying to configure an Event Handler to use the $SERVICESTATEID$ macro to pass the actual state of a Service Event via snmptrap.
Currently, the macro $SERVICESTATEID$ is not returning with a value (integer) for this service check command. If we replace the macro with a static value, e.g. 1, then the trap message arrives as expected. Otherwise, the event never makes it to the SNMP logs. We understand that not all macros may be "valid" in a particular type of command. However, the MACRO $SERVICESTATEID$ is supposed to be valid for Service Event Handlers.
Can someone please advise?
Thanks,
KLee