Esensor EM01b unable to read sensor

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
SquareWheel
Posts: 4
Joined: Wed Nov 16, 2016 4:47 pm

Esensor EM01b unable to read sensor

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Esensor EM01b unable to read sensor

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
SquareWheel
Posts: 4
Joined: Wed Nov 16, 2016 4:47 pm

Re: Esensor EM01b unable to read sensor

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Esensor EM01b unable to read sensor

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
SquareWheel
Posts: 4
Joined: Wed Nov 16, 2016 4:47 pm

Re: Esensor EM01b unable to read sensor

Post by SquareWheel »

Thanks, I ran the capture and PMed you the output.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Esensor EM01b unable to read sensor

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
SquareWheel
Posts: 4
Joined: Wed Nov 16, 2016 4:47 pm

Re: Esensor EM01b unable to read sensor

Post by SquareWheel »

This thread fixed me up. Please close

https://support.nagios.com/forum/viewto ... 16&t=44926
Locked