Esensors Websensor

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bashar.abed
Posts: 153
Joined: Tue Oct 11, 2016 1:34 am
Location: Ramallah West Bank Palestine
Contact:

Esensors Websensor

Post by bashar.abed »

Hi,

I have Nagios sytem Version 5.3.3 VM, I connected new device to check Humidity and Illumination Temperature in our Data Center,the name of device is Esensors EM08-T version PR3x8.1.2 , i using Configuration Wizards --> Esensors Websensor ,after that i have a problem when i finished the Wizards setps as attached file

Run Check Command result for Humidity
[nagios@nms. ~]# /usr/local/nagios/libexec/check_em08 10.x.x.x H 15 80 10 90

Run Check Command result for Illumination
[nagios@nms. ~]# /usr/local/nagios/libexec/check_em08 10.x.x.x I x 70 x 80

Run Check Command result for Temperature
[nagios@nms. ~]# /usr/local/nagios/libexec/check_em08 10.x.x.x T 60 85 50 95

result from Nagios root
[nms ~]$ /usr/local/nagios/libexec/check_em08 10.x.x.x T 60 85 50 95
-bash: /usr/local/nagios/libexec/check_em08: No such file or directory

and please see the below result when i search the file check_em08 from libexec
[@nms ~]$ cd /usr/local/nagios/libexec/
[@nms libexec]$ ls -ltr
-rwxrwxr-x 1 apache nagios 5576 Oct 18 10:08 check_em01.pl

Thanks
You do not have the required permissions to view the files attached to this post.
bashar.abed
Posts: 153
Joined: Tue Oct 11, 2016 1:34 am
Location: Ramallah West Bank Palestine
Contact:

Re: Esensors Websensor

Post by bashar.abed »

Hi,

and please see the below result for Nagios Root

[root@nms libexec]# ./check_em01.pl 10.x.x.x --type=temp --temp=65/75,60/80
Unable to read sensor
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Esensors Websensor

Post by rkennedy »

What version of the wizard are you running? I just checked on my system, and it created a file called check_em01.pl with the command definition as below -

Code: Select all

check_em01_light 	$USER1$/check_em01.pl --type=illum --illum=$ARG1$,$ARG2$ $HOSTADDRESS$
It looks like the file you were attempting was check_em08, so just trying to see if something is invalid. As for this, please try running it with --debug appended -

Code: Select all

./check_em01.pl 10.x.x.x --type=temp --temp=65/75,60/80 --debug
Then post back the result for us.
Former Nagios Employee
bashar.abed
Posts: 153
Joined: Tue Oct 11, 2016 1:34 am
Location: Ramallah West Bank Palestine
Contact:

Re: Esensors Websensor

Post by bashar.abed »

Hi,

please see the below result after applied the commands

[root@nms libexec]# ./check_em01.pl 10.x.x.x --type=temp --temp=65/75,60/80 --debug
connected to 10.x.x.x:80
timeout(alarm) during sensor read
Unable to read sensor

What version of the wizard are you running? how can do that ?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Esensors Websensor

Post by lmiltchev »

Did you enable the plugin by running the following command from the command line:

Code: Select all

gcc /usr/local/nagiosxi/html/includes/configwizards/esensors-websensor/plugins/check_em08.c -o /usr/local/nagios/libexec/check_em08
as described in our documentation?
Be sure to check out our Knowledgebase for helpful articles and solutions!
bashar.abed
Posts: 153
Joined: Tue Oct 11, 2016 1:34 am
Location: Ramallah West Bank Palestine
Contact:

Re: Esensors Websensor

Post by bashar.abed »

Hi,

when I applied this command ,i saw this message
gcc /usr/local/nagiosxi/html/includes/configwizards/esensors-websensor/plugins/check_em08.c -o /usr/local/nagios/libexec/check_em08

[nagios@nms. ~]# /usr/local/nagios/libexec/check_em08 10.x.x.x H 15 80 10 90
Invalid data received.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Esensors Websensor

Post by rkennedy »

Based on what the plugin is doing, it appears to be looking at index.html -

Code: Select all

       print $remote "GET /index.html?em345678 HTTP/1.1 \r\n";
Let's take a look at what's being seen. Please run the following -

Code: Select all

curl 10.x.x.x/idnex.html?em345678 -v
(replace 10.x.x.x with the proper IP)

Then post this back here for us to look at.
Former Nagios Employee
bashar.abed
Posts: 153
Joined: Tue Oct 11, 2016 1:34 am
Location: Ramallah West Bank Palestine
Contact:

Re: Esensors Websensor

Post by bashar.abed »

Hi,

after applied this commands the result is

curl 10.x.x.x/idnex.html?em345678 -v

[root@nms ~]# curl 10.x.x.x/idnex.html?em345678 -v
* About to connect() to proxy 10.y.x.x port 8080 (#0)
* Trying 10.y.x.x... Connection timed out
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host

the proxy IP is incorrect, how can change it to correct one
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Esensors Websensor

Post by rkennedy »

That's most likely the issue. Take a look at this article which should help to resolve the proxy - https://support.nagios.com/kb/article.php?id=147
Former Nagios Employee
bashar.abed
Posts: 153
Joined: Tue Oct 11, 2016 1:34 am
Location: Ramallah West Bank Palestine
Contact:

Re: Esensors Websensor

Post by bashar.abed »

Hi,

please see the below result

[root@nms ~]# curl IP-sensor/idnex.html?em345678 -v
* About to connect() to proxy IP-Proxy port 8080 (#0)
* Trying IPProxy... connected
* Connected to IP-Proxy (IP-Proxy) port 8080 (#0)
> GET http://IP-sensor/idnex.html?em345678 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: IP-sensor
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 403 Forbidden
< Content-Length: 1393
<
<!-- IE friendly error message walkround.
if error message from server is less than
512 bytes IE v5+ will use its own error
message instead of the one returned by
server. -->


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css">html,body{height:100%;padding:0;margin:0;}.oc{display:table;width:100%;height:100%;}.ic{display:table-cell;vertical-align:middle;height:100%;}div.msg{display:block;border:1px solid #30c;padding:0;width:500px;font-family:helvetica,sans-serif;margin:10px auto;}h1{font-weight:bold;color:#fff;font-size:14px;margin:0;padding:2px;text-align:center;background: #30c;}p{font-size:12px;margin:15px auto;width:75%;font-family:helvetica,sans-serif;text-align:left;}</style><title>Access Denied</title></head><body><div class="oc"><div class="ic"><div class="msg"><h1>Access Denied</h1><p>The page you requested has been blocked by a firewall policy restriction.</p></div></div></div></body></html>
* Connection #0 to host IP-Proxy left intact
* Closing connection #0
Locked