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
$SERVICEOUTPUT$ Question
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: $SERVICEOUTPUT$ Question
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.
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
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
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
rem2500,
Is there anything else we can do to help you out?
Is there anything else we can do to help you out?
Former Nagios Employee.
me.
me.