Page 3 of 4

Re: socket timeout after 30 seconds

Posted: Thu Sep 15, 2016 1:46 pm
by iroy
On server 22, doing "View Text Config" for 24.

Code: Select all

###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date:	      2016-09-15 11:43:54
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND --- 
# Nagios CCM will overwrite all manual settings during the next update if you 
# would like to edit files manually, place them in the 'static' directory or 
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define host {
	host_name			192.168.1.24
	use				xiwizard_website_host
	address				192.168.1.24
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	contacts			nagiosadmin
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	notifications_enabled		1
	icon_image			www_server.png
	statusmap_image			www_server.png
	_xiwizard			websiteurl
	register			1
	}	

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################

Re: socket timeout after 30 seconds

Posted: Thu Sep 15, 2016 1:47 pm
by iroy
On server 24, doing "View Text Config" for 22.

Code: Select all

###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date:	      2016-09-15 11:47:32
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND --- 
# Nagios CCM will overwrite all manual settings during the next update if you 
# would like to edit files manually, place them in the 'static' directory or 
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define host {
	host_name			192.168.1.22
	use				xiwizard_website_host
	address				192.168.1.22
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	contacts			nagiosadmin
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	notifications_enabled		1
	icon_image			www_server.png
	statusmap_image			www_server.png
	_xiwizard			websiteurl
	register			1
	}	

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################

Re: socket timeout after 30 seconds

Posted: Thu Sep 15, 2016 4:19 pm
by tgriep
The xiwizard_website_host template that you are using uses the check_http plugin.
If you change the template to xiwizard_generic_host, that will change the plugin to the check_icmp plugin and that should fix that issue for you.

Re: socket timeout after 30 seconds

Posted: Thu Sep 15, 2016 8:33 pm
by iroy
thanks tgriep.

changed the template to xiwizard_generic_host & used check_icmp

unfortunately still getting 24 is down.

is the problem due to:
_xiwizard websiteurl

Code: Select all

###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date:	      2016-09-15 18:31:26
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND --- 
# Nagios CCM will overwrite all manual settings during the next update if you 
# would like to edit files manually, place them in the 'static' directory or 
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define host {
	host_name			192.168.1.24
	use				xiwizard_generic_host
	address				192.168.1.24
	check_command			check_icmp!200.0,30%!500.0,60%!!!!!!
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	contacts			nagiosadmin
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	icon_image			www_server.png
	statusmap_image			www_server.png
	_xiwizard			websiteurl
	register			1
	}	

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################

Re: socket timeout after 30 seconds

Posted: Fri Sep 16, 2016 10:08 am
by rkennedy
Can you post the exact error you're seeing now?

Also, from the .22 machine, what is the output of ping 192.168.1.24?

Re: socket timeout after 30 seconds

Posted: Fri Sep 16, 2016 12:17 pm
by iroy
vps@vps-cl2:~/scripts$ netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.1.24:27017 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5667 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN




vps@vps-cl2:~/scripts$ ping 192.168.1.22
PING 192.168.1.22 (192.168.1.22) 56(84) bytes of data.
64 bytes from 192.168.1.22: icmp_seq=1 ttl=64 time=0.347 ms
64 bytes from 192.168.1.22: icmp_seq=2 ttl=64 time=0.338 ms
64 bytes from 192.168.1.22: icmp_seq=3 ttl=64 time=0.375 ms
64 bytes from 192.168.1.22: icmp_seq=4 ttl=64 time=0.340 ms
64 bytes from 192.168.1.22: icmp_seq=5 ttl=64 time=0.382 ms
64 bytes from 192.168.1.22: icmp_seq=6 ttl=64 time=0.346 ms
^C
--- 192.168.1.22 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 4996ms
rtt min/avg/max/mdev = 0.338/0.354/0.382/0.027 ms





Node 2:24 <[email protected]>
9:48 AM (24 minutes ago)

***** Nagios XI Alert *****

Nagios has detected a problem with this host.

Notification Type: PROBLEM
Host: 192.168.1.22
State: DOWN
Address: 192.168.1.22
Info: CRITICAL - Socket timeout after 10 seconds
Date/Time: 2016-09-16 09:48:10



Respond: http://192.168.1.24:4321/nagiosxi/rr.ph ... 0e4e8ef4b0
Nagios URL: http://192.168.1.24:4321/nagiosxi/

Re: socket timeout after 30 seconds

Posted: Fri Sep 16, 2016 12:19 pm
by iroy
Configuration on 24.

###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date: 2016-09-16 10:18:52
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define host {
host_name 192.168.1.22
use xiwizard_generic_host
address 192.168.1.22
check_command check_icmp!200.0,30%!500.0,60%!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contacts nagiosadmin
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
icon_image www_server.png
statusmap_image www_server.png
_xiwizard websiteurl
register 1
}

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################

Re: socket timeout after 30 seconds

Posted: Fri Sep 16, 2016 12:22 pm
by iroy
Under "Host Management" -> "Common Settings" if I click on "Test Check Command", i get:

COMMAND: /usr/local/nagios/libexec/check_ping -H 192.168.1.22 -w 200.0,30% -c 500.0,60%
OUTPUT: PING OK - Packet loss = 0%, RTA = 0.43 ms|rta=0.434000ms;200.000000;500.000000;0.000000 pl=0%;30;60;0

Re: socket timeout after 30 seconds

Posted: Fri Sep 16, 2016 1:42 pm
by rkennedy
rkennedy wrote:Can you post the exact error you're seeing now?

Also, from the .22 machine, what is the output of ping 192.168.1.24?
I'd like to troubleshoot one machine at a time. You first mentioned -
unfortunately still getting 24 is down.
So my troubleshooting was based off of this.

It still does not seem the checks are using the proper plugin, as check_icmp would come back CRITICAL saying lost 100% -

Code: Select all

[root@localhost libexec]# ./check_icmp -H 1.1.1.1
CRITICAL - 1.1.1.1: rta nan, lost 100%|rta=0.000ms;200.000;500.000;0; pl=100%;40;80;; rtmax=0.000ms;;;; rtmin=0.000ms;;;;
Please properly identify which machine is .22 and .24, and post the /usr/local/nagios/var/objects.cache for each machine.

Re: socket timeout after 30 seconds

Posted: Fri Sep 16, 2016 2:19 pm
by iroy
thanks lots rkennedy.

what is very important is for 24 to see 22 (app developers tell me the issue of 22 not seeing 24 can be tolerated for now).
& i have ensured that the configuration on the 2 servers are identical.

attaching objects.cache of both the machines.

configuration on server 24.

###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date: 2016-09-16 12:18:06
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define host {
host_name 192.168.1.22
use xiwizard_generic_host
address 192.168.1.22
check_command check_icmp!200.0,30%!500.0,60%!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contacts nagiosadmin
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
icon_image www_server.png
statusmap_image www_server.png
_xiwizard websiteurl
register 1
}

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################