This repository contains a template for simple monitoring stack.
Features:
-
Display tBTC node metrics
-
Alerting (via Discord)
The template consists of:
-
Docker Compose manifest with Grafana and Traefik
-
Traefik is used as a reverse proxy and provides SSL/TLS certificates from Let’s Encrypt. SSL/TLS certificate requires a domain name.
-
-
Configuration for Grafana
-
Pre-configured data source with Threshold’s Prometheus (https://monitoring.threshold.network/prometheus/)
-
Policy and Contact point with Discord
-
Dashboard
-
The monitoring can be run on your local machine or on a server. The only requirement is to have Docker and Docker Compose installed. If you want to use SSL/TLS certificates from Let’s Encrypt, you need to have a domain name.
-
Fork this repository.
-
Copy
.env.templateinto.envfile. Fill in the variables. That file is used by Docker Compose. -
(optional) Modify
docker-compose.yamlfile. Uncomment HTTPS parts if you have a domain name. -
Modify
config/grafana/provisioning/alerting/contactpoints.yamlfile. Replace<your_discord_webhook_url>with your Discord webhook URL. -
Run
docker-compose up -dto start the stack. -
Open Grafana in your browser (http://grafana.127.0.0.1.nip.io by default).
-
Login with
admin/admincredentials. Change the password.
-
Open
Dashboardsand select New → Import. -
Paste the content of
dashboard.jsonfile into theImport via panel jsonfield. -
Click
Loadand thenImport(select proper pre-defined data source). -
Go to
Dashboardsand selecttBTC Nodedashboard. -
Go to dashboard settings and replace variable
chain_addresswith your node’s address.Currently, the dashboard contains 2 addresses only for demo - these are tBTC bootstrap nodes. They don’t expose all metrics, thus the dashboard won’t work fully with them.
|
💡
|
It’s recommended to create a separate dashboard for each node. |
Alerts related to the state of a node. Each node should has its own alerting rule.
-
Open
Dashboardsand click Edit onStatuspanel. -
Go to
Alerttab and clickCreate alert rule from this panel. -
Set the name. Recommended schema:
Status <chain_address>. -
In the 3rd point create a folder and an evaluation group. Recommended name:
tBTCfor both. Use1mfor evaluation interval. Set1mforPending period. Take a look at the screenshots below. -
Complete the 4th point as you wish. These information will be placed in the alert.
-
The 5th point is not needed.
-
Click
Save rule and exit.





