Free variable definition from service output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
cellact
Posts: 69
Joined: Mon May 14, 2012 7:00 am

Free variable definition from service output

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Free variable definition from service output

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked