NTP time check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
twigg0
Posts: 20
Joined: Thu May 10, 2012 7:55 am

NTP time check

Post by twigg0 »

Hi all,
I want to configure this plugin --> http://exchange.nagios.org/directory/Pl ... 29/details in Nagios XI.
On the server I want to check I've installed Nsclient. Is it a passive checks?
How can I configure it in Nagios XI?
Do I need to modify NSC.ini and then?

Thanks in advance

twigg0
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NTP time check

Post by lmiltchev »

This is a third party plugin and I am not familiar with it, however with any plugin, you can follow our general guidelines on managing plugins in Nagios XI:

http://assets.nagios.com/downloads/nagi ... ios_XI.pdf

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
twigg0
Posts: 20
Joined: Thu May 10, 2012 7:55 am

Re: NTP time check

Post by twigg0 »

Thanks 4 reply...
I know that procedure for plugins, but this one is a passive checks I think...because the plugin is installed on the machine I have to monitoring...
However is there a procedure 4 this particular plugins?

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NTP time check

Post by scottwilkerson »

This was community contributed so I'm not totally familiar however it looks like there is some instructions on the page
http://exchange.nagios.org/directory/Pl ... 29/details

You would need to be sure NRPE is enabled on NSClient++

the line something like this would be added to the nsc.ini

Code: Select all

command[check_ntp_time]=cscript.exe //T:30 //NoLogo check_time.vbs server1,server2,server3 20 240
and would call it from nagios server with something like

Code: Select all

./check_nrpe -H <HOSTADDRESS> -c check_ntp_time
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: NTP time check

Post by mikew »

Once you download the vbs script to the nsclient and the scripts directory, modify your nsc.ini. Note carefully the path to the vbs script and also note in this example two real time servers are added.

The NRPE section needs to allow the port, the arguments and the meta characters.

[NRPE]
port=5666
allow_arguments=1
allow_nasty_meta_chars=1

In the External Scripts section you will need to add this line all on one line. Notice the path to the scripts directory and the two time servers which are listed. These two time servers came from the ntp.org site so you can use the ones you choose.

[External Scripts]
check_ntp_time=cscript.exe //T:30 //NoLogo scripts/check_time.vbs 1.us.pool.ntp.org,2.us.pool.ntp.org 20 240

Test your setup by going to the Nagios server and the plugins directory to execute the script.

./check_nrpe -H 192.168.5.224 -c check_ntp_time
NTP OK: Offset +62.6480990 secs|'offset'=+62.6480990s;20;240;

Here you can see the time offset and that the script is working fine.

Now you will want to create the command for the plugin on XI by going to Configure/Core Config Manager/Commands/Commands and selecting New.

Creating this command is simple as you are using a check_nrpe plugin and the command is check_ntp_time that you defined in the nsc.ini
Once you create it save and apply.

Now create your service check and reference the command you created.
Mike Weber

Nagios Training/Consulting
Locked