Move some common scripts from multinode-demo/ to scripts/

This commit is contained in:
Michael Vines
2018-08-27 10:23:22 -07:00
parent cd0db7842c
commit bd5c6158ae
13 changed files with 106 additions and 81 deletions

View File

@ -0,0 +1,19 @@
#!/bin/bash -e
#
# Send a metrics datapoint
#
point=$1
if [[ -z $point ]]; then
echo "Data point not specified"
exit 1
fi
echo "Influx data point: $point"
if [[ -z $INFLUX_DATABASE || -z $INFLUX_USERNAME || -z $INFLUX_PASSWORD ]]; then
echo Influx user credentials not found
exit 0
fi
echo "https://metrics.solana.com:8086/write?db=${INFLUX_DATABASE}&u=${INFLUX_USERNAME}&p=${INFLUX_PASSWORD}" \
| xargs curl --max-time 5 -XPOST --data-binary "$point"