forked from pablokbs/peladonerd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path07-prometheus-adapter-configmap.yaml
106 lines (106 loc) · 3.99 KB
/
07-prometheus-adapter-configmap.yaml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
apiVersion: v1
data:
config.yaml: |-
"resourceRules":
"cpu":
"containerLabel": "container"
"containerQuery": "sum(irate(container_cpu_usage_seconds_total{<<.LabelMatchers>>,container!=\"POD\",container!=\"\",pod!=\"\"}[5m])) by (<<.GroupBy>>)"
"nodeQuery": "sum(1 - irate(node_cpu_seconds_total{mode=\"idle\"}[5m]) * on(namespace, pod) group_left(node) node_namespace_pod:kube_pod_info:{<<.LabelMatchers>>}) by (<<.GroupBy>>)"
"resources":
"overrides":
"namespace":
"resource": "namespace"
"node":
"resource": "node"
"pod":
"resource": "pod"
"memory":
"containerLabel": "container"
"containerQuery": "sum(container_memory_working_set_bytes{<<.LabelMatchers>>,container!=\"POD\",container!=\"\",pod!=\"\"}) by (<<.GroupBy>>)"
"nodeQuery": "sum(node_memory_MemTotal_bytes{job=\"node-exporter\",<<.LabelMatchers>>} - node_memory_MemAvailable_bytes{job=\"node-exporter\",<<.LabelMatchers>>}) by (<<.GroupBy>>)"
"resources":
"overrides":
"instance":
"resource": "node"
"namespace":
"resource": "namespace"
"pod":
"resource": "pod"
"window": "5m"
"rules":
- "metricsQuery": "sum(rate(<<.Series>>{<<.LabelMatchers>>,container!=\"POD\"}[1m])) by (<<.GroupBy>>)"
"name":
"as": ""
"matches": "^container_(.*)_seconds_total$"
"resources":
"overrides":
"namespace":
"resource": "namespace"
"pod":
"resource": "pod"
"seriesFilters": []
"seriesQuery": "{__name__=~\"^container_.*\",container!=\"POD\",namespace!=\"\",pod!=\"\"}"
- "metricsQuery": "sum(rate(<<.Series>>{<<.LabelMatchers>>,container!=\"POD\"}[1m])) by (<<.GroupBy>>)"
"name":
"as": ""
"matches": "^container_(.*)_total$"
"resources":
"overrides":
"namespace":
"resource": "namespace"
"pod":
"resource": "pod"
"seriesFilters":
- "isNot": "^container_.*_seconds_total$"
"seriesQuery": "{__name__=~\"^container_.*\",container!=\"POD\",namespace!=\"\",pod!=\"\"}"
- "metricsQuery": "sum(<<.Series>>{<<.LabelMatchers>>,container!=\"POD\"}) by (<<.GroupBy>>)"
"name":
"as": ""
"matches": "^container_(.*)$"
"resources":
"overrides":
"namespace":
"resource": "namespace"
"pod":
"resource": "pod"
"seriesFilters":
- "isNot": "^container_.*_total$"
"seriesQuery": "{__name__=~\"^container_.*\",container!=\"POD\",namespace!=\"\",pod!=\"\"}"
- "metricsQuery": "sum(<<.Series>>{<<.LabelMatchers>>}) by (<<.GroupBy>>)"
"name":
"as": ""
"matches": ""
"resources":
"template": "<<.Resource>>"
"seriesFilters":
- "isNot": ".*_total$"
"seriesQuery": "{namespace!=\"\",__name__!~\"^container_.*\"}"
- "metricsQuery": "sum(rate(<<.Series>>{<<.LabelMatchers>>}[1m])) by (<<.GroupBy>>)"
"name":
"as": ""
"matches": "^(.*)_total$"
"resources":
"template": "<<.Resource>>"
"seriesFilters":
- "isNot": ".*_seconds_total"
"seriesQuery": "{namespace!=\"\",__name__!~\"^container_.*\"}"
- "metricsQuery": "sum(rate(<<.Series>>{<<.LabelMatchers>>}[1m])) by (<<.GroupBy>>)"
"name":
"as": ""
"matches": "^(.*)_seconds_total$"
"resources":
"template": "<<.Resource>>"
"seriesFilters": []
"seriesQuery": "{namespace!=\"\",__name__!~\"^container_.*\"}"
"externalRules":
- "metricsQuery": "sum(rate(http_requests_total{service=\"hello-svc\"}[1m]))"
"name":
"as": "http_requests_in_flight_hello"
"matches": ""
"resources":
"template": "<<.Resource>>"
"seriesQuery": "{__name__=~\"^http_requests_total\"}"
kind: ConfigMap
metadata:
name: adapter-config
namespace: monitoring