Page 1 of 1

nagios core server behind proxy

Posted: Tue Apr 28, 2020 11:02 am
by chand5584
i have installed nagios core server (ubuntu 16.04) behind a proxy. To reach the internet from the machine where i have deployed nagios server, I use proxy settings in the environment. How to make check_http to reach public URL using the proxy. Similarly, i need to reach DNS server also. How do i make Nagios core server use proxy,dns.

please suggest.

Re: nagios core server behind proxy

Posted: Fri May 01, 2020 3:40 pm
by jdunitz
The check_http plugin supports proxying, as long as the proxy does basic auth (not NTLM):

./check_http -I myproxy.mydomain.com -p 8080 -S -j CONNECT -H www.google.com -u https://www.google.com/ -b myusername:mypassword -w 1 -c 5 -v

Hope that helps!
--Jeffrey

Re: nagios core server behind proxy

Posted: Tue May 05, 2020 1:19 pm
by chand5584
I appreciate your help, Jeffrey.

It seems to be working for www.google.com working through proxy..But i have some applications deployed on the public that endpoint URL is with the port as given below. how to reach the below url using a proxy...i am unsure when we have applications with the port number.

example:
http://c0shopapi.westus.cloudapp.azure.com:5102

Re: nagios core server behind proxy

Posted: Tue May 05, 2020 1:53 pm
by chand5584
t@ubuntu-tt:/usr/local/nagios/libexec# ./check_http -I 172.16.0.250 -p 8080 -j CONNECT -H http://c0shopapi.westus.cloudapp.azure.com -u http://c0shopapi.westus.cloudapp.azure.com:5102
connect to address 172.16.0.250 and port 0: Connection refused
HTTP CRITICAL - Unable to open TCP socket

root@ubuntu-tt:/usr/local/nagios/libexec#


how do i pass if my app is having port number in the endpoint.