From f9f795e234298e57b7b0f13063045b2142b3a811 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 24 Oct 2020 13:15:03 +0900 Subject: [PATCH] Add `Prometheus` config to scrape Router. --- .../files/etc/prometheus.d/prometheus.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cookbooks/prometheus/files/etc/prometheus.d/prometheus.yml b/cookbooks/prometheus/files/etc/prometheus.d/prometheus.yml index 80d7404..eed558e 100644 --- a/cookbooks/prometheus/files/etc/prometheus.d/prometheus.yml +++ b/cookbooks/prometheus/files/etc/prometheus.d/prometheus.yml @@ -81,6 +81,21 @@ scrape_configs: - target_label: __address__ replacement: 127.0.0.1:9116 # The SNMP exporter's real hostname:port. + - job_name: 'vyos' + static_configs: + - targets: + - 192.168.10.1 # SNMP device. + metrics_path: /snmp + params: + module: [if_mib] + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: 127.0.0.1:9116 # The SNMP exporter's real hostname:port. + alerting: alertmanagers: - static_configs: