minor improvement
[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
17 # Alertmanager configuration
18 alerting:
19 alertmanagers:
20 - static_configs:
21 - targets: ['localhost:9093']
22
23 # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
24 rule_files:
25 - /etc/prometheus/rules/*.yml
26 # - "first_rules.yml"
27 # - "second_rules.yml"
28
29 # A scrape configuration containing exactly one endpoint to scrape:
30 # Here it's Prometheus itself.
31 scrape_configs:
32 # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
33 - job_name: 'prometheus'
34
35 # metrics_path defaults to '/metrics'
36 # scheme defaults to 'http'.
37
38 static_configs:
39 - targets: ['localhost:9090']
40 labels:
41 instance: 'kd'
42 - job_name: 'alertmanager'
43 static_configs:
44 -
45 targets: ['localhost:9093']
46 labels:
47 instance: 'kd'
48
49
50 - job_name: simple_node
51 file_sd_configs:
52 - files:
53 - /etc/prometheus/file_sd/simple_node.yml
54
55 - job_name: node
56 scheme: https
57 tls_config:
58 # Verifying remote identity
59 ca_file: /etc/prometheus/ssl/prom_node_cert.pem
60 server_name: prom_node
61 # Asserting our identity
62 cert_file: /etc/prometheus/ssl/prometheus_cert.pem
63 key_file: /etc/prometheus/ssl/prometheus_key.pem
64 file_sd_configs:
65 - files:
66 - /etc/prometheus/file_sd/node.yml
67 relabel_configs:
68 - source_labels: [__address__]
69 regex: "localhost:9100"
70 replacement: kd
71 target_label: instance
72 - source_labels: [__address__]
73 regex: "(.*)wg:.*"
74 # this is the default:
75 #replacement: "${1}"
76 target_label: instance
77
78 - job_name: tlsnode
79 scheme: https
80 basic_auth:
81 username: prom
82 password_file: /etc/prometheus-pass
83 file_sd_configs:
84 - files:
85 - /etc/prometheus/file_sd/tlsnode.yml