We are looking to do integration with Pagerduty in Nagios XI, and we were hoping to make use of some already defined Free Variables. We have the integration working, but the custom variable doesn't seem to come through.
In our Service and Host Templates, we have defined '_env' in the Free Variables screen. We currently are able to use this field when sending email by calling it as %env% in the Notification Template.
I've tried afew different ways, but none of them seem to actually call the content of the variable, they just send the name.
An example of the code being used, the last bit is my concern. The rest works just fine.
Code: Select all
/usr/share/pdagent-integrations/bin/pd-nagios -n service -k $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$" -f SERVICEDESC="$SERVICEDESC$" -f SERVICESTATE="$SERVICESTATE$" -f HOSTNAME="$HOSTNAME$" -f SERVICEOUTPUT="$SERVICEOUTPUT$" -f SERVINSTANCE="$env$"