2

I am looking into Nagios, and after checking their web site i came across 2 APIs in PHP for fetching/reading data from Nagios.

  • sourceforge.net/projects/gwfoundation/
  • naupy.sourceforge.net/

Do you happen to know any other similar solutions (apis) in PHP which allow parsing/fetching of data generated by Nagios?

Looking for anything written in PHP so if you know something, or have something to recommend, please do tell :)

Andreas
  • 5,305
  • 4
  • 41
  • 60

2 Answers2

3

Use Nagios::Report to retrieve information from avail.cgi

It is included with a lot of examples.

Super Mario
  • 246
  • 1
  • 3
1

If all you're interested is getting basic status information, you can just use PHP's preg_match_all to parse nagios' status file pretty easily and get what you want. Just create the regex to match whatever fields you're interested in and you can do whatever you want. If you want a simple example let me know and I can hack one up.

opsguy
  • 1,781
  • 1
  • 12
  • 11