You need installed docker engine on server before got to next step: How to install docker
wget -O install.sh https://raw.githubusercontent.com/Crouton-Digital/story-monitoring/refs/heads/main/install.sh && chmod +x install.sh && sudo ./install.sh
Edit docker-compose.yml, need enter you validator address and node rpc url
story-validator-exporter:
image: ghcr.io/crouton-digital/story-validator-exporter:v0.12.2
container_name: cosmos-validator-watcher
command: >
--log-level debug
--validator BAED8E3FAD9FD20457EA2AD53A631AFAA6477F3A:CroutonDigital # Replace to your validator address
--node http://127.0.0.1:26657 # Replace to your node rpc url
--node https://story-testnet-rpc.validator247.com
--node https://story-testnet-rpc.itrocket.net
after edit, need apply changes
docker compose up -d
- Open Grafana in your web browser. It should be available on port 3000
- Login using defaults admin/admin and change password
- Go to Dashboard
Validator stats - information about validator such as rank, bounded tokens, comission, delegations and rewards
Hardware health - system hardware metrics. cpu, ram, network usage
Goto Home -> Alerting -> Contact Point and press "Add contact point"
{{ template "telegram.message" . }}
Press "Save contact point" button
On Notification templates Press "Add template" button
Enter name: temp.messages
content paste:
{{ define "telegram.print_alert" -}}
[{{.Status}}] {{ .Labels.alertname }}
{{ if .Annotations -}}
Annotations:
{{ range .Annotations.SortedPairs -}}
- {{ .Name }}: {{ .Value }}
{{ end -}}
{{ end -}}
{{ if .DashboardURL -}}
Go to dashboard: {{ .DashboardURL }}
{{- end }}
{{- end }}
{{ define "telegram.message" -}}
{{ if .Alerts.Firing -}}
{{ len .Alerts.Firing }} firing alert(s):
{{ range .Alerts.Firing }}
{{ template "telegram.print_alert" . }}
{{ end -}}
{{ end }}
{{ if .Alerts.Resolved -}}
{{ len .Alerts.Resolved }} resolved alert(s):
{{ range .Alerts.Resolved }}
{{ template "telegram.print_alert" .}}
{{ end -}}
{{ end }}
{{- end }}
For save press "Save template" button
Goto Home -> Alerting -> Notification policies and press "New nested policy"
and fill in all the fields as in the example below:
for save changes press "Save policy" button
cd /opt/story-monitoring/
sudo docker-compose down
sudo docker volume prune -f
sudo rm -rf /opt/story-monitoring/
Resources we used in this project:
- Story validator exporter: (https://github.com/Crouton-Digital/story-validator-exporter)