I’ve done something similar.
In my case, my Java application received http requests from the Nagios system and returned the responses in pre-defined pads, so that Nagios could show them.
When a request was received by the application, it raised the status of the monitored resources and sent the response to Nagios.
If you use this mechanism, there are 3 things to consider:
- What kind of monitoring to be done? With alarm in case of
problems in the monitored resources? Read-only status in
resources?
- Response time of monitored rejects has to be relatively small, not to have an http timeout, since Nagios works synchronously.
- Type of response being returned to Nagios:
- should contain all data already ready for Nagios not need to calculate anything.
- shall also contain messages that are readable and understandable to end-users.
I hope I’ve been clear enough and I can help.
If you have questions, do not hesitate to write them.
My application communicates with controllers via socket. These controllers send me information like current temperature of the environment, whether the lamps and air conditioning are on or off... anyway, when receiving this information from the controllers wanted to send this information to Nagios for it to show in the floor plan of the room, for example, if a lamp is out it displays an image of a red lamp, if it is on it displays a yellow image.
– Andeson