special note: the dashboards for renterd and walletd are built from forks of the official sia repositories. here are links to each fork
- renterd: https://github.com/bustedware/renterd
- walletd: https://github.com/bustedware/walletd/tree/its-happening
- configure
siagrafana.json
with your hostd, renterd, walletd, and grafana information - run
python generate-configs.py
to generate prometheus configurations for each service. - in grafana create prometheus datasources according to the following:
- create a single prometheus datasource named
sia
if usingprometheus.yml
- create a prometheus datasource named
hostd
,renterd
, andwalletd
after each service you plan to monitor when running withprometheus.<service>.yml
- create a single prometheus datasource named
- run
python generate-dashboards.py
to deploy dashboards to grafana
For a detailed guide continue reading this document
These are the versions of Prometheus and Grafana I ran during development. It's possible it will work with other versions.
- Prometheus 2.47.1
- Grafana v8.4.4
coming soon
-
Review the array of hosts in
siagrafana.json
. Configurehostd_hosts
,renterd_hosts
, andwalletd_hosts
according to your infrastructure. You can ignoregrafana_host
for now. -
Run
python generate-configs.py
to generate hostd, renterd, walletd, and combined prometheus yml configurations.- prometheus.hostd.yml
- prometheus.renterd.yml
- prometheus.walletd.yml
- prometheus.yml
-
Run Prometheus data collectors
Example prometheus commands running for each service
prometheus --config.file="prometheus.hostd.yml" --web.listen-address="0.0.0.0:9090" --storage.tsdb.path="hostd"
prometheus --config.file="prometheus.walletd.yml" --web.listen-address="0.0.0.0:10090" --storage.tsdb.path="walletd"
prometheus --config.file="prometheus.renterd.yml" --web.listen-address="0.0.0.0:11090" --storage.tsdb.path="renterd"
Example prometheus command running for combind services
prometheus --config.file="prometheus.yml" --web.listen-address="0.0.0.0:9090" --storage.tsdb.path="sia"
The generate-dashboards.py
script will search for datasources in Grafana named hostd
, renterd
, walletd
, and sia
. If any datasources are named sia
, the dashboards that are created will all use this datasource. If sia
is not a present datasource, the dashboards are created with their respectively named datasource hostd
, renterd
, and walletd
The datasources must be named hostd
, renterd
, walletd
, or sia
.
To create a grafana datasource:
- Login to Grafana and go to
Configuration
>Data sources
- Click the blue
Add data source
button in the upper right - Search for or select
Prometheus
- Enter the
Name
of the datasource. - Enter your prometheus
URL
. iehttp://localhost:9090
- Near the button, for
HTTP Method
selectGET
- Click the blue
Save & test
button at the bottom
The generate-dashboards.py
script will use the grafana.<service>.template.json
files as templates when making API calls to Grafana for creating dashboards. Any updates made to the dashboards within the Grafana UI can be brought back to these template files. See the updating templates section for more details.
Follow these steps to create dashboards in Grafana for each service that has any hosts defined in siagrafana.json
:
-
Set the value for
grafana_host
in thesiagrafana.json
file. -
Create a new API key for Grafana
- Login to your grafana host and go to
Configuration
>API keys
- Click
Add API key
- Name: (give the key whatever name you want)
- Role:
Admin
- Time to live:
100y
(or whatever you want. 100y for non expiring key)
- Login to your grafana host and go to
-
Set the value for
grafana_api_key
in thesiagrafana.json
file using the API key from step 2 -
Run
python generate-dashboards.py
to createhostd
,walletd
, andrenterd(soon)
dashboards in your configured Grafana host.- This script reads the
grafana.<service>.template.json
to generate a dashboard from
- This script reads the
note: This script also generates the following files, the contents of which are used during the API calls for creating these dashboards. If you have any issues with the dashboard being created these files would be good to inspect.
- grafana.hostd.json
- grafana.renterd.json (soon)
- grafana.walletd.json
After making changes to a dashboard you can export those changes and save it in the grafana.<service>.template.json
file after making the following updates to it:
"id": null
root level of document"uid": null
root level of document- All of the
datasource.uid
should be set to"uid": "<DSID>"
- You can remove the
annoations
field from the top of the document
Thank you for your support!
SIA: 1d2873a328df4f998185a46ace392279c9d9170d9e3d6ce5c83da7c0b1c681576411b010898e
BTC: 3AeQ5E9g7yyGqhZD44Swdh694Lp9xLTo5q
ETH: 0x03b1dE4f3Fa5894902F77D7AB92c58b7edD40456