Hi All,
apologies if this has been asked a lot but I did some searching and couldn't find an answer. I am running the VMWare trial of Nagios XI. Most of the servers and services I want to monitor are internal, behind the site's router and proxy server, but I want to monitor a couple of websites on the Internet.
I can't get Nagios to get through to the website I'm trying to monitor as I don't know how to configure the http check to take the proxy into account. I did try downloading the proxy package as indicated in the FAQ, but that didn't work and it does seem to be only concerned with checking for updates.
Our web browsers are setup with a proxy pac file, but I do have access to a specific port which doesn't require any configuration, usernames or passwords. Generally in the computer I can set the proxy to be http://xx.xx.xx.xx port 800 and then the computer will happily access the internet.
Is there some way I can configure the http check to do this? I saw one post which suggested the -l option but I couldn't seem to get this to work.
The error I'm currently getting is CRITICAL - Socket timeout after 10 seconds. I am assuming this is due to the proxy issue at this stage.
Many thanks,
Chris.
Website check behind proxy server
Re: Website check behind proxy server
stebbo,
Take a look at check_http_proxy
http://exchange.nagios.org/directory/Pl ... xy/details
here is how you would point your check at the proxy server:
Regards,
-Yancy
Take a look at check_http_proxy
http://exchange.nagios.org/directory/Pl ... xy/details
here is how you would point your check at the proxy server:
Code: Select all
check_http_proxy --proxy=proxy:port --auth=user:pass --url=url --timeout=10.5 --warntime=5.0 --expect=content -Yancy
Re: Website check behind proxy server
Hello Yancy,
thanks for the response. I have installed that package and it shows as being present when I check the packages.
I have clicked on Views, Service Details, clicked on the service, clicked configure and Reconfigure this service. I enter the following command into the field labelled
"Monitor this service with this command (advanced users only"
but when I click update the system gives me an error as below. I also tried it with just one - for each argument not the two shown above.
I would be grateful for any further assistance anyone could provide.
Cheers,
Chris.
thanks for the response. I have installed that package and it shows as being present when I check the packages.
I have clicked on Views, Service Details, clicked on the service, clicked configure and Reconfigure this service. I enter the following command into the field labelled
"Monitor this service with this command (advanced users only"
Code: Select all
check_http_proxy --proxy=10.174.64.19:800 --url=www.lilydalehs.vic.edu.au --timeout=10.5 --warntime=5.0 --expect=contentCode: Select all
Configuration submitted for processing...
Waiting for configuration verification....
Configuration verification failed.Cheers,
Chris.
Re: Website check behind proxy server
stebbo,
I'm not sure if you did this, but the script needs to be placed in your libexec directory of Nagios. You can use WinSCP or some other SCP client to copy the file to Nagios.
Once the file is store to libexec, try running from the command line.
if this runs successfully, the check can be added to core config manger in Nagios.
Regards,
-Yancy
I'm not sure if you did this, but the script needs to be placed in your libexec directory of Nagios. You can use WinSCP or some other SCP client to copy the file to Nagios.
Once the file is store to libexec, try running from the command line.
Code: Select all
cd /usr/local/nagios/libexec
./check_http_proxy --proxy=10.174.64.19:800 --url=www.lilydalehs.vic.edu.au --timeout=10.5 --warntime=5.0 --expect=contentRegards,
-Yancy
Re: Website check behind proxy server
Hello Yancy,
thanks for the reply. I can successfully run the following command from the command line
but I still can't get the service to update correctly within the nagios UI.
When I go to the core config manager, the command "check_http_proxy" is not listed in the drop down list. The script is in the /usr/local/nagios/libexec folder however. I must have missed some step when adding the package?
If I click views, then click on the service and go to advanced configuration, I can type the command in but it doesn't like it when I try to update the configuration. Not sure what to try next.
Cheers,
Chris.
thanks for the reply. I can successfully run the following command from the command line
Code: Select all
check_http_proxy --proxy=10.174.64.19:800 --url=http://www.lilydalehs.vic.edu.au --timeout=10.5 --warntime=5.0 --expect=contentWhen I go to the core config manager, the command "check_http_proxy" is not listed in the drop down list. The script is in the /usr/local/nagios/libexec folder however. I must have missed some step when adding the package?
If I click views, then click on the service and go to advanced configuration, I can type the command in but it doesn't like it when I try to update the configuration. Not sure what to try next.
Cheers,
Chris.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Website check behind proxy server
Yes you did, you need to add the command in the CCM. Instructions herestebbo wrote:
When I go to the core config manager, the command "check_http_proxy" is not listed in the drop down list. The script is in the /usr/local/nagios/libexec folder however. I must have missed some step when adding the package?
http://library.nagios.com/library/produ ... -nagios-xi
Re: Website check behind proxy server
Thanks Scott and Yancy,
That document Scott linked to was exactly what I needed. I now have the website check working well.
Being a newbie I wasn't aware of having to add that command to the system. Might I recommend that a link to that document is placed on the "manage plugins" page? I just assumed that uploading the plugin was all I needed to do. There are a few other pages which have links to instructions and helpful hints which have helped me greatly so far.
I am very impressed with the software and the service. Thanks again.
Cheers,
Chris.
That document Scott linked to was exactly what I needed. I now have the website check working well.
Being a newbie I wasn't aware of having to add that command to the system. Might I recommend that a link to that document is placed on the "manage plugins" page? I just assumed that uploading the plugin was all I needed to do. There are a few other pages which have links to instructions and helpful hints which have helped me greatly so far.
I am very impressed with the software and the service. Thanks again.
Cheers,
Chris.