Page 1 of 1

EM01B Monitoring Issue

Posted: Mon Oct 17, 2016 1:24 pm
by BanditBBS
Ok, so installed a new EM01B and I can browse to it:

Code: Select all

[nagios@robot-herb ~]$ curl 172.16.250.19/index.html?em345678
<html><head></head><body>/N338037TF: 68.8HU:52.5%IL:75.49</body></html>
But if I try and use the check_em01.pl plugin I always get "unable to read sensor"

Re: EM01B Monitoring Issue

Posted: Mon Oct 17, 2016 1:32 pm
by rkennedy
Could you attempt to run it over the CLI, with --debug appended? It looks like the plugin has a debug mode, so this should help to see where the script goes along the process.

Re: EM01B Monitoring Issue

Posted: Mon Oct 17, 2016 1:37 pm
by BanditBBS
I meant to say I tried that and didn't really give anything useful:

Code: Select all

connected to 172.16.250.19:80
timeout(alarm) during sensor read
Unable to read sensor

Re: EM01B Monitoring Issue

Posted: Mon Oct 17, 2016 1:59 pm
by rkennedy
What if you append --timeout=120 ? Just running through the logic in this plugin to try and knock out the obvious.

It looks simple enough as it just sets the variables based on the response -

Code: Select all

            {
                $read->{'temp-unit'} = $1;
                $read->{'temperature'} = $2;
                $read->{'humidity'} = $3;
                $read->{'illumination'} = $4;
}

Re: EM01B Monitoring Issue

Posted: Mon Oct 17, 2016 2:02 pm
by BanditBBS
Doesn't look as though timeout is actually coded to work as it says invalid option!

Re: EM01B Monitoring Issue

Posted: Mon Oct 17, 2016 3:39 pm
by rkennedy
Could you post the entire source of the plugin? I was basing that off of one I found online, and may have been slightly different.

Re: EM01B Monitoring Issue

Posted: Mon Oct 17, 2016 3:40 pm
by ssax
Please try using the attached plugin, I updated it for another customer, apparently some of their devices do not work with their plugin.

Thank you

Re: EM01B Monitoring Issue

Posted: Mon Oct 17, 2016 3:45 pm
by BanditBBS
ssax wrote:Please try using the attached plugin, I updated it for another customer, apparently some of their devices do not work with their plugin.

Thank you
You are the second developer for nagios that I have said this to: I love you!

That fixed it! (after installing XML::Simple on the worker)

Re: EM01B Monitoring Issue

Posted: Mon Oct 17, 2016 4:41 pm
by avandemore
Glad your issue is resolved. If you have have further problems please open a new thread.