$SERVICEOUTPUT$ Question

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.
Locked
rem2500
Posts: 2
Joined: Wed Oct 15, 2014 11:26 am

$SERVICEOUTPUT$ Question

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: $SERVICEOUTPUT$ Question

Post 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.
rem2500
Posts: 2
Joined: Wed Oct 15, 2014 11:26 am

Re: $SERVICEOUTPUT$ Question

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: $SERVICEOUTPUT$ Question

Post by hsmith »

rem2500,

Is there anything else we can do to help you out?
Former Nagios Employee.
me.
Locked