Hi,
We need some support on the monitoring of time difference between our NTP server and Windows and Linux hosts.
I already used the check_np_time(checks with NAGIOS Srv) and chack_daytime.
Thank you for your help.
Best Regards,
NTP sync on Windows and Linux hosts
Re: NTP sync on Windows and Linux hosts
Are you having a specific problem or need help with implementing it a certain way? The default plugins come with ntp plugins and there are ntp plugins for the Windows OS on the exchange:
http://nagios-plugins.org/doc/man/index.html
https://exchange.nagios.org/index.php?o ... %20windows
http://nagios-plugins.org/doc/man/index.html
https://exchange.nagios.org/index.php?o ... %20windows
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NTP sync on Windows and Linux hosts
Hello,
I created a command for check_ntp_time
$USER1$/check_ntp_time -H $ARG1$ -w $ARG2$ -c $ARG3$
$ARG1$ our NTPserver
And put the service on windows 10 computer with 90 seconds delay and the result is:
NTP OK: Offset 0.0003350973129 secs
Best regards
I created a command for check_ntp_time
$USER1$/check_ntp_time -H $ARG1$ -w $ARG2$ -c $ARG3$
$ARG1$ our NTPserver
And put the service on windows 10 computer with 90 seconds delay and the result is:
NTP OK: Offset 0.0003350973129 secs
Best regards
Re: NTP sync on Windows and Linux hosts
That looks like a good response. Are there any problems or can we consider this thread closed?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NTP sync on Windows and Linux hosts
i'm sorry but this not a good response.
If the host(windows computer) is not sync the response has to be "critical" not ok.
No matter the host(windows computer) time the response is always the same.
So this is NOT working fine.
NTP OK: Offset 0.0003350973129 secs - NOT the CORRECT response
If the host(windows computer) is not sync the response has to be "critical" not ok.
No matter the host(windows computer) time the response is always the same.
So this is NOT working fine.
NTP OK: Offset 0.0003350973129 secs - NOT the CORRECT response
Re: NTP sync on Windows and Linux hosts
Could you expand more on exactly what you did here?psasines wrote: And put the service on windows 10 computer with 90 seconds delay and the result is:
All check_ntp_time does is, from the machine on which it is run, compare the local time to what the NTP server (provided with -H) reports:
Code: Select all
This plugin checks the clock offset between the local host and a
remote NTP server. It is independent of any commandline programs or
external libraries.If you would like Nagios Core to be responsible for monitoring NTP offsets on a particular remote machine, you'd typically be leveraging an agent (like NSClient++ or NCPA) to handle those "remote executions". What (if any) agent are you currently using on the remote Windows 10 machine?
This thread has a similar use case and implementation, in which case the agent being used is NSClient++ to execute commands on the remote Windows machine:
https://support.nagios.com/forum/viewto ... =7&t=39227
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: NTP sync on Windows and Linux hosts
Thanks for clarifying, @mcapra!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NTP sync on Windows and Linux hosts
Thank you for your help.
I implemented this on my Windows Hosts
$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_windows_time
And changed the nsclient.ini to get the arguments for hte check_windows_time.vbs script.
IT's OK.
Now i need to make some similar with the Linux hosts, i'm tryng to configure the native NAGIOS XI plugin check_ntp_time:
$USER1$/check_ntp_time -H $ARG1$ -w $ARG2$ -c $ARG3$
Do i have to copy the file to the linux hosts? And where to?
Tank you.
I implemented this on my Windows Hosts
$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_windows_time
And changed the nsclient.ini to get the arguments for hte check_windows_time.vbs script.
IT's OK.
Now i need to make some similar with the Linux hosts, i'm tryng to configure the native NAGIOS XI plugin check_ntp_time:
$USER1$/check_ntp_time -H $ARG1$ -w $ARG2$ -c $ARG3$
Do i have to copy the file to the linux hosts? And where to?
Tank you.
Re: NTP sync on Windows and Linux hosts
check_ntp_time is a part of the default plugins and should be installed when the agent is installed - https://support.nagios.com/kb/article/n ... rpe-8.html. Once the agent is installed you would need to edit nrpe.cfg to include a line like:
command[check_ntp_time]=/usr/local/nagios/libexec/check_ntp_time -H pool.ntp.org
(replacing pool.ntp.org) with whatever ntp server you wanted to check against.
After restarting the agent to load the new command, the command can be run from the XI machine using check_nrpe again:
/usr/local/nagios/libexec/check_nrpe -H remote_linux_machine_ip -c check_ntp_time
command[check_ntp_time]=/usr/local/nagios/libexec/check_ntp_time -H pool.ntp.org
(replacing pool.ntp.org) with whatever ntp server you wanted to check against.
After restarting the agent to load the new command, the command can be run from the XI machine using check_nrpe again:
/usr/local/nagios/libexec/check_nrpe -H remote_linux_machine_ip -c check_ntp_time
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.