Server monitoring with Prometheus
To install and operate Prometheus, you must install several essential elements:
- First, install the agents running on the machines to be monitored, they are exposing the monitoring metrics. Prometheus does not transform monitoring metrics and data into visual dashboards. You must also install an additional agent as Grafana.
- PromQL is the query language used by Prometheus, it is relatively simple and allows you to create dashboards and alerts.
- Alertmanager is the feature triggering your alerts.
- And finally, Prometheus, which centralizes the storage of metrics.
Focus on PromQL, the query language used by Prometheus
Prometheus Query Language (PromQL) is Prometheus's own query language. It has been designed and is optimized to work with temporal databases. It supports 4 types of metrics:
- Histogram
- Summary
- Counter
- Gauge
Alerts with Prometheus
To configure your alerts, go to Prometheus using certain conditions based on PromQL and associate them with a specific time frame. These alerts are sent via Alertmanager, users can choose their preferred communication channel (email, Slack or even SMS).