Page 1 of 1

Free variable definition from service output

Posted: Mon Jan 27, 2014 10:39 am
by cellact
Hi,
Is it possible to set a dynamic Free variable definition that is generated from a service check output?

I want to configure an NRPE check that outputs a service name, and then use that service name with an event handler.

IE:
NRPE check outputs: "Windows Time"
Free variable definition $_SERVICENAME is set with "Windows Time"
Event handler uses "Windows Time" to restart service

Thanks.

Re: Free variable definition from service output

Posted: Mon Jan 27, 2014 11:19 am
by scottwilkerson
You cannot set free variables on-demand, but you can access any of the macros that are set, see On Demand Macros
http://nagios.sourceforge.net/docs/3_0/macros.html