Skip to content

shiziwen/nagios-status2txt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

nagios-status2txt

nagios enhancement to get service data as plain text

  1. Overview status-txt is a Nagios enhancement that duplicates the output of status.cgi in plain text to make it easier for other applications/services to use Nagios data.

Compile status-txt.c to create status-txt.cgi, status-txt.cgi accepts exactly the same URL parameters that status.cgi accepts, and filters its output appropriately. In this version, it accepts almost all the arguments passed in the URL which status.cgi accepts except "style", "navbarsearch", "columns" and "noheader". And we will add more functionalities in the next version.

The status-txt.cgi will returns service data that appears in the "status" table of status.cgi as "host_ip host_status [service:service_status;......]", not includes the top portion of the page, eg: 196.0.0.1 UP HTTP_80:OK; 196.0.0.2 UP DB_PORT_3306:OK;DB_PORT_3307:OK; And you can use some arguments to filter its output, such as "hostgroup", "servicegroup", "host" and so on.

  1. Install 1).Put status-txt.c in nagios/cgi 2).Modify Makefile to add status-txt.c. 3).make && make install

  2. Usage You can use "IP/nagios/cgi-bin/status-txt.cgi" to get the host and status form nagios. In order to filter its output, you can use some arguments, eg: "IP/nagios/cgi-bin/status-txt.cgi?host=196.0.0.1".

About

nagios enhancement to get service data as plain text

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages