X-Git-Url: http://git.rot13.org/?p=air-quality;a=blobdiff_plain;f=audio2influx.sh;h=a8a49cc7be2dbbdb182be8f9c9332551874becea;hp=ee76625175969ff2dd7f47653c10b461a81bc175;hb=1c8be946d7c1ddc866fad3acbe75dcf1eb2acf57;hpb=445307493ff5f2391f081b8882e12a24085896d3 diff --git a/audio2influx.sh b/audio2influx.sh index ee76625..a8a49cc 100755 --- a/audio2influx.sh +++ b/audio2influx.sh @@ -5,6 +5,6 @@ while true ; do arecord -d 1 -r 96000 /dev/shm/tmp.wav 2>/dev/null time=`date +'%s%N'` info=`sox /dev/shm/tmp.wav -n stat 2>&1 | grep '[0-9][0-9][0-9]*$' | sed -e 's/[()]//g' -e 's/: */=/' -e 's/ */_/g' | tee /dev/shm/audio | tr '\n' ',' | sed 's/[, ]*$//'` -curl --silent -XPOST http://10.60.0.92:8086/write?db=rot13 --data-binary "fan,dc=trnjanska $info $time" +curl --silent -XPOST 'http://10.60.0.92:8086/write?consistency=any&db=rot13' --data-binary "fan,dc=trnjanska $info $time" done