Bundle metrics_write_datapoint.sh in Snap
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
#!/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 --max-time 5 -XPOST --data-binary "$point"
|
@@ -6,6 +6,7 @@
|
||||
# with GCP and has sufficient permission.
|
||||
#
|
||||
here=$(dirname "$0")
|
||||
metrics_write_datapoint="$here"/../multinode-demo/metrics_write_datapoint.sh
|
||||
|
||||
# TODO: Switch over to rolling updates
|
||||
ROLLING_UPDATE=false
|
||||
@@ -233,7 +234,7 @@ vm_foreach_in_class validator inc_fullnode_count
|
||||
|
||||
# Add "network stopping" datapoint
|
||||
netName=${SOLANA_NET_URL/.*/}
|
||||
"$here"/metrics_write_datapoint.sh "testnet-deploy,name=$netName stop=1"
|
||||
$metrics_write_datapoint "testnet-deploy,name=$netName stop=1"
|
||||
|
||||
client_start() {
|
||||
declare vmName=$1
|
||||
@@ -437,6 +438,6 @@ wait_for_pids client shutdown
|
||||
vm_foreach_in_class client client_start
|
||||
|
||||
# Add "network started" datapoint
|
||||
"$here"/metrics_write_datapoint.sh "testnet-deploy,name=$netName start=1"
|
||||
$metrics_write_datapoint "testnet-deploy,name=$netName start=1"
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user