Add data point for testnet startup and shutdown

This commit is contained in:
Michael Vines
2018-07-21 23:15:36 -07:00
parent d403808564
commit 5d065133ef
3 changed files with 25 additions and 7 deletions

16
ci/metrics_write_datapoint.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash -e
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 -XPOST --data-binary "$point"