status-txt: easier for other applications/services to use Nagios data
Alex Griffin
agriffin at nagios.com
Fri May 4 20:15:11 CEST 2012
Thanks for posting this, it looks pretty useful!
Alex Griffin
---
Tech Team
agriffin at nagios.com
On 05/02/2012 10:57 PM, Wenhua Zhang wrote:
> Hi all,
> Recently, we need a API or application to get the nagios data as other
> easily readable format such as XML, JSON or plain text instead of the
> default HTML.
> status-txt is implemented to duplicate the output of status.cgi in
> plain text to achieve this goal, making it easier for other
> applications/services to use Nagios data.
>
> Compile status-txt.c to create status-txt.cgi, this 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.
>
> The attachment is the source code, if you have any ideas about it,
> please feel free to let me know.
> You can also get the source code from github
> "https://github.com/shiziwen/nagios-status2txt".
>
>
> Thanks,
> Best Wishes,
> Wenhua
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> _______________________________________________
> 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
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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