Retrieving the output of check_cluster2 outside of the Nagios environment

Greg Vickers g.vickers at qut.edu.au
Fri Apr 8 07:14:50 CEST 2005


Hi all,

I want to move one of our Nagios servers from 1.2->2.0. This will 
necessitate an upgrade from check_cluster to check_cluster2 because of 
the different format of the status.log file.

I am currently calling check_cluster from a perl script and parsing the 
check_cluster output for generating a display on a web page. This will 
not work with check_cluster2 as the on-demand service state macros are 
passed on the command line to check_cluster2, and are expanded by Nagios 
when running check_cluster2 (as a child process?) to the current service 
state IDs. These macro values are not available inside my perl script...

Does anyone know:
a) do the service state IDs change upon restart of Nagios? i.e. can I 
hard code them (I'm guessing not)
b) where can you see what the service state IDs are? (I'm guessing 
status.log? - sorry don't have a working install of Nagios 2.0 atm)

To retrieve this output from check_cluster2 I could wrap the output and 
store it in temporary files on the HDD which are then read by the perl 
script, but that's kinda kludgy.

Does anyone have any ideas about getting this information to my perl 
script directly from Nagios?

(Hmm, idea, I could take check_cluster2 and convert the perl script to C 
and have a custom version of check_cluster2 huh...)

-- 
Greg Vickers
Computer Systems Officer
Teaching and Learning Support Services, Systems and Architecture
Queensland University of Technology

Phone: (07) 3864 8276
Mobile: 0416 001 674, SD #6 6147
Email: g.vickers at qut.edu.au

CRICOS No. 00213J



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list