62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: prometheus
|
|
labels:
|
|
app.kubernetes.io/name: prometheus
|
|
monitor: prometheus
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
operated-prometheus: "true"
|
|
endpoints:
|
|
- port: web
|
|
---
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: kubelet
|
|
labels:
|
|
monitor: prometheus
|
|
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
|
|
---
|
|
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
|