Page 1 of 2

Query on the backend of Nagios URL

Posted: Tue Jun 15, 2021 11:52 am
by nagiosadminAD
Hi Team,

The Nagios URL we are currently using is mapped to the static IP of the Nagios server. As an improvement we are trying to get rid of usage of static IP and trying to place the server behind a public facing Application load balancer (ALB) and try to access the Nagios dashboard/URL.

We have created a Application Load balancer, mapped the appropriate listeners to it with ports 5666 and 5667 of Nagios and forwarded traffic from ALB to Nagios server. But the issue we are facing is, the ALB DNS name is throwing 502 bad gateway error.

Could you kindly let us know how the current Nagios URL is working. If we hit http://monitoring.advenio.merckgroup.com/ it is redirecting to http://monitoring.advenio.merckgroup.co ... /login.php which shows 302 as redirection code (attached snap)
Does it have any backend mapping on server configuration for this URL to work?

Could you help us to understand how the current Nagios URL is working and how to access it with our ALB ?

Thanks in advance,
Aparnaa

Kindly CC [email protected] in mail chains.

Re: Query on the backend of Nagios URL

Posted: Tue Jun 15, 2021 2:39 pm
by gsmith
Hi,

Go to Admin, then under System Config in the left-hand menus click on System Settings:
Image2.jpg
Change the URL as required.

Please let me know if this works for you.

Thanks

Re: Query on the backend of Nagios URL

Posted: Wed Jun 16, 2021 11:43 am
by nagiosadminAD
Thanks gsmith for the response.

I have changed the Program URL as you suggested.
The scenario is, the current Nagios URL we are using has a DNS mapping to a static IP. So I am not sure whether changing the program URL is really helping us out.

Because I am able to load the Nagios login page with http://static_IP/nagiosxi/ but not with http://ALB_DNSName/nagiosxi/ even after updating the program URL.

http://ALB_DNSName/nagiosxi/ is throwing 504 bad gateway even after updating the system settings.

Can someone help here?

Thanks in advance,
Aparnaa

Re: Query on the backend of Nagios URL

Posted: Wed Jun 16, 2021 12:21 pm
by gsmith
So when you do:

Code: Select all

nslookup ALB_DNSName
you get the static_IP of the nagios server, right?

Also please provide the output of:

Code: Select all

curl -v  http://ALB_DNSName/nagiosxi/ 
Thanks

Re: Query on the backend of Nagios URL

Posted: Thu Jun 17, 2021 5:25 am
by nagiosadminAD
The results of nslookup and curl command are attached.

Re: Query on the backend of Nagios URL

Posted: Thu Jun 17, 2021 9:35 am
by gsmith
hi,

So the curl shows the ip address to be 3.120.75.166 while the nslookup is showing ip addresses
of 52.28.83.182 and 52.58.86.124. This looks to be a DNS or Load Balancer configuration
issue.

Also, within the curl command the request is being redirected from a http:// url to an https://
url. Do you have Nagios configured to run SSL?

Thanks

Re: Query on the backend of Nagios URL

Posted: Fri Jun 18, 2021 4:07 am
by nagiosadminAD
Attaching the curl and nslookup results again. Now i can both the commands showing same IPs .

Also the current Nagios URL we are using is http://monitoring.advenio.merckgroup.co ... /index.php? and it works with http protocol.

Re: Query on the backend of Nagios URL

Posted: Fri Jun 18, 2021 9:11 am
by gsmith
Hi

Great!

To use https protocol follow this document:
https://assets.nagios.com/downloads/nag ... s%20XI.pdf

Let me know if you have any more questions.

Thanks

Re: Query on the backend of Nagios URL

Posted: Mon Jun 21, 2021 5:08 am
by nagiosadminAD
Hi,

Could you let me know is the Nagios url not secure is the problem in connecting via Load balancer DNS name?

Thanks,
Aparnaa

Re: Query on the backend of Nagios URL

Posted: Mon Jun 21, 2021 9:13 am
by gsmith
Correct. If you look at the curl command the request is being redirected
to the secure url:https://alb-nagios-xi-1627099631.en-cen ... /nagiosxi/

So you need to set up the nagios server to use SSL

Thanks