1 system will not talk to Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
JohnFLi
Posts: 565
Joined: Mon Jun 17, 2013 3:11 pm

1 system will not talk to Nagios

Post by JohnFLi »

Nagios: 2026R1.5

migrating Nagios from 1 OS to a different OS

working system:
Centos7
2026R1.5

not working system
Ubuntu 24.04
2026R1.5

Migration went fine...nothing major.
after migration, renamed the new machine to the same name as the old machine....gave it the old IP address as well.

ALL hosts and services are happy----------- EXCEPT 1
sometimes it will talk to it and say a service or a check is good, other times it says it can't talk to it.
i ran https://servername:5693/testconnect/?token=123456
on the client machine, is was happy

Code: Select all

{
  "value": "Success."
}
ran the same on the new nagios machine.....it also said it was happy

so i delete the trouble maker out of nagios. ran the wizard for the windows machine (2019)
I enter the name for the server, leave the port as default and enter the token

it thinks for a few moments, then returns:

Code: Select all

Connection timeout.  Failure connecting to NCPA {GDFNA:001]
E_WARNING:  http://servername:5693/api/disk?token=<your_token>
Failed to open stream
Connection Time out
for fun, i disable the nic on the NEW nagios machine, re-enable the nic on the OLD nagios machine....

and it talks just fine.
Tells me there is somethign on the unbuntu machine that is the issue....any ideas??
Everybody is somebody else’s weirdo
cdietsch
Posts: 77
Joined: Wed Aug 06, 2025 9:12 am

Re: 1 system will not talk to Nagios

Post by cdietsch »

Hi @JohnFLi,

This sounds to me like some sort of networking issue on the new Ubuntu 24.04 XI server. Are you by chance using IPv6 or a mix of IPv6 and IPv4? Are you trying to resolve a hostname and not an IP address from the XI Wizard? It could be there are both IPv6 and IPv4 namerecords and there is some type of issue going on there.

Here are some commands that might be helpful troubleshooting this issue:

Run on Ubuntu:

Code: Select all

getent ahosts servername
or

Code: Select all

dig servername
dig AAAA servername
If you see IPv6 entries, test:

Code: Select all

curl -4 https://servername:5693/api/system/agent_version?token=mytoken -k
and:

Code: Select all

curl -6 https://servername:5693/api/system/agent_version?token=mytoken -k
If -4 works and -6 hangs → found it.
Cheers,
- Cole
User avatar
JohnFLi
Posts: 565
Joined: Mon Jun 17, 2013 3:11 pm

Re: 1 system will not talk to Nagios

Post by JohnFLi »

Thank you for your response.

I have ipv6 disabled.

I will see it if likes IP address instead of hostname. worse comes to worse i will manually add it.

I will try your other suggestions and see how it goes.
Everybody is somebody else’s weirdo
User avatar
JohnFLi
Posts: 565
Joined: Mon Jun 17, 2013 3:11 pm

Re: 1 system will not talk to Nagios

Post by JohnFLi »

I tried the suggestions given....but one thign i found odd.

I tried the normal wizard....failed as expeceted.
Tried again with its IP address....worked, and even gave the correct FQDN
correctservername.jpg
I backed out so that i could create documentation....second time, it gave a bad name
wrongservername.jpg
Checked the DNS servers....the wrong name it returned doesn't exist. and the IP address only has 1 name tied to it,

Next i checked the REVERSE lookup zone...... there it was...the IP address had 3 names tied to it.....which is very odd.
I deleted the bad names....rebooted teh nagios server and tried again...

Still returning the wrong name when I try to add using the IP address.

and Ideas?
You do not have the required permissions to view the files attached to this post.
Everybody is somebody else’s weirdo
cdietsch
Posts: 77
Joined: Wed Aug 06, 2025 9:12 am

Re: 1 system will not talk to Nagios

Post by cdietsch »

Hey @JohnFLi ,

That does sound like there are some weird DNS/caching things going on. However, you should be able to edit the hostname to the correct one in the wizard.
Cheers,
- Cole
User avatar
JohnFLi
Posts: 565
Joined: Mon Jun 17, 2013 3:11 pm

Re: 1 system will not talk to Nagios

Post by JohnFLi »

I cheated.
I added the server name : IP to the /etc/hosts file problem solved.

but at least this got me to clean up my reverse look up zone a little bit.

just odd that nagios on centos didn't seem to care. (i did check the host file there and it wasnt in it)

This item can be locked.
Everybody is somebody else’s weirdo
cdietsch
Posts: 77
Joined: Wed Aug 06, 2025 9:12 am

Re: 1 system will not talk to Nagios

Post by cdietsch »

Glad you were able to find a solution that worked for you!

Yeah it's difficult to trace DNS and caching issues like that, who knows, maybe Cent 7 didn't have DNS cache enabled but the new Ubuntu server does, or there is something caching requests in front of one of the servers but not the other. It's hard to say.

I will lock this thread as requested.
Cheers,
- Cole
Locked