Hello, I am a little new to Linux and Nagios, so, please excuse me if my question is too easy.
I have installed Nagios XI 5.2.9, from the VM image downloaded from official site, running on a ESXi 6.x.
My Nagios XI VM does not have direct access to internet, I have to use a internal Proxy Server to access websites.
My question is, how do I configure nagios to access internet through a proxy server (does not require autentication), in order to be able to monitor websites.
Also I need to prevent Nagios to use Proxy server to access specific internal networks.
Thanks in advance
Check website through a proxy
Re: Check website through a proxy
We don't officially support installations that exist behind proxies, but we have a KB article with some potential solutions:
https://support.nagios.com/kb/article.php?id=147
The help for the check_http plugin includes some information in regards to dealing with proxies when checking websites:
https://support.nagios.com/kb/article.php?id=147
The help for the check_http plugin includes some information in regards to dealing with proxies when checking websites:
Code: Select all
/usr/local/nagios/libexec/check_http -hFormer Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Check website through a proxy
Please see: https://support.nagios.com/kb/article.php?id=147
You can set these at the user or application level, but they need to be set in order to be obeyed.
Nagios and its checks are going to obey whatever the operating system environment tells it:Also I need to prevent Nagios to use Proxy server to access specific internal networks.
Code: Select all
export http_proxy="http://proxy.com:8000"
export no_proxy="127.0.0.1, localhost, 192.168.1.10, domain.com:8080"Previous Nagios employee
Re: Check website through a proxy
For check_http you can use something like this -
From the web server side -
Code: Select all
[root@centos7x64 libexec]# ./check_http -H 192.184.x.x -p 3128 -b user:pass -u http://mydomain.com -f follow -v
GET http://mydomain.com HTTP/1.1
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Host: 192.184.x.x:3128
Accept: */*
Proxy-Authorization: Basic eDpwNHNzdzByZA==
http://192.184.x.x:3128http://mydomain.com is 862 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Date: Wed, 23 Nov 2016 18:56:33 GMT
Server: Apache/2.4.6 (CentOS) PHP/5.4.16
X-Powered-By: PHP/5.4.16
Content-Length: 652
Content-Type: text/html; charset=UTF-8
Proxy-Connection: Close
**** CONTENT ****
HTTP OK: HTTP/1.1 200 OK - 862 bytes in 0.573 second response time |time=0.572974s;;;0.000000 size=862B;;;0
Code: Select all
==> /var/log/httpd/access_log <==
192.184.x.x - - [23/Nov/2016:13:56:33 -0500] "GET / HTTP/1.1" 200 652 "-" "check_http/v2.0.3 (nagios-plugins 2.0.3)"
Former Nagios Employee