mirror of
https://github.com/tomru/cram-luftdaten.git
synced 2026-03-03 06:27:23 +01:00
script for pushing to influxdb
This commit is contained in:
17
toInfluxDb.sh
Executable file
17
toInfluxDb.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# TODO: explain usage
|
||||
|
||||
set -e
|
||||
|
||||
HOST=${INFLUXDB_HOST:-localhost}
|
||||
PORT=${INFLUXDB_PORT:-8086}
|
||||
DATABASE=${INFLUXDB_DATABASE:-feinstaub}
|
||||
|
||||
PRECISION=s
|
||||
|
||||
SRC_FILE=${1:-/dev/stdin}
|
||||
|
||||
curl --include -X POST \
|
||||
"http://${HOST}:${PORT}/write?db=${DATABASE}&precision=${PRECISION}" \
|
||||
--data-binary @${SRC_FILE}
|
||||
Reference in New Issue
Block a user