Added perfomance data return
Benjamin Renard

Benjamin Renard commited on 2011-10-14 08:22:53
Showing 1 changed files, with 3 additions and 1 deletions.

... ...
@@ -34,6 +34,8 @@ size=`du -sm $WAL|sed 's/\([0-9]*\).*/\1/g'`
34 34
 STATE=OK
35 35
 EXIT=0
36 36
 MSG="all files have been restored ($size MB - $nbnodel files not deleted)."
37
+
38
+PERF_DATA="size=${size}MB,not_deleted_files=$nbnodel,not_restored_files=$nb"
37 39
 if [ $nb -gt $CRIT -o $size -gt $CRIT_SIZE ]
38 40
 then
39 41
 	STATE="CRITICAL"
... ...
@@ -48,5 +50,5 @@ else
48 50
 	fi
49 51
 fi
50 52
 
51
-echo "PG RESTORE $STATE: $MSG"
53
+echo "PG RESTORE $STATE: $MSG | $PERF_DATA"
52 54
 exit $EXIT
53 55