Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
There are the same values like in the e-mail notification. The e-mail is sent and all the values are received. Staring from | var2=.... I placed the same ones as in the e-mail but only 4 of them are stored in the log file. VAR6 AND VAR7 are not saved.
As @tgriep mentioned - the macros are NOT passed all the time. It depends on the type of check / notification is going out. Take a look at the links above to see which macros are populated when.
I managed to populate the following values:
HOSTNAME$ $HOSTSTATEID$ $SERVICEDESC$ $SERVICESTATEID$$SERVICEATTEMPT$ $LASTSERVICESTATECHANGE$ $SERVICEDURATIONSEC$ $LASTSERVICECHECK$
Although I can not send neither $SERVICEOUTPUT$ nor $HOSTOUPUT$ vars.
Can you please tell me how to push those values into the sendtrapd ?
The $SERVICEOUTPUT$ is only valid with service checks and it will use the service notification handler.
The $HOSTOUTPUT$ is only valid with host checks and it will use the host notification handler.
So you will have to create 2 notification commands, one for host notifications and one for service notifications.
The error log output does not have enough information but it looks like one of your notification commands has an error and you would have to see which one it is and fix the error.
Be sure to check out our Knowledgebase for helpful articles and solutions!