This repository has been archived by the owner on Jun 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 138
/
Copy pathprometheus.yml
76 lines (69 loc) · 2.61 KB
/
prometheus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
external_labels:
monitor: 'Alertmanager'
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- 'alert.rules'
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- job_name: 'speedtest'
metrics_path: /metrics
scrape_interval: 30m
scrape_timeout: 60s # running speedtest needs time to complete
static_configs:
- targets: ['speedtest:9798']
# This job config only works with my internet-pi configuration currently,
# if you also have the shelly plug enabled there. It will just error out
# by default if you don't have a Shelly Plug on your network. Someday I'll
# work on making this more configurable...
- job_name: 'shelly-plug'
metrics_path: /metrics
scrape_interval: 1m
static_configs:
- targets: ['172.17.0.1:9924']
# This job config only works with my internet-pi configuration currently,
# if you also have starlink enabled there. It will just error out by default
# if you don't have Starlink. Someday I'll work on making this more
# configurable...
- job_name: 'starlink'
metrics_path: /metrics
static_configs:
- targets: ['172.17.0.1:9817']
- job_name: 'ping'
metrics_path: /probe
scrape_interval: 5s
params:
module: [http_2xx] # Look for a HTTP 200 response.
file_sd_configs:
- files:
- pinghosts.yaml
relabel_configs:
- source_labels: [__address__]
regex: '(.*);(.*);(.*);(.*)' #first is the url, thus unique for instance
target_label: instance
replacement: $1
- source_labels: [__address__]
regex: '(.*);(.*);(.*);(.*)' #second is humanname to use in charts
target_label: humanname
replacement: $2
- source_labels: [__address__]
regex: '(.*);(.*);(.*);(.*)' #third state whether this is testing external or internal network
target_label: routing
replacement: $3
- source_labels: [__address__]
regex: '(.*);(.*);(.*);(.*)' #fourth is which switch/router the device is connected to.
target_label: switching
replacement: $4
- source_labels: [instance]
target_label: __param_target
- target_label: __address__
replacement: ping:9115 # The blackbox exporter's real hostname:port.
- job_name: 'nodeexp'
static_configs:
- targets: ['nodeexp:9100']