Prometheus is a monitoring platform that collects the metrics of the machines on which it is installed, "scraping" the parameters from the HTTP endpoints of the latter.
Installation
We present a procedure that establishes the service using Docker-compose. Obviously, Docker-compose must be present on the system (if not present in your system install docker-compose).
We create a folder (eg "mkdir prometheus") in which we insert the docker-compose.yml file
Panel | ||
---|---|---|
| ||
version: '3' |
Always inside the prometheus folder we create 2 other folders, called promconf and promdata, where we will insert, respectively, our configurations, present in the prometheus.yml file, and storage. The latter allows you to configure Prometheus to monitor itself. The just mentioned configuration file is
Panel | ||
---|---|---|
| ||
global: |
Prometheus collects metrics of monitored targets by scraping the HTTP endpoints of these targets. Since Prometheus himself exposes his internal metrics through the same mechanism, it is possible to scrape and monitor his health through the same mechanism.