Nagios and JSON with statusjson.cgi: a winning combination! · 27 September 2008, 17:35
Yann JOUANIN’s new JSON output CGI for Nagios called Nagios2JSON has some seriously important positive impacts to the utility of Nagios as glue for an organization’s monitoring infrastructure.
- Want to build your own Nagios GUI? No more web scraping, or having to install NDO and take the overhead hit of a full RDBMS, or other hacks .. just read JSON and build.
- Want to use Nagios as a very simple CMDB source for your organization? Now you can, easily.
- Want to integrate Nagios with any web service? Can’t get more easy than JSON
I have been using the JSON CGI to build a custom web interface to Nagios to help convince some important people I work with that Nagios is more flexible and easier to mold without hacking than any other open source fault management framework available today. Working with JSON lets me really just focus on my front end and just treat Nagios as a data source .. really really cool!
Some of the limitations of the current implementation (project is very young)
- Currently only lets you query for all hostgroups or all hosts or all services or all service groups, can’t ask for service X on host Y .. yet. I am sure that will be coming
- Requires patching the Nagios CGI makefile and building Nagios with the new CGI code moved into the CGI directory. Not a big deal at all, I am hoping that over time this CGI will become a part of the core.
- No RESTful interface yet
- Can’t perform any of the GUI functions like suppressing notifications, submitting passive checks etc via POST requests to the CGI.
I really cannot say enough good things about this add on and I really hope Yann continues to work on this project.
— Max Schubert
Comment
Freezing Ruby Data Structures Recursively CSS is still for Tweakers

Thanks for your article!
I am working on the new version , here the improvement than will be done :
_ using same options as status.cgi (this will allow to build ajax interface)
_ implementation of access control
_ other CGIs to get logs etc…
— Yann Jouanin · Oct 16, 05:23 AM · #
Hi Yann,
Nice ideas :) and a terrific project.
For access control, you mean just limiting what a user can retrieve via the JSON CGI based on their username, same as Nagios, yes?
I added a number of features requests to your queue on sf.net :p. I would be happy to help implement some of those if you would like help.
I also am curious if you are planning on using a C-based JSON library in the future with your project? Looks like there are several available …
Thanks again, I know this functionality will become more important to Nagios as a selling point than some people might think .. it definitely helped me convince my managers to accept Nagios :).
— Max · Oct 16, 09:27 AM · #