-
Notifications
You must be signed in to change notification settings - Fork 390
metrics
This document outlines how metrics are collected, where metrics are stored, and how they can be viewed.
There are a number of packages and services involved in metric gathering for the Storj network.
This diagram displays the high level flow of metric data. Below describes the diagram in detail.
- All of the Storj peers (i.e. satellite, storage node, uplink, etc) participate in metric collection. When a peer starts up, it begins collecting the following metrics via the telemetry client:
Reference:
-
The telemetry client is configured via the peer config.yaml file. By default it sends the metrics to a server,
collectora.storj.io
, which is running thestatreceiver
binary. -
statreceiver
allows you to filter and process incoming timeseries metrics.statreceiver
is configed with alua
config file. This config file describes where metrics will be received from, how to parse/filter the metrics, where to store the metrics.
Reference:
- Metrics are stored in a number of datastores, each of which have a different purpose.
-
postgres
stores metrics used by the data science team. -
influxDB
stores metrics over time about specifc nodes. -
rothko
stores time-series data about the overall distributions across all nodes of each metric, but not about specific nodes.
- The metrics data from
influxDB
are fed to a grafana dashboard that is behind a VPN. Therothko
data isn't currently accessable via a visualization tool.
For debugging purposes, statrecevier
can be run locally along with storj-sim
to collect and view metrics. Here are the steps on how to set that up:
The following steps assume the Storj repo can already be built and run locally. All commands occur from root of the storj repo directory.
- create a
lua
pipline config that defines the source and destination of the metrics
# pipeline.lua
source = udpin("localhost:9000")
destination = parse(print())
deliver(source, destination)
- run
statreceiver
with lua pipeline config
$ statreceiver --input pipeline.lua
- in a different shell, setup storj-sim configs
$ storj-sim network setup
- add the following settings to the config of the peer you want to gather metrics for:
# address to send telemetry to
metrics.addr: "localhost:9000"
# application name for telemetry identification
metrics.app: "<peer-name>-"
# application suffix
metrics.app-suffix: "sim"
# how frequently to send up telemetry
metrics.interval: 10s
- run storj-sim
$ storj-sim network run
In the terminal where statreceiver
is running, there should be metrics printing to the screen.