From e4fba8208e559f3ccc5105839033c95f4d62762d Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 31 Jan 2023 21:45:59 +0000 Subject: [PATCH] Add speedtest exporter --- .../forrest/files/prometheus/docker-compose.yml | 5 +++++ .../roles/forrest/files/prometheus/prometheus.yml | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/ansible/roles/forrest/files/prometheus/docker-compose.yml b/ansible/roles/forrest/files/prometheus/docker-compose.yml index 0cc8a7c..d670712 100644 --- a/ansible/roles/forrest/files/prometheus/docker-compose.yml +++ b/ansible/roles/forrest/files/prometheus/docker-compose.yml @@ -48,6 +48,11 @@ services: - PVE_TOKEN_VALUE={{ prometheus_api_token }} - PVE_VERIFY_SSL=false + speedtest_exporter: + image: jraviles/prometheus_speedtest:latest + restart: unless-stopped + user: "{{ docker_user.id }}" + networks: grafana: external: true diff --git a/ansible/roles/forrest/files/prometheus/prometheus.yml b/ansible/roles/forrest/files/prometheus/prometheus.yml index 9012327..2c87116 100644 --- a/ansible/roles/forrest/files/prometheus/prometheus.yml +++ b/ansible/roles/forrest/files/prometheus/prometheus.yml @@ -134,3 +134,15 @@ scrape_configs: - source_labels: [__name__] regex: go_.+ action: drop + + - job_name: speedtest + scrape_interval: 10m + scrape_timeout: 2m + metrics_path: /probe + static_configs: + - targets: + - speedtest_exporter:9516 + metric_relabel_configs: + - source_labels: [__name__] + target_label: __name__ + replacement: speedtest_$1