Skip to content

Commit

Permalink
[+] add Prometheus service to Docker Compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Nov 27, 2023
1 parent c33f171 commit ce30bfa
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ services:
postgres:
condition: service_healthy

prometheus:
image: prom/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090
restart: unless-stopped
volumes:
- "./docker/prometheus.yml:/etc/prometheus/prometheus.yml"

add-test-db:
image: *pgimage
environment:
Expand Down
30 changes: 30 additions & 0 deletions docker/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets: []
scheme: http
timeout: 10s
api_version: v1
scrape_configs:
- job_name: prometheus
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:9090
- job_name: pgwatch3
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /pgwatch3
scheme: http
static_configs:
- targets:
- localhost:9187

0 comments on commit ce30bfa

Please sign in to comment.