0fddf3e114
This configurability is unlocked through the `testground` build tag, which Project Oni will uses. Changes in the usage places of these relaxed constants were required due to the fact that Golang constants are untyped, but vars aren't. Read https://blog.golang.org/constants for more info. |
||
---|---|---|
.. | ||
.gitignore | ||
chain.dashboard.json | ||
docker-compose.yml | ||
env.stats | ||
head_buffer_test.go | ||
head_buffer.go | ||
main.go | ||
metrics.go | ||
README.md | ||
rpc.go | ||
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
.