docs, tweaks

This commit is contained in:
Patrick Stadler
2015-03-22 18:01:27 +01:00
parent c4246b9ab0
commit 7af294388b
10 changed files with 186 additions and 35 deletions

View File

@@ -3,7 +3,7 @@
start () {
if [ -z $FILE_LOCATION ]; then
echo "Error: file reporter requires \$FILE_LOCATION to be specified"
exit 1
return 1
fi
if [ ! -f $FILE_LOCATION ]; then

View File

@@ -9,7 +9,7 @@ defaults () {
start () {
if [ -z $INFLUXDB_API_ENDPOINT ]; then
echo "Error: influxdb requires \$INFLUXDB_API_ENDPOINT to be specified"
exit 1
return 1
fi
if [ "$INFLUXDB_SEND_HOSTNAME" = true ]; then
@@ -29,9 +29,8 @@ report () {
else
points="[$value]"
fi
curl -X POST $INFLUXDB_API_ENDPOINT \
-d "[{\"name\":\"$metric\",\"columns\":$__influxdb_columns,\"points\":[$points]}]"
local data="[{\"name\":\"$metric\",\"columns\":$__influxdb_columns,\"points\":[$points]}]"
curl -s -X POST $INFLUXDB_API_ENDPOINT -d $data
}
docs () {

View File

@@ -9,12 +9,12 @@ defaults () {
start() {
if [ -z $KEEN_IO_PROJECT_ID ]; then
echo "Error: keen_io requires \$KEEN_IO_PROJECT_ID to be specified"
exit 1
return 1
fi
if [ -z $KEEN_IO_WRITE_KEY ]; then
echo "Error: keen_io requires \$KEEN_IO_WRITE_KEY to be specified"
exit 1
return 1
fi
__keen_io_api_url="https://api.keen.io/3.0"
@@ -28,7 +28,7 @@ report () {
local value=$2
curl -s $__keen_io_api_url -H "Content-Type: application/json" \
-d "{\"metric\":\"$metric\",\"value\":$value}" > /dev/null
-d "{\"metric\":\"$metric\",\"value\":$value}"
}
docs () {

View File

@@ -3,7 +3,7 @@
start () {
if [ -z $STATHAT_API_KEY ]; then
echo "Error: stathat requires \$STATHAT_API_KEY to be specified"
exit 1
return 1
fi
}
@@ -11,8 +11,8 @@ report () {
local metric=$1
local value=$2
curl -s -d "ezkey=$STATHAT_API_KEY&stat=$metric&value=$value" \
http://api.stathat.com/ez > /dev/null
curl -s http://api.stathat.com/ez \
-d "ezkey=$STATHAT_API_KEY&stat=$metric&value=$value"
}
docs () {