Nagios Service reports wrong server

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

Nagios Service reports wrong server

Post by JohnFLi »

another day, another issue.....

I have 2 servers FMS1 and FMS2 (both are windows machines)
If I stop the nagios service on FMS1....in Nagios, it reports that the services for FMS02 cannot be reached (bad)
If I stop the nagios service on FMS02… in Nagios, it reports that the services for FMS02 cannot be reached (good)

From the CLI on the nagios server, i pinged both names and was returned the correct IP address for both machines.
I checked all the services, and host and the "Manage Hosts" button shows the correct server..

Any place else to look?
Everybody is somebody else’s weirdo
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios Service reports wrong server

Post by rkennedy »

Can you post your related host / service definition that is causing these issues?
Former Nagios Employee
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: Nagios Service reports wrong server

Post by JohnFLi »

below is one of them.
If the below machine was no longer pingable, the Nagios display would say FMS02 wasn't pinging.
This issue is with ALL the services with FMS01

Code: Select all

define service {
	host_name			FMS01
	service_description		Ping
	use				xiwizard_windowsserver_ping_service
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			names
	_xiwizard			windowsserver
	register			1
	}	
	

Code: Select all

define host {
	host_name			FMS01
	use				xiwizard_windowsserver_host
	address				FMS01
	hostgroups			Virtual,Windows-Servers
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	contacts			Names
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	first_notification_delay	0
	notifications_enabled		1
	icon_image			win_server.png
	statusmap_image			win_server.png
	_xiwizard			windowsserver
	register			1
	}	
Everybody is somebody else’s weirdo
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios Service reports wrong server

Post by rkennedy »

When you are pinging the machines, are you using the DNS or the IP? Do you have anything hard coded in /etc/hosts?
Former Nagios Employee
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: Nagios Service reports wrong server

Post by JohnFLi »

DNS..... I ping the name
Everybody is somebody else’s weirdo
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios Service reports wrong server

Post by lmiltchev »

Can you show us the host/service definition for FMS02 too?

Run the following commands and show the output:

Code: Select all

nslookup FMS01
nslookup FMS02
Does the problem go away if you use the IP address instead of FQDN?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: Nagios Service reports wrong server

Post by JohnFLi »

Code: Select all

define host {
	host_name			G1VPFMS02
	use				xiwizard_windowsserver_host
	address				G1VPFMS02
	hostgroups			Virtual,Windows-Servers
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	contacts			Names go here
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	first_notification_delay	0
	notifications_enabled		1
	icon_image			win_server.png
	statusmap_image			win_server.png
	_xiwizard			windowsserver
	register			1
	}	

Code: Select all

[root@G1VPNAG03 ~]# nslookup g1vpfms01
Server:		10.100.1.84
Address:	10.100.1.84#53

Name:	g1vpfms01.domain.local
Address: 10.100.1.24

Windows IP Configuration
Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 10.100.1.24
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.100.1.1

Code: Select all

[root@G1VPNAG03 ~]# nslookup g1vpfms02
Server:		10.100.1.84
Address:	10.100.1.84#53

Name:	g1vpfms02.domain.local
Address: 10.100.1.72

Windows IP Configuration
Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 10.100.1.72
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.100.1.1

Everybody is somebody else’s weirdo
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: Nagios Service reports wrong server

Post by JohnFLi »

For the Love of God!!!!!

I found the issue
Some person, who I will need to disembowel, changed the server that the services applet on FMS01 to connect to FMS02.
Basicly, that explains why FMS01 never saw the powershell code in the ini file, and why when I went to stop the nsclient services on FMS01, nagios reported FMS02 was down.

Everything is working fine now.

You can close this issue.
Everybody is somebody else’s weirdo
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios Service reports wrong server

Post by lmiltchev »

These things happen sometimes. :) I am glad your issue has been resolved!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked