Prometheus & Grafana
Besides monitoring node performance, it's quite useful to setup monitoring system for servers on which operators run their nodes.
The combination of Prometheus and Grafana is a common stack used by Nym team for internal monitoring as well as by core community operators like ExploreNym (opens in a new tab).
Prometheus
Prometheus (opens in a new tab) is a free and open source monitoring systems. It allows operators to have their metrics, events, and alerts under full control. This ecosystem offers multiple advantages:
- Collects and records metrics from servers, containers, and applications
- Provides a flexible query language (PromQL) (opens in a new tab)
- Multiple modes visualization tools
- An alerting mechanism that sends notifications
Prometheus collects and stores its metrics as time series data, i.e. metrics information is stored with the timestamp at which it was recorded, alongside optional key-value pairs called labels.
Grafana
Grafana (opens in a new tab) is an open-source analytics and interactive front end. It is widely used for its easy to manage dashboards with visualizations like graphs, charts and alerts, all connected to live data sources.
Setup Guides
There are various ways how to setup this stack. You can chose based on your preferences to do your own flow or follow some of the documented ones:
- ExploreNYM scripts for self-hosted monitoring
- Setup monitoring in a Docker container (Under review - will be out soon)
References and further reading
- Prometheus release page (opens in a new tab)
- Prometheus documentation (opens in a new tab)
- Installation guide to install Prometheus (opens in a new tab) on Ubuntu by cherryservers
- Grafana installation guide (opens in a new tab)
- Nym's script
prom_targets.py
(opens in a new tab) - a python program to request data from API and can be plugged to this stack - Nym-node CPU cron service (opens in a new tab) - an easy bash script by Nym core developer @tommy1987 (opens in a new tab), designed to monitor a CPU usage of your node, running locally