ISC ntpd stats

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Helmut Schneider
Cacti User
Posts: 151
Joined: Mon Feb 05, 2007 3:57 am
Location: Munich, Germany

ISC ntpd stats

Post by Helmut Schneider »

Hi,

attached a perl script to place in $cactidir/scripts and templates for import to monitor ISCs ntpd. It monitors all vital data of the specified ntp host.
Exported on 0.8.7d, based on 1-minute polling.

Helmut
Attachments
ntpd.jpg
ntpd.jpg (45.14 KiB) Viewed 11287 times
query-ntpd.pl
(1.69 KiB) Downloaded 1188 times
cacti_graph_template_ntpd_stats.xml
(32 KiB) Downloaded 1194 times
Last edited by Helmut Schneider on Tue May 12, 2009 2:33 pm, edited 2 times in total.
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

If possible, could you add this to http://docs.cacti.net/templates under Contributed Templates

http://docs.cacti.net/templates.guidelines
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Helmut Schneider
Cacti User
Posts: 151
Joined: Mon Feb 05, 2007 3:57 am
Location: Munich, Germany

Post by Helmut Schneider »

You didn't refer to me, did you?!
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Yes, yes I did.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Helmut Schneider
Cacti User
Posts: 151
Joined: Mon Feb 05, 2007 3:57 am
Location: Munich, Germany

Post by Helmut Schneider »

It asks for USER/PASS...
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Cacti Docs user ids are linked to your http://bugs.cacti.net account

If you don't have one, don't worry about it.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Helmut Schneider
Cacti User
Posts: 151
Joined: Mon Feb 05, 2007 3:57 am
Location: Munich, Germany

Post by Helmut Schneider »

Actually I don't... :)
cskp12
Posts: 21
Joined: Thu Jun 18, 2009 8:52 pm

Post by cskp12 »

I run on linux command ok,but run on cacti output as below:
06/24/2009 02:15:09 PM - CMDPHP: Poller[0] Host[10] DS[26] CMD: perl /var/www/html/cacti/scripts/query-ntpd.pl cacti-server, output: frequency:U offset:U jitter:U stability:U noise:U stratum:U state:U refid:U reftype:U
How I do fix ths issue?
pleas told me!
thx a loit
Helmut Schneider
Cacti User
Posts: 151
Joined: Mon Feb 05, 2007 3:57 am
Location: Munich, Germany

Post by Helmut Schneider »

Post the output of

ntpq -c "host $ntp-host" -c rv -c peers

where $ntp-host is the host you are querying.
cskp12
Posts: 21
Joined: Thu Jun 18, 2009 8:52 pm

Post by cskp12 »

Name or service not known
current host remains localhost
assID=0 status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
version="ntpd 4.2.4p6@1.1549-o Mon Apr 20 11:53:21 UTC 2009 (1)",
processor="i686", system="Linux/2.6.29.4-167.fc11.i686.PAE", leap=00,
stratum=3, precision=-20, rootdelay=234.085, rootdispersion=123.200,
peer=26586, refid=220.130.158.52,
reftime=cdec5ffd.f482c809 Wed, Jun 24 2009 16:19:09.955, poll=10,
clock=cdec6784.7f2f3ab9 Wed, Jun 24 2009 16:51:16.496, state=4,
offset=-21.744, frequency=-79.234, jitter=8.187, noise=9.643,
stability=1.520, tai=0
remote refid st t when poll reach delay offset jitter
==============================================================================
*220-130-158-52. 129.6.15.29 2 u 901 1024 173 25.574 -24.887 0.631
+alqualonde.org 220.130.158.51 3 u 110 1024 377 64.849 -38.943 0.144
+123-204-57-143. 220.130.158.51 3 u 917 1024 377 35.513 -18.879 1.135
cskp12
Posts: 21
Joined: Thu Jun 18, 2009 8:52 pm

sorry i post error

Post by cskp12 »

I post correctly optput below as:


current host set to xxxxxx
assID=0 status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
version="ntpd 4.2.4p6@1.1549-o Mon Apr 20 11:53:21 UTC 2009 (1)",
processor="i686", system="Linux/2.6.29.4-167.fc11.i686.PAE", leap=00,
stratum=3, precision=-20, rootdelay=234.085, rootdispersion=123.575,
peer=26586, refid=220.130.158.52,
reftime=cdec5ffd.f482c809 Wed, Jun 24 2009 16:19:09.955, poll=10,
clock=cdec679d.df47b7f4 Wed, Jun 24 2009 16:51:41.872, state=4,
offset=-21.744, frequency=-79.234, jitter=8.187, noise=9.643,
stability=1.520, tai=0
remote refid st t when poll reach delay offset jitter
==============================================================================
*220-130-158-52. 129.6.15.29 2 u 926 1024 173 25.574 -24.887 0.631
+alqualonde.org 220.130.158.51 3 u 135 1024 377 64.849 -38.943 0.144
+123-204-57-143. 220.130.158.51 3 u 942 1024 377 35.513 -18.879 1.135
cskp12
Posts: 21
Joined: Thu Jun 18, 2009 8:52 pm

Post by cskp12 »

I run perl script on linux command line output as below:
frequency:-83.178 offset:-25.102 jitter:2.074 stability:1.860 noise:9.441 stratum:3 state:4 refid:220.130.158.52 reftype:5
Helmut Schneider
Cacti User
Posts: 151
Joined: Mon Feb 05, 2007 3:57 am
Location: Munich, Germany

Post by Helmut Schneider »

Are you running the webserver chroot'ed? Seems it cannot find ntpq.
cskp12
Posts: 21
Joined: Thu Jun 18, 2009 8:52 pm

Post by cskp12 »

No ,I run noral webservice
Helmut Schneider
Cacti User
Posts: 151
Joined: Mon Feb 05, 2007 3:57 am
Location: Munich, Germany

Post by Helmut Schneider »

> perl /var/www/html/cacti/scripts/query-ntpd.pl cacti-server

Is cacti-server your ntp host? Is the webserver allowed to run ntpq and ntpdc?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests