forked from nymphbox/oxn
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcadvisor-servicemonitor.yaml
55 lines (55 loc) · 1.42 KB
/
cadvisor-servicemonitor.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
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: cadvisor
namespace: oxn-external-monitoring
labels:
release: kube-prometheus
spec:
selector:
matchLabels:
app: cadvisor
namespaceSelector:
matchNames:
- cadvisor
endpoints:
- port: http
interval: 30s
scrapeTimeout: 25s
path: /metrics
honorLabels: true
honorTimestamps: true
scheme: http
tlsConfig:
insecureSkipVerify: true
metricRelabelings:
- action: drop
regex: container_cpu_(cfs_throttled_seconds_total|load_average_10s|system_seconds_total|user_seconds_total)
sourceLabels:
- __name__
- action: drop
regex: container_fs_(io_current|io_time_seconds_total|io_time_weighted_seconds_total|reads_merged_total|sector_reads_total|sector_writes_total|writes_merged_total)
sourceLabels:
- __name__
- action: drop
regex: container_memory_(mapped_file|swap)
sourceLabels:
- __name__
- action: drop
regex: container_(file_descriptors|tasks_state|threads_max)
sourceLabels:
- __name__
- action: drop
regex: container_spec.*
sourceLabels:
- __name__
- action: drop
regex: .+;
sourceLabels:
- id
- pod
relabelings:
- action: replace
sourceLabels:
- __metrics_path__
targetLabel: metrics_path