This repository has been archived by the owner on Oct 6, 2024. It is now read-only.
forked from vegasbrianc/github-monitoring
-
Notifications
You must be signed in to change notification settings - Fork 105
/
prometheus.yml
76 lines (63 loc) · 2.33 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
# my global config
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).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'Alertmanager'
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- 'alert.rules'
# - "first.rules"
# - "second.rules"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- job_name: 'speedtest'
metrics_path: /metrics
scrape_interval: 15m
scrape_timeout: 60s # running speedtest needs time to complete
static_configs:
- targets: ['speedtest:9696']
- 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']
- job_name: 'sonos'
static_configs:
- targets: ['192.168.1.42:1915']