2020-05-18 18:55:58 +00:00
|
|
|
apiVersion: monitoring.coreos.com/v1
|
|
|
|
kind: ServiceMonitor
|
|
|
|
metadata:
|
|
|
|
name: prometheus
|
|
|
|
labels:
|
2021-08-26 16:42:32 +00:00
|
|
|
app.kubernetes.io/name: prometheus
|
|
|
|
monitor: prometheus
|
2020-05-18 18:55:58 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2020-05-31 22:05:21 +00:00
|
|
|
operated-prometheus: "true"
|
2020-05-18 18:55:58 +00:00
|
|
|
endpoints:
|
|
|
|
- port: web
|
2020-05-31 22:05:21 +00:00
|
|
|
---
|
|
|
|
apiVersion: monitoring.coreos.com/v1
|
|
|
|
kind: ServiceMonitor
|
2020-05-18 18:55:58 +00:00
|
|
|
metadata:
|
|
|
|
name: kubelet
|
|
|
|
labels:
|
2021-08-26 16:42:32 +00:00
|
|
|
monitor: prometheus
|
2020-05-18 18:55:58 +00:00
|
|
|
spec:
|
|
|
|
namespaceSelector:
|
|
|
|
matchNames:
|
|
|
|
- kube-system
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: kubelet
|
|
|
|
endpoints:
|
|
|
|
- port: https-metrics
|
|
|
|
scheme: https
|
|
|
|
path: /metrics
|
|
|
|
honorLabels: true
|
|
|
|
interval: 60s
|
|
|
|
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
|
|
tlsConfig:
|
|
|
|
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
|
|
|
insecureSkipVerify: true
|
|
|
|
- port: https-metrics
|
|
|
|
scheme: https
|
|
|
|
path: /metrics/cadvisor
|
|
|
|
honorLabels: true
|
|
|
|
interval: 60s
|
|
|
|
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
|
|
tlsConfig:
|
|
|
|
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
|
|
|
insecureSkipVerify: true
|
2021-08-26 16:42:32 +00:00
|
|
|
---
|
|
|
|
apiVersion: monitoring.coreos.com/v1
|
|
|
|
kind: ServiceMonitor
|
|
|
|
metadata:
|
|
|
|
name: servicemonitor-http
|
|
|
|
labels:
|
|
|
|
monitor: prometheus
|
|
|
|
spec:
|
|
|
|
namespaceSelector:
|
|
|
|
any: true
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
monitor: prometheus
|
|
|
|
endpoints:
|
|
|
|
- port: http
|