Reading a value from a Web page
Posted: Wed Jan 04, 2012 11:42 am
Hi,
Is there a plugin that allows a value to be read from a Web page and then for that value compared to defined thresholds?
I have a bash script that reads a USB temperature sensor, logs the data, sends email alerts if necessary and also generates a simple web page showing the temperature. If I could read the value on the page into Nagios it would mean I don't have to allow file-level access to the server or install any client apps etc (the server is only monitored by a ping test). I have full control over how the generated Web page looks so I could make it easy for the temperature to be found - it currently looks like this:
All suggestions appreciated.
Thanks
Is there a plugin that allows a value to be read from a Web page and then for that value compared to defined thresholds?
I have a bash script that reads a USB temperature sensor, logs the data, sends email alerts if necessary and also generates a simple web page showing the temperature. If I could read the value on the page into Nagios it would mean I don't have to allow file-level access to the server or install any client apps etc (the server is only monitored by a ping test). I have full control over how the generated Web page looks so I could make it easy for the temperature to be found - it currently looks like this:
Code: Select all
Temperature reading for Server Room 4
Temperature was..... : 18.375C when sampled at 04-Jan-2012 16:30
Previous reading was : 18.375C when sampled at 04-Jan-2012 16:20
Temp differential is : 0CThanks