Page 1 of 1

Nagios Service reports wrong server

Posted: Tue Jan 19, 2016 1:39 pm
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?

Re: Nagios Service reports wrong server

Posted: Tue Jan 19, 2016 2:12 pm
by rkennedy
Can you post your related host / service definition that is causing these issues?

Re: Nagios Service reports wrong server

Posted: Tue Jan 19, 2016 3:02 pm
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
	}	

Re: Nagios Service reports wrong server

Posted: Tue Jan 19, 2016 3:41 pm
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?

Re: Nagios Service reports wrong server

Posted: Tue Jan 19, 2016 3:59 pm
by JohnFLi
DNS..... I ping the name

Re: Nagios Service reports wrong server

Posted: Wed Jan 20, 2016 10:39 am
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?

Re: Nagios Service reports wrong server

Posted: Wed Jan 20, 2016 11:22 am
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


Re: Nagios Service reports wrong server

Posted: Wed Jan 20, 2016 4:58 pm
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.

Re: Nagios Service reports wrong server

Posted: Wed Jan 20, 2016 5:13 pm
by lmiltchev
These things happen sometimes. :) I am glad your issue has been resolved!