Page 3 of 4

Re: Esensors Websensor

Posted: Mon Dec 19, 2016 10:52 am
by rkennedy
Is your XI system setup to use proxies? If so, use this document for reference - https://support.nagios.com/kb/article.php?id=147

What you'll want to do, is add the IP for the esensor under the no_proxy, and it should work at that point.

Re: Esensors Websensor

Posted: Mon Dec 19, 2016 12:05 pm
by bashar.abed
Hi,

I added the Esensor on nagios but the nagios can not read the value exist on esonsor
So how can read it without proxy because the admin opened any
From proxy

Re: Esensors Websensor

Posted: Mon Dec 19, 2016 2:25 pm
by rkennedy
bashar.abed wrote:Hi,

I added the Esensor on nagios but the nagios can not read the value exist on esonsor
So how can read it without proxy because the admin opened any
From proxy
See my above post about 'no_proxy' which will tell it not to proxy traffic to that IP.
rkennedy wrote:Is your XI system setup to use proxies? If so, use this document for reference - https://support.nagios.com/kb/article.php?id=147

What you'll want to do, is add the IP for the esensor under the no_proxy, and it should work at that point.

Re: Esensors Websensor

Posted: Mon Dec 19, 2016 2:47 pm
by bashar.abed
Hi
You mean I should used this command on nagios root
No_proxy 10.x.x.x

10.x.x.x related to ip sensor machine

Thanks

Re: Esensors Websensor

Posted: Mon Dec 19, 2016 3:32 pm
by rkennedy
Yep, exactly. I think it's No_proxy=10.x.x.x though. If you get confused, try it, and let us know the full result.

Re: Esensors Websensor

Posted: Tue Dec 20, 2016 6:32 am
by bashar.abed
Hi,
see the below result after applied No_proxy command

[root@nms ~]# No_proxy=IP-Sensor
[root@nms ~]# curl http://IP-sensor/index.html?em345678 –v
<!-- 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>
<!-- 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>504 DNS look up failed</title></head><body><div class="oc"><div class="ic"><div class="msg"><h1>504 DNS look up failed</h1><p><p>The webserver reported that an error occurred while trying to access the website. Please click <u><a href="javascript:history.back()">here</a></u> to return to the previous page.</p>
<p>
URL = http://xn--v-5gn<br />
<br/>Client IP: Nagios-IP
<br/>Server IP: N/A
<br/>User name:
<br/>Group name:
</p></p></div></div></div></body></html>
[root@nms ~]#


Thanks

Re: Esensors Websensor

Posted: Tue Dec 20, 2016 1:19 pm
by tgriep
You may have to allow a direct connection between the XI server and the Esensor to get this to work as it may not use the proxy settings.

In your output from the curl command, I am seeing a 504 DNS lookup error and that that a firewall blocked the connection. Those have to be fixed before you can check that sensor.
See if you can get the Nagios server setup to bypass the firewall and that should fix it for you.

Re: Esensors Websensor

Posted: Tue Dec 20, 2016 2:48 pm
by bashar.abed
Hi,
How can bypass the firewall on nagios to reach esensor

Thanks

Re: Esensors Websensor

Posted: Tue Dec 20, 2016 3:06 pm
by dwhitfield
We are going to need to know a bit more about your firewall to answer that question. If you are using IPTables, https://wiki.centos.org/HowTos/Network/IPTables should help. I tried to find some nftables documentation for CentOS and I could not. If you are using some sort of firewall appliance, could you tell us the model? If you don't wish to do that for security purposes, you can PM the information to me.

If you do PM the model #, please make sure you update this thread. That is the only way for the thread to pop back up on our board. Thanks!

Re: Esensors Websensor

Posted: Wed Dec 21, 2016 7:36 am
by bashar.abed
Hi,

kindly to be notified that there is no IPTable Firewall configured on Nagios System
also i have applied the below command curl --noproxy http://IP-Sensor/index.html?em345678 –v
and i have got the below result

[root@nms ~]# curl --noproxy http://IP-Sensor/index.html?em345678 –v
<!-- 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>504 DNS look up failed</title></head><body><div class="oc"><div class="ic"><div class="msg"><h1>504 DNS look up failed</h1><p><p>The webserver reported that an error occurred while trying to access the website. Please click <u><a href="javascript:history.back()">here</a></u> to return to the previous page.</p>
<p>
URL = http://xn--v-5gn<br />
<br/>Client IP: IP-Nagios
<br/>Server IP: N/A
<br/>User name:
<br/>Group name:
</p></p></div></div></div></body></html>
You have new mail in /var/spool/mail/root
[root@nms ~]#

there is ASA firewall between Nagios and Esensor device with permit any policies
but when i applied nc command the result appear as send before for you !
please advice