add influxdb reporter

This commit is contained in:
Patrick Stadler
2015-03-14 13:32:26 +01:00
parent a6af168235
commit ffea7022ea
6 changed files with 35 additions and 16 deletions

View File

@@ -1,12 +1,5 @@
#!/bin/sh
report () {
local METRIC=$1
local VALUE=$2
local DATE=$(iso_date)
echo "$DATE $METRIC: $VALUE" >> $FILE_LOCATION
}
init () {
if [ -z $FILE_LOCATION ]; then
echo "Missing configuration: \$FILE_LOCATION"
@@ -18,6 +11,13 @@ init () {
fi
}
report () {
local METRIC=$1
local VALUE=$2
local DATE=$(iso_date)
echo "$DATE $METRIC: $VALUE" >> $FILE_LOCATION
}
docs () {
echo "Write to a file or named pipe."
echo "\$FILE_LOCATION=$FILE_LOCATION"