solana/metrics/scripts
Jack May f567877d1d
Cleanup metrics (#4230)
2019-05-10 08:33:58 -07:00
..
grafana-provisioning Cleanup metrics (#4230) 2019-05-10 08:33:58 -07:00
.gitignore Add support for local metric collection/viewing (#4170) 2019-05-06 16:44:06 -07:00
README.md Add support for local metric collection/viewing (#4170) 2019-05-06 16:44:06 -07:00
enable.sh Cleanup metrics (#4230) 2019-05-10 08:33:58 -07:00
grafana.ini Add support for local metric collection/viewing (#4170) 2019-05-06 16:44:06 -07:00
influxdb.conf Add support for local metric collection/viewing (#4170) 2019-05-06 16:44:06 -07:00
start.sh Cleanup metrics (#4230) 2019-05-10 08:33:58 -07:00
status.sh Add support for local metric collection/viewing (#4170) 2019-05-06 16:44:06 -07:00
stop.sh Add support for local metric collection/viewing (#4170) 2019-05-06 16:44:06 -07:00

README.md

This directory contains scripts to manage a local instance of InfluxDB OSS and Grafana

Setup

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.

$ source ./enable.sh

Once metrics have been started and you have an application running you can view the metrics at:

http://localhost:3000/d/local/local-monitor

Stop metric services:

$ ./stop.sh

InfluxDB CLI

You may find it useful to install the InfluxDB client for adhoc metrics collection/viewing

  • Linux - sudo apt-get install influxdb-client
  • macOS - brew install influxdb

Simple example of pulling all thinclient measurements out of the local database:

$ influx -database local -username admin -password admin -execute 'select * from thinclient'

Reference: https://docs.influxdata.com/influxdb/v1.5/query_language/

Monitoring

To monitor activity, run one of:

$ docker logs -f influxdb
$ docker logs -f grafana

Reference