diff --git a/server/configuration/prometheus.yaml b/server/configuration/prometheus.yaml index e69de29..d772f52 100644 --- a/server/configuration/prometheus.yaml +++ b/server/configuration/prometheus.yaml @@ -0,0 +1,13 @@ +# Prometheus global configuration file +global: + scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. + evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. +scrape_configs: + - job_name: "prometheus" + + static_configs: + - targets: ["localhost:9090"] # scrape prometheus itself + + - job_name: "android phones" + proxy_url: "http://pushprox:8080" #TODO add mobile phones here + diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index 80bc7e8..011646d 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -1,10 +1,13 @@ -# nginx, pushprox, prometheus, grafana stack +# This docker compose file spins up the following containers: +# - nginx reverse proxy +# - prometheus time-series database +# - grafana monitoring dashboard +# - pushprox prometheus proxy for traversing NAT version: '3.9' services: - # monitoring dashboard for prometheus grafana: container_name: grafana hostname: grafana @@ -13,7 +16,6 @@ services: networks: - common-network - # reverse proxy nginx: container_name: nginx image: nginx:1.23.4 @@ -27,7 +29,6 @@ services: - common-network restart: on-failure - # proxy for prometheus to traverse NAT pushprox: container_name: pushprox hostname: pushprox @@ -35,12 +36,13 @@ services: networks: - common-network - # prometheus time-series database prometheus: container_name: prometheus hostname: prometheus image: bitnami/prometheus:2.43.0 restart: on-failure + volumes: + - ${PWD}/configuration/prometheus.yaml:/etc/prometheus/prometheus.yml networks: - common-network