Page 1 of 1
Esensor EM01b unable to read sensor
Posted: Thu Dec 06, 2018 11:41 am
by SquareWheel
Need a little help. Im getting errors trying to connect nagios xi to a couple esensor EM0b1.
2018-12-06_10-36-37.png
from nagios:
Code: Select all
curl 172.20.220.69/index.html?em34567 -v
* About to connect() to 172.20.220.69 port 80 (#0)
* Trying 172.20.220.69... connected
* Connected to 172.20.220.69 (172.20.220.69) port 80 (#0)
> GET /index.html?em34567 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 172.20.220.69
> Accept: */*
>
< HTTP/1.1 200 OK
< Access-Control-Allow-Origin: *
< Content-Type: text/html
< Connection: close
<
* Closing connection #0
<html><head></head><body>/N461732TF: 72.7HU:35.6%IL:89.70</body></html>
Code: Select all
/usr/local/nagios/libexec/check_em01.pl --type=temp --temp=60/85,50/95 172.20.220.69 --debug
connected to 172.20.220.69:80
timeout(alarm) during sensor read
Unable to read sensor
Re: Esensor EM01b unable to read sensor
Posted: Thu Dec 06, 2018 2:23 pm
by cdienger
It looks like the connection is closing before the response makes it back. Try increasing the timeout:
Code: Select all
/usr/local/nagios/libexec/check_em01.pl --type=temp --temp=60/85,50/95 172.20.220.69 --debug --timeout=30
Re: Esensor EM01b unable to read sensor
Posted: Thu Dec 06, 2018 3:35 pm
by SquareWheel
Seems to be failing before the actual timeout as the message comes back quickly. When I curl 172.20.220.89/index.html?em34567 from nagios it comes right back.
Code: Select all
[usr@nagiosxi ~]# /usr/local/nagios/libexec/check_em01.pl --type=temp --temp=60/85,50/95 172.20.220.69 --debug --timeout=30
Unknown option: timeout
connected to 172.20.220.69:80
timeout(alarm) during sensor read
Unable to read sensor
[usr@nagiosxi ~]# /usr/local/nagios/libexec/check_em01.pl --type=temp --temp=60/85,50/95 172.20.220.69 --debug --timeout=60
Unknown option: timeout
connected to 172.20.220.69:80
timeout(alarm) during sensor read
Unable to read sensor
[usr@nagiosxi ~]# /usr/local/nagios/libexec/check_em01.pl --type=temp --temp=60/85,50/95 172.20.220.69 --debug --timeout=120
Unknown option: timeout
connected to 172.20.220.69:80
timeout(alarm) during sensor read
Unable to read sensor
Re: Esensor EM01b unable to read sensor
Posted: Thu Dec 06, 2018 3:53 pm
by cdienger
If it's closing right away then there could be a network issue. Try running:
yum -y install tcpdump
tcpdump -s 0 -i any host 172.20.220.89 -w output.pcap
let this run just long enough to run the plugin again on another terminal and then use CTRL+C to stop it. The tcpudmp can be reviewed with wireshark. Feel free to PM us a copy too.
Re: Esensor EM01b unable to read sensor
Posted: Fri Dec 07, 2018 10:16 am
by SquareWheel
Thanks, I ran the capture and PMed you the output.
Re: Esensor EM01b unable to read sensor
Posted: Fri Dec 07, 2018 2:55 pm
by cdienger
The dump shows a connection, the request sent, and then resent again because first request wasn't ACKnowledged. 15 seconds later the plugin terminates the connection. There is also a second attempt by the plugin to establish a connection but it is terminated right away and doesn't get past the initial SYN to establish a tcp connection.
The first connection is definitely showing a timeout. The second is showing a failure to establish a tcp connection. In either case you'll want to look beyond the XI machine to the devices between XI and the destination or the destination itself.
Re: Esensor EM01b unable to read sensor
Posted: Mon Dec 10, 2018 11:54 pm
by SquareWheel