network-monitor/prometheus/prometheus.yml

53 lines
1.5 KiB
YAML
Raw Normal View History

2017-02-21 12:38:27 +00:00
global:
2021-07-05 13:52:48 +00:00
scrape_interval: 15s
evaluation_interval: 15s
scrape_timeout: 10s
2017-02-21 12:38:27 +00:00
external_labels:
2021-07-05 13:52:48 +00:00
monitor: 'Alertmanager'
2017-02-21 12:38:27 +00:00
rule_files:
2021-07-05 13:52:48 +00:00
- 'alert.rules'
2017-02-21 12:38:27 +00:00
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
2021-07-05 13:52:48 +00:00
- targets: ['localhost:9090']
2018-10-01 10:48:41 +00:00
- job_name: 'speedtest'
metrics_path: /metrics
2021-07-06 19:47:17 +00:00
scrape_interval: 30m # How often should we run speed tests
2021-07-05 13:52:48 +00:00
scrape_timeout: 60s # running speedtest needs time to complete
2018-10-01 10:48:41 +00:00
static_configs:
2021-07-05 13:52:48 +00:00
- targets: ['speedtest:9798']
2018-10-01 16:31:07 +00:00
- job_name: 'ping'
2018-10-01 10:48:41 +00:00
metrics_path: /probe
2021-07-06 19:47:17 +00:00
scrape_interval: 5s # How often should we probe the pinghosts
2018-10-01 10:48:41 +00:00
params:
module: [http_2xx] # Look for a HTTP 200 response.
file_sd_configs:
- files:
2021-07-05 13:52:48 +00:00
- pinghosts.yaml
2018-10-01 10:48:41 +00:00
relabel_configs:
- source_labels: [__address__]
2021-07-05 14:03:52 +00:00
regex: '(.*);(.*);(.*)' # first is the url, thus unique for instance
2018-10-01 10:48:41 +00:00
target_label: instance
replacement: $1
- source_labels: [__address__]
2021-07-05 14:03:52 +00:00
regex: '(.*);(.*);(.*)' # second is humanname to use in charts
target_label: humanname
replacement: $2
2021-07-05 14:03:52 +00:00
- source_labels: [__address__]
regex: '(.*);(.*);(.*)' # third specifies external or internal network
target_label: routing
replacement: $3
- source_labels: [instance]
target_label: __param_target
2018-10-01 10:48:41 +00:00
- target_label: __address__
2018-10-01 16:31:07 +00:00
replacement: ping:9115 # The blackbox exporter's real hostname:port.
2018-10-07 22:01:07 +00:00
- job_name: 'nodeexp'
static_configs:
2021-07-05 13:52:48 +00:00
- targets: ['nodeexp:9100']