Page 1 of 1

monitoring Linux Server Time using NCPA

Posted: Mon Feb 01, 2021 5:23 pm
Hi Team,

when i am monitoring NTP with NCPA i am getting output as OK: Time was 1334814623.69


where as system time and date is Thu 19 Apr 2012 11:22:34 AM IST


even if system time is wrong i am getting as OK. how to i get NTP monitored

Re: monitoring Linux Server Time using NCPA

Posted: Tue Feb 02, 2021 3:29 pm
by benjaminsmith
Hi [email protected],

Can you run the full check command from the CLI on the Nagios XI server so we can take look at the plugin you are using any arguments being passed? Please post the full output to the thread as well.

Nagios XI - How To Test Check Commands From The Command-line

Thanks,
Benjamin

Re: monitoring Linux Server Time using NCPA

Posted: Sat Feb 06, 2021 12:23 pm
HI Team,

everything is working fine, in NCPA how t i monitor the NTP service?

Re: monitoring Linux Server Time using NCPA

Posted: Mon Feb 08, 2021 11:47 am
by benjaminsmith
HI,
when i am monitoring NTP with NCPA i am getting output as OK: Time was 1334814623.69
Which plugin are you using to monitor NTP?

Benjamin

Re: monitoring Linux Server Time using NCPA

Posted: Thu Feb 11, 2021 11:53 am
in ncpa, i am not using any plugin, I am using system/ntp

Re: monitoring Linux Server Time using NCPA

Posted: Fri Feb 12, 2021 12:03 pm
by benjaminsmith
The,

The system module in NCPA is for getting basic information and does not have the ability to perform many checks.
{
"system": {
"node": "localhost.localdomain",
"machine": "x86_64",
"uptime": [
1456124,
"s"
],
"version": "#1 SMP Fri Apr 20 16:44:24 UTC 2018",
"time": 1613148917.61594,
"release": "3.10.0-862.el7.x86_64",
"timezone": [
"CST",
"CDT"
],
"agent_version": "2.2.2",
"system": "Linux",
"processor": "x86_64"
}
}
See: https://www.nagios.org/ncpa/help.php#api-modules-system

If you want to check the offset of the system time against a NTP server, I would recommend using check_ntp_time (part of the nagios plugins).

See: https://www.monitoring-plugins.org/doc/ ... _time.html

You'll have to install on the NCPA server and put in the the plugins directory. An example, check would be as follows:

Code: Select all

./check_ncpa.py -H <ip-address-remote-host> -t '<your token>' -M 'plugins/check_ntp_time' -q 'args= -H 0.centos.pool.ntp.org  -w 0.5 -c 1'
Let us know if you need assistance installing the plugin or setting this up.

Benjamin