output critical and warning values, fix for not printing config in non-config-mode
[osmrrze.git] / scripts / munin-getdblag.sh
index 7e19de156473359c5ecbdb8ba03c625f728521d0..826e4a5618087a47b1db1be1cf01ee823eee964b 100755 (executable)
@@ -2,11 +2,11 @@
 
 LASTDBUPDATE=`cat /var/www/lastdbupdate.txt`
 
-TS2=`date '+%s' "--date=$LASTDBUPDATE"`
+TS2=`date '+%s' --utc "--date=$LASTDBUPDATE"`
 TS1=`date '+%s'`
 
 if [ "$1" = "autoconf" ]; then
-        echo yes
+        echo No
         exit 0
 fi
 
@@ -15,10 +15,13 @@ if [ "$1" = "config" ]; then
         echo 'graph_args --lower-limit 0 '
         echo 'graph_vlabel Seconds our DB copy is lagging behind the official DB'
         echo 'graph_category postgresql'
+       echo 'dblag.label databaselag'
+       echo 'dblag.type GAUGE'
+       echo 'dblag.warning 3600'
+       echo 'dblag.critical 86400'
+       exit 0
 fi
 
-echo 'dblag.label databaselag'
-echo 'dblag.type GAUGE'
 let "DELAY=TS1-TS2"
 echo "dblag.value $DELAY"
 
This page took 0.045146 seconds and 4 git commands to generate.