From c4fd68365929101f11aa640b07ffe117c40b3446 Mon Sep 17 00:00:00 2001 From: Philipp Glaum Date: Fri, 21 Jul 2023 11:13:52 +0200 Subject: [PATCH] add drone scrape config to prometheus --- docker-compose.yml | 2 ++ prometheus.yaml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 00c0944..cc0bfda 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -75,6 +75,8 @@ services: - '--web.console.libraries=/etc/prometheus/console_libraries' - '--web.console.templates=/etc/prometheus/consoles' - '--web.enable-lifecycle' + environment: + DRONE_API_KEY: ${DRONE_API_KEY} networks: - traefik-public user: '0' diff --git a/prometheus.yaml b/prometheus.yaml index 92139a8..24f2794 100644 --- a/prometheus.yaml +++ b/prometheus.yaml @@ -7,6 +7,14 @@ scrape_configs: static_configs: - targets: - "traefik:8080" + - job_name: 'drone' + metrics_path: /metrics + static_configs: + - targets: + - "drone:80" + authorization: + type: Bearer + credentials: '${DRONE_API_KEY}' # - job_name: node_exporter # static_configs: # - targets: