prometheus related updates
[distro-setup] / filesystem / etc / prometheus / prometheus.yml
1 # Sample config for Prometheus.
2
3 global:
4
5
6 ## temporary for quickly testing during development. default is 60s
7 ## for both.
8 # scrape_interval: 5s
9 # evaluation_interval: 5s
10 # and also useful
11 # /etc/default/prometheus
12 # --query.lookback-delta=15s
13 # the default lookback is 5 minutes, there is a way to change
14 # it per query in the api with a QueryOpt option, but it isnt exposed in the web ui.
15
16 # Attach these labels to any time series or alerts when communicating with
17 # external systems (federation, remote storage, Alertmanager).
18 external_labels:
19 monitor: kd.b8.nz
20
21 # Alertmanager configuration
22 alerting:
23 alertmanagers:
24 - static_configs:
25 - targets: ['localhost:9093']
26
27 # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
28 rule_files:
29 - /etc/prometheus/rules/*.yml
30 # - "first_rules.yml"
31 # - "second_rules.yml"
32
33 # A scrape configuration containing exactly one endpoint to scrape:
34 # Here it's Prometheus itself.
35 scrape_configs:
36 # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
37 - job_name: 'prometheus'
38
39 # metrics_path defaults to '/metrics'
40 # scheme defaults to 'http'.
41
42 static_configs:
43 - targets: ['localhost:9090']
44 labels:
45 instance: 'kd'
46 - job_name: 'alertmanager'
47 static_configs:
48 -
49 targets: ['localhost:9093']
50 labels:
51 instance: 'kd'
52
53
54 - job_name: simple_node
55 file_sd_configs:
56 - files:
57 - /etc/prometheus/file_sd/simple_node.yml
58
59 - job_name: node
60 scheme: https
61 tls_config:
62 # Verifying remote identity
63 ca_file: /etc/prometheus/ssl/prom_node_cert.pem
64 server_name: prom_node
65 # Asserting our identity
66 cert_file: /etc/prometheus/ssl/prometheus_cert.pem
67 key_file: /etc/prometheus/ssl/prometheus_key.pem
68 file_sd_configs:
69 - files:
70 - /etc/prometheus/file_sd/node.yml
71 relabel_configs:
72 - source_labels: [__address__]
73 regex: "localhost:9100"
74 replacement: kd
75 target_label: instance
76 - source_labels: [__address__]
77 regex: "(.*)wg:.*"
78 # this is the default:
79 #replacement: "${1}"
80 target_label: instance
81
82 - job_name: tlsnode
83 scheme: https
84 basic_auth:
85 username: prom
86 password_file: /etc/prometheus-pass
87 file_sd_configs:
88 - files:
89 - /etc/prometheus/file_sd/tlsnode.yml