status-txt: easier for other applications/services to use Nagios data
Wenhua Zhang
shiziwen at gmail.com
Thu May 3 18:51:52 CEST 2012
Hi,
Thanks for your reply.
As we know, MKLivestatus is a Nagios Event Broker (NEB) Module which can be
used to extend the core of Nagios. This module can provide access to the
live status information kept in the running Nagios process. It serves a
unix socket for data exchange with external scripts/addons, it is stable
and extremely fast.
status-txt is a simple and light way to get the nagios data in plain text,
it likes status-json (
http://exchange.nagios.org/directory/Addons/APIs/JSON/status-2Djson/details),
try to making it easier for other applications/services to use Nagios data.
I hope status-txt can be useful for those who have the same need as we did
(try to get the nagios data as other easily readable format).
Best Wishes,
Wenhua
2012/5/3 MAD <mad at b-care.net>
> Hi,
>
> You could also use the "mk_livestatus" broker (available here
> http://mathias-kettner.de/checkmk_livestatus.html) which can be used to
> fetch information from Nagios in JSON format by forging your own requests.
>
> Best regards,
> Marc-André
>
>
> On 05/03/2012 05:57 AM, 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" <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 listNagios-users at lists.sourceforge.nethttps://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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120504/f4405f4a/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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/
-------------- next part --------------
_______________________________________________
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