<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    You could also use the "mk_livestatus" broker (available here
    <a class="moz-txt-link-freetext" href="http://mathias-kettner.de/checkmk_livestatus.html">http://mathias-kettner.de/checkmk_livestatus.html</a>) which can be used
    to fetch information from Nagios in JSON format by forging your own
    requests.<br>
    <br>
    Best regards,<br>
    Marc-André<br>
    <br>
    On 05/03/2012 05:57 AM, Wenhua Zhang wrote:
    <blockquote
cite="mid:CAMfW_3L5XPVmUy3K0OXidWtdhUuVP0g0mTn+37n+kOb+PmnXxg@mail.gmail.com"
      type="cite">
      <pre wrap="">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
<a class="moz-txt-link-rfc2396E" href="https://github.com/shiziwen/nagios-status2txt">"https://github.com/shiziwen/nagios-status2txt"</a>.


Thanks,
Best Wishes,
Wenhua
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">------------------------------------------------------------------------------
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. <a class="moz-txt-link-freetext" href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null</pre>
    </blockquote>
    <br>
  </body>
</html>