Prometheus is an open-source monitoring application. To install Prometheus using Docker Compose, please select the version you want to install on the Prometheus Docker Hub page https://hub.docker.com/r/prom/prometheus first. Then use the docker-compose.yml file with the following content to install it:
1 2 3 4 5 6 7 8 |
version: '3.9' services: grafana: image: prom/prometheus container_name: 'prometheus' ports: - 9090:9090 |
By default, Prometheus runs on port 9090, guys!
Please run the command “docker compose up” in the directory containing this docker-compose.yml file, you will see the following results:
Now, go to the address http://localhost:9090, you will see the following results: