mirror of
https://github.com/carlosedp/cluster-monitoring.git
synced 2024-11-20 19:07:17 +01:00
40 lines
970 B
YAML
40 lines
970 B
YAML
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
labels:
|
|
k8s-app: kubelet
|
|
name: kubelet
|
|
namespace: monitoring
|
|
spec:
|
|
endpoints:
|
|
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
interval: 30s
|
|
port: http-metrics
|
|
relabelings:
|
|
- sourceLabels:
|
|
- __metrics_path__
|
|
targetLabel: metrics_path
|
|
scheme: http
|
|
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
honorLabels: true
|
|
interval: 30s
|
|
metricRelabelings:
|
|
- action: drop
|
|
regex: container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s)
|
|
sourceLabels:
|
|
- __name__
|
|
path: /metrics/cadvisor
|
|
port: http-metrics
|
|
relabelings:
|
|
- sourceLabels:
|
|
- __metrics_path__
|
|
targetLabel: metrics_path
|
|
scheme: http
|
|
jobLabel: k8s-app
|
|
namespaceSelector:
|
|
matchNames:
|
|
- kube-system
|
|
selector:
|
|
matchLabels:
|
|
k8s-app: kubelet
|