Send metrics data to the correct/configured database host

This commit is contained in:
Pankaj Garg 2019-03-29 11:47:36 -07:00 committed by Grimes
parent 8e25c39564
commit fc678f53ba
1 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,12 @@ if [[ -z $INFLUX_DATABASE || -z $INFLUX_USERNAME || -z $INFLUX_PASSWORD ]]; then
exit 0
fi
echo "https://metrics.solana.com:8086/write?db=${INFLUX_DATABASE}&u=${INFLUX_USERNAME}&p=${INFLUX_PASSWORD}" \
host="https://metrics.solana.com:8086"
if [[ -n $INFLUX_HOST ]]; then
host="$INFLUX_HOST"
fi
echo "${host}/write?db=${INFLUX_DATABASE}&u=${INFLUX_USERNAME}&p=${INFLUX_PASSWORD}" \
| xargs curl --max-time 5 -XPOST --data-binary "$point"
exit 0