lotus/tools/stats
2020-03-07 16:46:12 -08:00
..
.gitignore Add chain stats tool 2019-10-18 20:53:08 +09:00
chain.dashboard.json Sync dashboard to what we have on stats.testnet.filecoin.io 2020-01-24 00:13:15 +00:00
docker-compose.yml Add chain stats tool 2019-10-18 20:53:08 +09:00
env.stats Add chain stats tool 2019-10-18 20:53:08 +09:00
head_buffer_test.go stats: add small head change buffer to reduce collecting extraneous stats from small reorgs 2020-02-28 03:01:23 +00:00
head_buffer.go stats: add small head change buffer to reduce collecting extraneous stats from small reorgs 2020-02-28 03:01:23 +00:00
main.go Merge branch 'master' into testnet/3 2020-03-07 16:46:12 -08:00
metrics.go go mod updates, and a couple small fixes 2020-03-03 16:07:27 -08:00
README.md Add chain stats tool 2019-10-18 20:53:08 +09:00
rpc.go Merge branch 'master' into testnet/3 2020-03-07 16:46:12 -08:00
setup.bash Add chain stats tool 2019-10-18 20:53:08 +09:00

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.