Cargo watch ignores local metrics (#4384)
This commit is contained in:
parent
578c2ad3ea
commit
e5b7aead12
|
@ -2,6 +2,7 @@
|
|||
/book/src/img/
|
||||
/book/src/tests.ok
|
||||
/farf/
|
||||
/metrics/scripts/lib/
|
||||
/solana-release/
|
||||
solana-release.tar.bz2
|
||||
/target/
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
/lib
|
|
@ -7,7 +7,7 @@ Start the local metric services:
|
|||
|
||||
`$ ./start.sh`
|
||||
|
||||
Metrics are enabled on a per-shell basis which means you must `source` the following scripts in each shell in which you start an application you wish to collect metrics from. For example, if running a Solana fullnode you must call `source ./enable.sh` before starting the node.
|
||||
Metrics are enabled on a per-shell basis which means you must `source` the following scripts in each shell in which you start an application you wish to collect metrics from. For example, if running a Solana fullnode you must call `source ./enable.sh` before starting the node:
|
||||
|
||||
`$ source ./enable.sh`
|
||||
|
||||
|
@ -15,6 +15,11 @@ Once metrics have been started and you have an application running you can view
|
|||
|
||||
http://localhost:3000/d/local/local-monitor
|
||||
|
||||
To test that things are working correctly you can send a test airdrop data point and then check the
|
||||
metrics dashboard:
|
||||
|
||||
`$ ./test.sh`
|
||||
|
||||
Stop metric services:
|
||||
|
||||
`$ ./stop.sh`
|
||||
|
@ -26,11 +31,10 @@ adhoc metrics collection/viewing
|
|||
* Linux - `sudo apt-get install influxdb-client`
|
||||
* macOS - `brew install influxdb`
|
||||
|
||||
Simple example of pulling all airdrop measurements out of the `testnet` database:
|
||||
|
||||
Simple example of pulling all `thinclient` measurements out
|
||||
of the `local` database:
|
||||
```sh
|
||||
$ influx -database local -username admin -password admin -execute 'select * from thinclient'
|
||||
$ influx -database testnet -username admin -password admin -execute 'SELECT * FROM "drone-airdrop"'
|
||||
```
|
||||
|
||||
Reference: https://docs.influxdata.com/influxdb/v1.5/query_language/
|
||||
|
@ -39,7 +43,7 @@ Reference: https://docs.influxdata.com/influxdb/v1.5/query_language/
|
|||
|
||||
To monitor activity, run one of:
|
||||
|
||||
```
|
||||
```sh
|
||||
$ docker logs -f influxdb
|
||||
$ docker logs -f grafana
|
||||
```
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Test local metrics by sending a airdrop datapoint
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# shellcheck source=metrics/scripts/enable.sh
|
||||
source ./enable.sh
|
||||
|
||||
if [[ -z $INFLUX_DATABASE || -z $INFLUX_USERNAME || -z $INFLUX_PASSWORD ]]; then
|
||||
echo Influx user credentials not found
|
||||
exit 0
|
||||
fi
|
||||
|
||||
host="https://localhost:8086"
|
||||
if [[ -n $INFLUX_HOST ]]; then
|
||||
host="$INFLUX_HOST"
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
point="drone-airdrop,localmetrics=test request_amount=1i,request_current=1i"
|
||||
echo "${host}/write?db=${INFLUX_DATABASE}&u=${INFLUX_USERNAME}&p={$INFLUX_PASSWORD}" \
|
||||
| xargs curl -XPOST --data-binary "$point"
|
Loading…
Reference in New Issue