A Filecoin Network Monitoring and Analysis System
Sentinel is a collection of services which monitor the health and function of the Filecoin network. The system consists of TimescaleDB, a time-series and relational datastore, which captures metrics from interesting parts of the network and is exposed via Grafana, which presents the data via helpful and informative graphs and provides alerting and annotating for real-time monitoring.
The metrics are pushed to TimescaleDB from Telegraf-based remote-host agents and a centralized data processing pipeline. Lotus is attached to the processing pipeline as a source of truth for immutable network state.
Follow the [Lotus installation instructions](read https://lotu.sh/en+getting-started) to install dependencies for your operating system.
- Start lotus daemon.
git clone [email protected]:filecoin-project/sentinel.git
cd sentinel
make deps
make run-lotus
- (In another window)
build/lotus sync wait
which blocks until lotus finishes syncing the chain. make run-docker
to start Docker services- (In separate windows)
make run-telegraf
andmake run-chainwatch
.
- Visit http://localhost:3000 to open Grafana.
- Login with username and password as
admin
. Change the admin password.
The datasource and dashboards are provisioned by the config in
grafana/provisioning/dashboards/dashboards.yml
grafana/provisioning/datasources/timescaledb.yml
Note: Build artifacts are put into ./build
path. If you want to force building without make clean
ing first, you can also make -B <target>
.
make
- produces all build targets (lotus, chainwatch, and telegraf)
make lotus
- only builds the lotus daemon binary
make chainwatch
- only builds the chainwatch binary
make telegraf
- only builds the telegraf agent binary
make run-telegraf
- start development Telegraf process with debug output (uses configuration at build/telegraf.conf
)
make run-lotus
- start lotus daemon with default settings (lotus repo at $(HOME)/.lotus
)
make run-chainwatch
- start chainwatch binary. The database and repo path can be changed from default via LOTUS_DB
and LOTUS_REPO
environment variables. (Defaults to LOTUS_DB ?= postgres://postgres:password@localhost:5432/postgres?sslmode=disabled
and LOTUS_REPO ?= $(HOME)/.lotus
.
make run-docker
- start docker services (currently TimescaleDB, Grafana)
make stop-telegraf
- stop development Telegraf process
make stop-chainwatch
- stop chainwatch process
make stop-lotus
- stop lotus daemon process
make stop-docker
- stop all docker services
make install-services
- Install lotus, telegraf, chainwatch as systemd services
make upgrade-services
- Build lotus, telegraf, chainwatch and replace existing binaries without deploying configuration files
make clean-services
- Uninstall lotus, telegraf, chainwatch as systemd services (not logs or configuration)
Install individual services:
make install-telegraf-service
make install-lotus-service
make install-chainwatch-service
Upgrade individual services:
make upgrade-telegraf-service
make upgrade-lotus-service
make upgrade-chainwatch-service
Also works with their make clean-*-service
counterparts.
make clean
- removes build artifacts
make clean-state
- stops and destroys docker service volumes (which resets TimescaleDB and Grafana settings and configuration)
Sentinel follows the Filecoin Project Code of Conduct. Before contributing, please acquaint yourself with our social courtesies and expectations.
Welcoming new issues and pull requests.
The Filecoin Project and Sentinel is dual-licensed under Apache 2.0 and MIT terms:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)