monitoring/check_ntppool_score

This commit is contained in:
n 2017-09-10 15:29:47 +02:00
parent c1a115ff86
commit 2989cef8db
2 changed files with 23 additions and 2 deletions

View file

@ -32,9 +32,10 @@ Patches
* [alcasar_logo.patch](https://forge.tourmentine.com/n/scripts/src/master/alcasar_logo.patch) => small patch to add a background changer for ALCASAR webpages * [alcasar_logo.patch](https://forge.tourmentine.com/n/scripts/src/master/alcasar_logo.patch) => small patch to add a background changer for ALCASAR webpages
* [shaarli_OleG.0.9.0.patch](https://forge.tourmentine.com/n/scripts/src/master/shaarli_OleG.0.9.0.patch) => Open Graph support for Shaarli (patch against 0.9.0 version, also works against 0.9.1) Hi [Charly](https://fr.wikipedia.org/wiki/Charly_Oleg)! * [shaarli_OleG.0.9.0.patch](https://forge.tourmentine.com/n/scripts/src/master/shaarli_OleG.0.9.0.patch) => Open Graph support for Shaarli (patch against 0.9.0 version, also works against 0.9.1) Hi [Charly](https://fr.wikipedia.org/wiki/Charly_Oleg)!
Others Monitoring
------ -------
* [check_ntppool_score](https://forge.tourmentine.com/n/scripts/src/master/check_ntppool_score) => Simple shell script to check score on NTP Pool Project (score must be over 10 to server NTP). Requires Curl, fits for Nagios/Shinken/Icinga/etc.
* [GonKyrellM](https://forge.tourmentine.com/n/scripts/src/master/GonKyrellM) => Conky, GKrellM style - with "invisible" theme (well, sort of) * [GonKyrellM](https://forge.tourmentine.com/n/scripts/src/master/GonKyrellM) => Conky, GKrellM style - with "invisible" theme (well, sort of)
Attic Attic

20
monitoring/check_ntppool_score Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
score=`curl --silent "http://www.pool.ntp.org/scores/195.154.45.50/log?limit=1" 2>&1 | tail -1 | cut -f 5 -d ","`
if [ $score == "" ]
then
echo "UNKNOWN: unable to parse result"
exit 3
fi
result=`echo "$score > 10" | bc`
if [ $result == 1 ]
then
echo "OK: score=$score|score=$score;;;;"
exit 0
else
echo "CRITICAL: score=$score|score=$score;;;;"
exit 2
fi