nagios core server behind proxy

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
chand5584
Posts: 3
Joined: Tue Apr 28, 2020 9:08 am

nagios core server behind proxy

Post 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.
User avatar
jdunitz
Posts: 235
Joined: Wed Feb 05, 2020 2:50 pm

Re: nagios core server behind proxy

Post 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
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!
chand5584
Posts: 3
Joined: Tue Apr 28, 2020 9:08 am

Re: nagios core server behind proxy

Post 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
chand5584
Posts: 3
Joined: Tue Apr 28, 2020 9:08 am

Re: nagios core server behind proxy

Post 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.
Locked