lotus/tools/stats
2019-11-20 10:52:36 -06:00
..
.gitignore
chain.dashboard.json
docker-compose.yml
env.stats
main.go Remove height tag from stats tool 2019-10-28 10:50:17 -07:00
metrics.go Increase precision of pledge_collateral and add network actor balance 2019-10-18 20:56:13 +09:00
README.md
rpc.go Refactor mining logic to match specs ticket chain 2019-11-20 10:52:36 -06:00
setup.bash

Stats

Stats is a small tool to push chain information into influxdb

Setup

Influx configuration can be configured through env variables.

INFLUX_ADDR="http://localhost:8086"
INFLUX_USER=""
INFLUX_PASS=""

Usage

Stats will be default look in ~/.lotus to connect to a running daemon and resume collecting stats from last record block height.

For other usage see ./stats --help

go build -o stats *.go 
. env.stats && ./stats

Development

Start grafana and influxdb containers and import the dashboard to grafana. The url of the imported dashboard will be returned.

If the script doesn't work, you can manually setup the datasource and import the dashboard.

docker-compose up -d
./setup.bash

The default username and password for grafana are both admin.