collectd graph for ntp_pool_score
This commit is contained in:
parent
9187a9dcb3
commit
04373b047c
1 changed files with 14 additions and 0 deletions
14
monitoring/collectd_ntppool_score
Executable file
14
monitoring/collectd_ntppool_score
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# add this to your types.db:
|
||||||
|
# ntp_pool_score value:GAUGE:-20:20
|
||||||
|
HOSTNAME="${COLLECTD_HOSTNAME:-`hostname -f`}"
|
||||||
|
INTERVAL="${COLLECTD_INTERVAL:-300}"
|
||||||
|
|
||||||
|
IP="X.X.X.X"
|
||||||
|
CURL="/usr/local/bin/curl"
|
||||||
|
|
||||||
|
while sleep "$INTERVAL"; do
|
||||||
|
VALUE=`$CURL --silent "http://www.pool.ntp.org/scores/$IP/log?limit=1" 2>&1 | tail -1 | cut -f 5 -d ","`
|
||||||
|
echo "PUTVAL $HOSTNAME/exec-magic/ntp_pool_score interval=$INTERVAL N:$VALUE"
|
||||||
|
done
|
Loading…
Reference in a new issue