feat(metrics): Add node and kube metrics
This commit is contained in:
parent
6df7b921a2
commit
2ec8fb390f
7
manifests/kube-state-metrics/kustomization.yaml
Normal file
7
manifests/kube-state-metrics/kustomization.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: monitoring
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- git@github.com:kubernetes/kube-state-metrics/examples/standard?ref=v2.14.0
|
||||||
|
- servicemonitor.yaml
|
13
manifests/kube-state-metrics/servicemonitor.yaml
Normal file
13
manifests/kube-state-metrics/servicemonitor.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: kube-state-metrics
|
||||||
|
namespace: monitoring
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: exporter
|
||||||
|
app.kubernetes.io/name: kube-state-metrics
|
||||||
|
endpoints:
|
||||||
|
- port: http-metrics
|
||||||
|
path: /metrics
|
@ -10,3 +10,4 @@ resources:
|
|||||||
- prometheus
|
- prometheus
|
||||||
- grafana
|
- grafana
|
||||||
- node-exporter
|
- node-exporter
|
||||||
|
- kube-state-metrics
|
||||||
|
@ -22,8 +22,7 @@ spec:
|
|||||||
- --path.sysfs=/host/sys
|
- --path.sysfs=/host/sys
|
||||||
- --path.rootfs=/host/root
|
- --path.rootfs=/host/root
|
||||||
- --no-collector.wifi
|
- --no-collector.wifi
|
||||||
- --no-collector.hwmon
|
- --collector.filesystem.ignored-mount-points=^/(dev|proc|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
|
||||||
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
|
|
||||||
- --collector.netclass.ignored-devices=^(veth.*)$
|
- --collector.netclass.ignored-devices=^(veth.*)$
|
||||||
name: node-exporter
|
name: node-exporter
|
||||||
image: prom/node-exporter
|
image: prom/node-exporter
|
||||||
|
@ -11,3 +11,6 @@ spec:
|
|||||||
endpoints:
|
endpoints:
|
||||||
- port: node-exporter
|
- port: node-exporter
|
||||||
path: /metrics
|
path: /metrics
|
||||||
|
relabelings:
|
||||||
|
- sourceLabels: [__meta_kubernetes_pod_node_name]
|
||||||
|
targetLabel: instance
|
||||||
|
Loading…
Reference in New Issue
Block a user