lotus/tools/stats
Jakub Sztandera 1ed62628a7
Update go-log to v2
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-01-08 20:22:31 +01:00
..
.gitignore Add chain stats tool 2019-10-18 20:53:08 +09:00
chain.dashboard.json Update dashboard 2019-12-11 15:30:56 +01: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
main.go Update go-log to v2 2020-01-08 20:22:31 +01:00
metrics.go Merge pull request #986 from filecoin-project/feat/update-stats-to-golog 2020-01-07 21:38:56 -08:00
README.md Add chain stats tool 2019-10-18 20:53:08 +09:00
rpc.go Use golog in stats tool, and better sync control 2019-12-19 15:58:26 +01: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.