why show Timeout on alarm signal

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

why show Timeout on alarm signal

Post by baber »

dear all
Hi

today i remove one of my linux host from nagios and then another add that all sensord are ok but now for time appear this alarm

ERROR: Timeout on alarm signal

why ? how can solve the problem?

i used attach plugin with these config

this line on server in nrpe.cfg file

Code: Select all

command[check_Time]=/usr/local/nagios/libexec/check_daytime.pl -H ntp server ip -P daytime -w 50 -c 70

and this in nagios serer

Code: Select all

define service{
        use                            generic-service
        host_name                      servername
        service_description            Time
        check_command                  check_nrpe!check_Time
}
BR
Attachments
check_daytime.pl
(9.23 KiB) Downloaded 278 times
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: why show Timeout on alarm signal

Post by Box293 »

Sounds like either a timeout or port is not open:

Try using the -v argument

Not working:

Code: Select all

./check_daytime.pl -H 0.pool.ntp.org -P daytime -w 50 -c 70 -v
Alarm at 10
Connecting to 0.pool.ntp.org using tcp on port 13
Could not connect to 0.pool.ntp.org on tcp port 13
Working:

Code: Select all

./check_daytime.pl -H  ntp.internode.on.net -P daytime -w 50 -c 70 -v
Alarm at 10
Connecting to ntp.internode.on.net using tcp on port 13
daytime protocol: got string 31 AUG 2016 09:06:44 ACST

ntp.internode.on.net time since 1969 is , localhost time is 1472600204, difference is 1472600204
TIME CRITICAL - ntp.internode.on.net time is Thu Jan  1 10:00:00 1970 (1472600204 seconds variance)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: why show Timeout on alarm signal

Post by baber »

Box293 wrote:Sounds like either a timeout or port is not open:

Try using the -v argument

Not working:

Code: Select all

./check_daytime.pl -H 0.pool.ntp.org -P daytime -w 50 -c 70 -v
Alarm at 10
Connecting to 0.pool.ntp.org using tcp on port 13
Could not connect to 0.pool.ntp.org on tcp port 13
Working:

Code: Select all

./check_daytime.pl -H  ntp.internode.on.net -P daytime -w 50 -c 70 -v
Alarm at 10
Connecting to ntp.internode.on.net using tcp on port 13
daytime protocol: got string 31 AUG 2016 09:06:44 ACST

ntp.internode.on.net time since 1969 is , localhost time is 1472600204, difference is 1472600204
TIME CRITICAL - ntp.internode.on.net time is Thu Jan  1 10:00:00 1970 (1472600204 seconds variance)

i get this output

Code: Select all

[root@ntmbweb libexec]# ./check_daytime.pl -H ntp server -P daytime -w 50 -c 70 -v
Alarm at 10
Connecting to ntp server using tcp on port 13
ERROR: Timeout on alarm signal


is that meand port 13 on tcp is close ?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: why show Timeout on alarm signal

Post by Box293 »

That does seem to be the case.

This command from your Nagios server will allow you to see if the port is open:

Code: Select all

nmap -Pn -p T:13 xxx
Where xxx is the address of the ntp server.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: why show Timeout on alarm signal

Post by baber »

Box293 wrote:That does seem to be the case.

This command from your Nagios server will allow you to see if the port is open:

Code: Select all

nmap -Pn -p T:13 xxx
Where xxx is the address of the ntp server.

it seem my tcp port is open

Code: Select all

nmap -Pn -p T:13 ntp server

Starting Nmap 5.21 ( http://nmap.org ) at 2016-08-31 04:44 IRDT
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers
Nmap scan report for ntp server
Host is up (0.00055s latency).
PORT   STATE SERVICE
13/tcp open  daytime

what is my problem?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: why show Timeout on alarm signal

Post by Box293 »

Perhaps your NTP server does not support the method the plugin is using.

Why exactly have you chosen this plugin? What do you actually need ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: why show Timeout on alarm signal

Post by baber »

Box293 wrote:Perhaps your NTP server does not support the method the plugin is using.

Why exactly have you chosen this plugin? What do you actually need ?

i want chk server time with ntp server my os is linux redhat

now this plugin is used on all of my servers and work so good but on this serer not work correctly

how can chk udp port is open on my linux server not on nagios server udp port is 123

br
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: why show Timeout on alarm signal

Post by Box293 »

Code: Select all

nmap xxx -sU -p U:123
Perhaps the daytime protocol is not enabled on your server:
https://en.wikipedia.org/wiki/Daytime_Protocol
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked