-
Notifications
You must be signed in to change notification settings - Fork 0
/
prometheus.cm.yml
47 lines (47 loc) · 1.39 KB
/
prometheus.cm.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
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus
data:
prometheus.yml: |
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets: []
scheme: http
timeout: 10s
api_version: v1
scrape_configs:
- job_name: annotated-pods
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
kubernetes_sd_configs:
- role: pod
namespaces:
names:
- myproject
relabel_configs:
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
regex: true
action: keep
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
regex: (.+)(?::\d+);(\d+)
replacement: $1:$2
target_label: __address__
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
regex: ((?:/[^/ ]+)+)
target_label: __metrics_path__
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme]
regex: https?
target_label: __scheme__
- source_labels: [__meta_kubernetes_pod_name]
target_label: pod
- source_labels: [__meta_kubernetes_pod_label_app]
target_label: app
- source_labels: [__meta_kubernetes_pod_phase]
target_label: phase