Send metrics data to the correct/configured database host
This commit is contained in:
parent
8e25c39564
commit
fc678f53ba
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue