I wanted to make a nagios check for the OWL energy meter.
First thing to note, don’t run any of the owl stuff while trying to run the check.
Secondly, I included the source so feel free to use Visual C# to hack it.
Third thing is, well, the OWL sensor software is very slow to respond, infact if you don’t get any response from it after a few minutes I recommend turning the kettle on. The check may take up to 10 minutes (how lame is that?) so I recommend you increase your time outs.
Finally I’m not familiar with Visual Studio, that’s why I did so little in Windows. I just wanted an output I could work with in a nice dark environment.
The check in bin\release\sensorapp.exe waits for a signal from the transmitter then echos it to command line. Do with it what you will. I’m pulling it into a simple .bat file.
We assuming have already configured nrpe on your nagios box and you are sudo’d/root
adduser nagios (set the password) cd /home/nagios wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz * If this step fails visit http://www.nagios.org/download/addons for the latest URL
tar -zxvf nrpe-2.8.tar.gz cd nrpe-2.12 apt-get install gcc gawk openssl apt-get install make apt-get install libssl-dev apt-get install nagios-plugins ./configure make all make install-plugin make install-daemon make install-daemon-config echo “only_from = 0.0.0.1” >> /usr/local/nagios/etc/nrpe.cfg * Remember to replace 0.0.0.1 with your the IP address of your nagios server