Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
status-json duplicates the output of status.cgi in JSON format to make it easier for other applications/services to use Nagios data. To compile: 1. Copy status-json.c into $NAGIOS_DIR/cgi/ 2. cd $NAGIOS_DIR/cgi/ 3. Execute the command below to compile status-json.c into status-json.cgi gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o status-json.cgi status-json.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../common/shared.o Updated 7 March 2012: Thanks to Doychin Atanasov for making some changes to fix problems with honoring disabled notifications and acknowledged states. Updated 6 March 2017: Thanks to everyone who has used status-json, or who has made improvements to it, or who has had questions about it. We're no longer using Nagios at my site, so I am not able to promise ongoing support for status-json. I've updated the source to include instructions for compiling status-json with gcc.
Current Version
2.0
Last Release Date
2012-03-06
Owner
Martin
License
GPL
Compatible With
status-json.c source code with D. Atansov's bug fix
status-json duplicates the output of status.cgi in JSON format. Compile status-json.c to create status-json.cgi. status-json.cgi accepts exactly the same URL parameters that status.cgi accepts, and filters its output appropriately.
To compile: 1. Copy status-json.c into $NAGIOS_DIR/cgi/ 2. cd $NAGIOS_DIR/cgi/ 3. Execute the command below to compile status-json.c into status-json.cgi gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o status-json.cgi status-json.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../common/shared.o
Note that status-json.cgi only returns the service/host/servicegroup/hostgroup data that appears in the "status" table of status.cgi. It does not return the top portion of the page. I will add this functionality in the next version.
Updated 7 March 2012: Thanks to Doychin Atanasov for making some changes to fix problems with honoring disabled notifications and acknowledged states.
Updated 6 March 2017: Thanks to everyone who has used status-json, or who has made improvements to it, or who has had questions about it. We're no longer using Nagios at my site, so I am not able to promise ongoing support for status-json. I've updated the source to include instructions for compiling status-json with gcc.
Here is the way to compile it (could be useful): cd ./nagios-3.2.3/ ./configure make all cd ./cgi gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI -o status-json.cgi status-json.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o
You must be logged in to submit a review.
To:
From:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!