Hello,
I am using Check_windows_time.bat plugin to monitor windows servers time in Nagios but am getting below unknown error frequently for all the servers. Please suggest me to fix this unknown error.
UNKNOWN: Unable to query NTP service at NTPServerName (Port 123 blocked/closed)
http://exchange.nagios.org/directory/Pl ... 29/details
Thanks,
Imran Khan.
Unable to query NTP service
Re: Unable to query NTP service
Can you share with us the exact command that you are executing?
Has it ever worked?
If it has, what's changed?
The "Port 123 blocked" message indicates that the NTP server you're trying to query either doesn't let you connect or there is a firewall port that needs to be opened.
Has it ever worked?
If it has, what's changed?
The "Port 123 blocked" message indicates that the NTP server you're trying to query either doesn't let you connect or there is a firewall port that needs to be opened.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
-
imran_khan
- Posts: 196
- Joined: Mon May 27, 2013 3:16 pm
Re: Unable to query NTP service
Hello,
NTP port 123 is not blocked in firewall. Plugin is working fine but frequently time service is showing in unknown error section.
Command:-
define command{
command_name check_windows_time
command_line $USER1$/check_nrpe -t 30 -H $HOSTADDRESS$ -c check_windows_time -a $ARG1$ $ARG2$ $ARG3$
}
Nsc.ini entry:-
check_windows_time=C:\Nagios++\scripts\check_windows_time.bat $ARG1$ $ARG2$ $ARG3$
Command in service file:-
check_command check_windows_time!time.windows.com!60!180
Thanks,
Imran Khan.
NTP port 123 is not blocked in firewall. Plugin is working fine but frequently time service is showing in unknown error section.
Command:-
define command{
command_name check_windows_time
command_line $USER1$/check_nrpe -t 30 -H $HOSTADDRESS$ -c check_windows_time -a $ARG1$ $ARG2$ $ARG3$
}
Nsc.ini entry:-
check_windows_time=C:\Nagios++\scripts\check_windows_time.bat $ARG1$ $ARG2$ $ARG3$
Command in service file:-
check_command check_windows_time!time.windows.com!60!180
Thanks,
Imran Khan.
Re: Unable to query NTP service
How often are you checking? Microsoft may be rate limiting you on their end, thinking that you're trying to DOS them, and essentially block you with their version of fail2ban for some time.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
-
imran_khan
- Posts: 196
- Joined: Mon May 27, 2013 3:16 pm
Re: Unable to query NTP service
Hello,
Where I can check this?
Limiting limit might be the issue, because I have changed NTP server name from time.windows.com to pool.ntp.org then unknown error time is increased but still it is going in unknown section.
Thanks,
Imran Khan.
Where I can check this?
Limiting limit might be the issue, because I have changed NTP server name from time.windows.com to pool.ntp.org then unknown error time is increased but still it is going in unknown section.
Thanks,
Imran Khan.
Re: Unable to query NTP service
This is just a guess. I do not know for sure. You might want to open a ticket with Microsoft to ask.
Or you can increase your time between checks so that you are not constantly checking Microsoft's time server. It really is not a big deal to not be able to communicate with an NTP time server. Once the time has been synchronized, very few adjustments need to be made. You could probably check once per day and it will still be a valid check.
Or you can increase your time between checks so that you are not constantly checking Microsoft's time server. It really is not a big deal to not be able to communicate with an NTP time server. Once the time has been synchronized, very few adjustments need to be made. You could probably check once per day and it will still be a valid check.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
-
imran_khan
- Posts: 196
- Joined: Mon May 27, 2013 3:16 pm
Re: Unable to query NTP service
Hello,
How often this plugin checking? We have to sync/check time of all the servers continuously.
Thanks,
Imran Khan.
How often this plugin checking? We have to sync/check time of all the servers continuously.
Thanks,
Imran Khan.
Re: Unable to query NTP service
But this plugin is no syncing time, it is checking that a time server is available. Your NTP client running on the machine can run for hours or even days without drifting more than a second off of real time. So what I am suggesting is that time.microsoft.com may see you testing it every minute or two minutes or five minutes from all of your hosts, and think initiate some sort of rate limiting.
I am suggesting that you change your check_ntp to be more like once every four hours.
What you should be checking at small intervals is that your NTP client is working, not the NTP server.
I am suggesting that you change your check_ntp to be more like once every four hours.
What you should be checking at small intervals is that your NTP client is working, not the NTP server.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
-
imran_khan
- Posts: 196
- Joined: Mon May 27, 2013 3:16 pm
Re: Unable to query NTP service
Hello,
I am monitoring windows servers time in nagios using check_windows_time not check_ntp plugin.
Is there any time setting for check_windows_time plugin?
Thanks,
Imran Khan.
I am monitoring windows servers time in nagios using check_windows_time not check_ntp plugin.
Is there any time setting for check_windows_time plugin?
Thanks,
Imran Khan.
Re: Unable to query NTP service
I think we're getting off topic. I am saying that you are checking the NTP server time.windows.com frequently, and maybe Microsoft is rate limiting you for checking so often, and therefore, you are getting added to a temporary firewall rule of theirs. This would cause the symptom that you're seeing.
Because of this, I am suggesting that you change the check_interval from a few minutes to a few hours and see if that helps.
Because of this, I am suggesting that you change the check_interval from a few minutes to a few hours and see if that helps.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!