Page 1 of 2

Proxy sites not working in Nagios XI

Posted: Sun Sep 23, 2012 12:18 pm
by manish2tiwari
Hi Friends,

I am facing difficulties in monitoring sites which are using proxies in our intranet, I have configured proxy components in Nagios XI and am able to see proxy option at the left hand side of Admin screen, have provided the proxy details there but still no luck, is there anything i might be missing?

Thanks,
Manish

Re: Proxy sites not working in Nagios XI

Posted: Sun Sep 23, 2012 3:01 pm
by scottwilkerson
the proxy component in XI is only for configuring the XI interface to be able to do things like check for updates.

This will not affect check plugins what-so-ever.

You will likely need to add a new plugin like
http://exchange.nagios.org/directory/Pl ... tp/details

Re: Proxy sites not working in Nagios XI

Posted: Mon Sep 24, 2012 6:28 am
by manish2tiwari
Hi Scott,

I have installed proxy plugin file but still not able to go through the proxy sites, is there any other plugins i should try?

Many Thanks,
Manish

Re: Proxy sites not working in Nagios XI

Posted: Mon Sep 24, 2012 7:21 am
by scottwilkerson
What command are you trying to run for the plugin (from the command line) to go through the proxy?

Re: Proxy sites not working in Nagios XI

Posted: Mon Sep 24, 2012 12:04 pm
by manish2tiwari
Hi Scott,

I have included check_proxy.sh file in the plugin and included check_proxy, check_curl_http command in commands.cfg and i am running check_proxy http://$HOSTADDRESS$:8080/ command in command prompt.

along with it i am trying check_http -H proxy.site.url but it is saying unable to open TCP socket.

Thanks,
Manish

Re: Proxy sites not working in Nagios XI

Posted: Mon Sep 24, 2012 1:49 pm
by scottwilkerson
First we need to make sure we can get this running from the command line. If you cannot get that to work there is no need trying to make it work in Nagios.

You will have to post all related files so we can follow what you are trying to accomplish.

Please post all script you are trying to run and the exact command you are trying to run from the command line.


Thanks

Re: Proxy sites not working in Nagios XI

Posted: Tue Sep 25, 2012 1:02 pm
by manish2tiwari
Hi Scott,

Below is the command i am checking:

./check_http -H proxy.site.url -p proxy.port

Could you please tell me few commands that i should use for testing.

thanks,
Manish

Re: Proxy sites not working in Nagios XI

Posted: Tue Sep 25, 2012 1:12 pm
by scottwilkerson
check_http will not work through a proxy as there is no way to configure it. This is why I suggested
http://exchange.nagios.org/directory/Pl ... tp/details


You can use this with a command like so

Code: Select all

php check_curl_http.php -U https://test.example.net -P myproxy.company.com:8080 -Pu proxyuser:password -F -G somesearchstring 

Re: Proxy sites not working in Nagios XI

Posted: Wed Sep 26, 2012 3:21 am
by manish2tiwari
Hi Scott,

The command php check_curl_http.php -U https://test.example.net -P myproxy.company.com:8080 -Pu proxyuser:password -F -G somesearchstring

in the Nagios server command prompt is showing 200 OK status for the proxy sites, That's great and some improvement.

Now i am trying to monitor the proxy sites from NagiosXI GUI and have updated the service for that host as check_curl_http and passing arguments as the proxy site url and proxy ip but getting status like below:

php [options] -r <code> [--] [args...]
php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
php [options] -- [args...]
php [options] -a

-a Run as interactive shell
-c <path>

Is there any configuration i have missed or for proxy site do we have different configuration procedure.

Thanks,
Manish

Re: Proxy sites not working in Nagios XI

Posted: Wed Sep 26, 2012 9:21 am
by manish2tiwari
Updating on below..

This is my command line in NagiosXI when i check the configuration of my proxy host.

check_curl_http! -U <http://monitored proxy site> -P http://<proxy.site.ip>!!!!!!!

But this is showing below data instead of server status:

Usage: php [options] [-f] <file> [--] [args...]
php [options] -r <code> [--] [args...]
php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
php [options] -- [args...]
php [options] -a

-a Run as interactive shell
-c <path>


Thanks,
MANISH