Monitor an external website
Monitor an external website
Hi,
We need to monitor an website outside our network.
To access internet we have a proxy server in place.
Is it possible to monitor the website via proxy without disrupting or forcing all other checks via proxy?
Thanks in advance.
We need to monitor an website outside our network.
To access internet we have a proxy server in place.
Is it possible to monitor the website via proxy without disrupting or forcing all other checks via proxy?
Thanks in advance.
Re: Monitor an external website
Is the Nagios server setup to use the proxy by default when accessing the internet? And are all of your other checks on the internal network?
If so, then you should be good to use the regular check_http plugin. With that plugin you can specify the proxy server credentials (--proxy-authorization=username:password), and it will only use those when it attempts to access the internet. All other checks on the local network should just go to the servers they were intended to go to.
If so, then you should be good to use the regular check_http plugin. With that plugin you can specify the proxy server credentials (--proxy-authorization=username:password), and it will only use those when it attempts to access the internet. All other checks on the local network should just go to the servers they were intended to go to.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor an external website
Hi,
On the Admin -> System Config -> Proxy Configuration, our proxy is configured there.
(is this what you were mentioning on your first question?)
All other checks are for internal network.
I went to Configure -> Configuration Wizards -> Website -> Website Step 1 -> inserted the website to monitor -> Website Services "HTTP"
All other next options I left them by default.
Like this the website I wanted to monitor is being reported as "down" in Nagios.
Thanks in advance,
PSA Sines
On the Admin -> System Config -> Proxy Configuration, our proxy is configured there.
(is this what you were mentioning on your first question?)
All other checks are for internal network.
I went to Configure -> Configuration Wizards -> Website -> Website Step 1 -> inserted the website to monitor -> Website Services "HTTP"
All other next options I left them by default.
Like this the website I wanted to monitor is being reported as "down" in Nagios.
Thanks in advance,
PSA Sines
Re: Monitor an external website
If you ssh into the Nagios server, and ping the website, is it able to resolve the IP address, and get out to the website? It may not get all the way to the website, as your proxy server may not allow it. Try curl <websiteurl> and see if it brings back a bunch of HTML.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor an external website
Hi mbellerue,
From the Nagios server the IP of the website is resolved correctly, although I don't get any replies.
As for the curl, this is the result:
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
Kind regards,
PSA Sines
From the Nagios server the IP of the website is resolved correctly, although I don't get any replies.
As for the curl, this is the result:
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
Kind regards,
PSA Sines
Re: Monitor an external website
Alright, let's try manually building the check. Try this command,
If that works, then we should just make a new command to check via the proxy, and remove the proxy configuration from within the Nagios XI interface. This way all of your other checks will just go over the network, rather than through the proxy.
Code: Select all
/usr/local/nagios/libexec/http_check -I <SiteIP> -b proxyuser:proxypassAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor an external website
Hi,
The http_check doesn't work.
-bash: /usr/local/nagios/libexec/http_check: No such file or directory
Our internal proxy doesn't need username/password.
Do I need to install the http_check command?
Kind regards,
PSA Sines
The http_check doesn't work.
-bash: /usr/local/nagios/libexec/http_check: No such file or directory
Our internal proxy doesn't need username/password.
Do I need to install the http_check command?
Kind regards,
PSA Sines
Re: Monitor an external website
I'm sorry, I had that backwards. It's check_http
Also, if your proxy doesn't require a username/password, then you can skip that part. Let's just see if it tries to go out and reach the site.
Also, if your proxy doesn't require a username/password, then you can skip that part. Let's just see if it tries to go out and reach the site.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor an external website
Hi,
Using http_check?
Thanks in advance,
PSA
Using http_check?
Thanks in advance,
PSA
Re: Monitor an external website
Yes, since your proxy doesn't require authentication, let's just run the command like this.
Code: Select all
/usr/local/nagios/libexec/check_http -I <SiteIP>As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!