diff --git a/docker-compose.yml b/docker-compose.yml index 9495ac5..e20b223 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,5 +15,29 @@ services: # Persistent SQLite database. - pulse-data:/app/data + prometheus: + image: prom/prometheus:v3.0.1 + container_name: prometheus + restart: unless-stopped + + command: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path=/prometheus" + + ports: + - "9090:9090" + + volumes: + # Prometheus scrape configuration. + # SELinux relabeling for Fedora/RHEL hosts. + - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro,z + + # Persistent Prometheus TSDB storage. + - prometheus-data:/prometheus + + depends_on: + - pulse + volumes: pulse-data: + prometheus-data: diff --git a/prometheus.yml b/prometheus.yml new file mode 100644 index 0000000..90fd88a --- /dev/null +++ b/prometheus.yml @@ -0,0 +1,9 @@ +global: + scrape_interval: 15s + scrape_timeout: 10s + +scrape_configs: + - job_name: "pulse" + metrics_path: "/metrics" + static_configs: + - targets: ["pulse:8080"]