Page 1 of 2

Monitoring for NTP in windows OS

Posted: Thu Jul 07, 2016 12:05 am
by Uday Kumar
Hi Team,

Is it possible to monitor NTP configuration in windows.
IF so ,can you please provide us the plugin and steps to define commands and requirements from server end.

If anything else need from my end please let me know.

Thanks & Regards
Uday.

Re: Monitoring for NTP in windows OS

Posted: Thu Jul 07, 2016 2:10 am
by Box293
This plugin on the Nagios exchange should be what you are after:

https://exchange.nagios.org/directory/P ... 29/details

Re: Monitoring for NTP in windows OS

Posted: Tue Jul 12, 2016 9:15 pm
by Uday Kumar
Hi,

As per the link you provided, we have done all the required changes in Nagios server and remote host as well.

When we tried to test the check, locally in remote host we are facing the below attached error.

Can you please help me to sort out this.

Regards
B Uday Kumar

Re: Monitoring for NTP in windows OS

Posted: Tue Jul 12, 2016 10:19 pm
by Box293
I tested this and I found I got the same error when I provided an invalid IP address. When the IP address I provided was able to be contacted it worked OK. Check your firewall to see if the NTP ports are open.

From looking at the script, here is the command the script executes:
Selection_102.png
Selection_102.png (5.55 KiB) Viewed 6323 times
You can see the second attempt is to an unreachable address.

Re: Monitoring for NTP in windows OS

Posted: Tue Jul 12, 2016 10:59 pm
by Uday Kumar
i have tested the NTP port and the command line.
Everything looks fine and executing correctly.

But sill getting same error as earlier when checking the script locally from Remote host.

And in Nagios server we are getting the below error while executing command.

#./check_nrpe -H XXXXXX -c check_ntp_time
No handler for command: check_ntp_time

Re: Monitoring for NTP in windows OS

Posted: Wed Jul 13, 2016 9:39 am
by rkennedy
You'll need to add the command for check_ntp_time to your nsclient.ini file.

Under the section labeled [/settings/external scripts/scripts] in nsclient.ini, add this below -

Code: Select all

command[check_ntp_time]=cscript.exe //T:30 //NoLogo check_time.vbs server1,server2,server3 20 240
Then, restart the NSClient++ (nscp) service, and try once again.

Re: Monitoring for NTP in windows OS

Posted: Wed Jul 13, 2016 11:11 pm
by Uday Kumar
Hi Kennedy,

I have added the line in nsclient.ini file and restarted.

But still getting same error.

# ./check_nrpe -H XXXXXXXXXX -c check_ntp_time
No handler for command: check_ntp_time

Re: Monitoring for NTP in windows OS

Posted: Wed Jul 13, 2016 11:21 pm
by Box293
Please post your nsclient.ini file.

Re: Monitoring for NTP in windows OS

Posted: Thu Jul 14, 2016 12:01 am
by Uday Kumar
Hi ,

Please find the attached nsclient file.

Re: Monitoring for NTP in windows OS

Posted: Thu Jul 14, 2016 12:41 pm
by tgriep
Thanks for the INI file. The example on the Exchange Site isn't correct so if you edit the nsclient.ini file and change this line from

Code: Select all

command[check_ntp_time]=cscript.exe //T:30 //NoLogo check_time.vbs server1,server2,server3 20 240
to

Code: Select all

check_ntp_time=cscript.exe //T:30 //NoLogo check_time.vbs server1,server2,server3 20 240
Restart the NSClient service, it should work for you.

You may have to adjust the path for the check_time.vbs script, for example if you copied the script to the scripts folder, the command would be defined like this.

Code: Select all

check_ntp_time=cscript.exe //T:30 //NoLogo scripts\\check_time.vbs server1,server2,server3 20 240
Try that and let us know if it works for you.