0

I have Nagios running on my system, now I want to create Java application to know the condition of the service(for example HTTP) that Nagios monitored. So the Java application can access information from Nagios.

how do I create the application? is there any way other than using the function get runtime() and exec() from Java? Thank you

user1973423
  • 31
  • 3
  • 8
  • Yes there is: you can talk NRPE. It's quite an easy protocol – fge Jun 15 '13 at 09:43
  • thank you, I found the information about JNRPE and trying to use that. Now I have a problem, how to create Nagios graph? or how to embedd nagios graph to my java application? – user1973423 Jul 03 '13 at 16:01
  • You can add pnp4nagios to your nagios server to get graphs on the items which provide perfstats values. – Steve Shipway Jul 28 '13 at 22:52

1 Answers1

0

If you are asking how your Java application can read the current Nagios service statuses, then I would suggest you use the Nagios livestatus module, and have your Java application query that.

Livestatus allows your application, whatever it is written in, to query the running Nagios process and pull out the current and historical data, plus the configuration information.

Steve Shipway
  • 3,754
  • 3
  • 22
  • 39