Page 1 of 1

$SERVICEOUTPUT$ Question

Posted: Tue Sep 22, 2015 10:08 pm
by rem2500
Hey gang,

I am wondering if there is a way to get the $SERVICEOUTPUT$ of a particular service and pass it to a 3rd party plugin. I am currently using a Nagios mapping plugin and I want to take the output of the temperature service check that I have and display it on the map for the corresponding host.

I know other macros already work with this plugin like $HOSTALIAS$ so my question isn't really how to make them work but more about pulling the output from a specific service. I can't think of a way to point it to a service and say pull the $SERVICEOUTPUT$ for the Temp check...

Thanks!
rem2500

Re: $SERVICEOUTPUT$ Question

Posted: Wed Sep 23, 2015 11:44 am
by jdalrymple
Macros are available for event_handlers or notification commands. Can you hand it off that way?

If not, the other semi-sane way is to parse the status.dat file. The plugin_output field should give you the info you seek.

Re: $SERVICEOUTPUT$ Question

Posted: Wed Sep 23, 2015 8:55 pm
by rem2500
Hey jdalrymple,

Thanks for the reply! I think using a notification command that will write $SERVICEOUTPUT$ to a file that I can then read from the mapping program is a good place to start. Thanks for the recommendation! I never would have thought to try it that way...

rem2500

Re: $SERVICEOUTPUT$ Question

Posted: Thu Sep 24, 2015 2:28 pm
by hsmith
rem2500,

Is there anything else we can do to help you out?