Proxy sites not working in Nagios xi

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
manish2tiwari
Posts: 31
Joined: Thu Sep 13, 2012 12:48 pm

Proxy sites not working in Nagios xi

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Proxy sites not working in Nagios xi

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
manish2tiwari
Posts: 31
Joined: Thu Sep 13, 2012 12:48 pm

Re: Proxy sites not working in Nagios xi

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Proxy sites not working in Nagios xi

Post by scottwilkerson »

What command are you trying to run for the plugin (from the command line) to go through the proxy?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
manish2tiwari
Posts: 31
Joined: Thu Sep 13, 2012 12:48 pm

Re: Proxy sites not working in Nagios xi

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Proxy sites not working in Nagios xi

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
manish2tiwari
Posts: 31
Joined: Thu Sep 13, 2012 12:48 pm

Re: Proxy sites not working in Nagios xi

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Proxy sites not working in Nagios xi

Post 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 
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
manish2tiwari
Posts: 31
Joined: Thu Sep 13, 2012 12:48 pm

Re: Proxy sites not working in Nagios xi

Post 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
manish2tiwari
Posts: 31
Joined: Thu Sep 13, 2012 12:48 pm

Re: Proxy sites not working in Nagios xi

Post 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