feat(metrics): Add node and kube metrics

This commit is contained in:
Tanguy Herbron 2024-12-05 22:26:53 +01:00
parent 6df7b921a2
commit 2ec8fb390f
5 changed files with 25 additions and 2 deletions

View 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

View 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

View File

@ -10,3 +10,4 @@ resources:
- prometheus
- grafana
- node-exporter
- kube-state-metrics

View File

@ -22,8 +22,7 @@ spec:
- --path.sysfs=/host/sys
- --path.rootfs=/host/root
- --no-collector.wifi
- --no-collector.hwmon
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
- --collector.filesystem.ignored-mount-points=^/(dev|proc|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
- --collector.netclass.ignored-devices=^(veth.*)$
name: node-exporter
image: prom/node-exporter

View File

@ -11,3 +11,6 @@ spec:
endpoints:
- port: node-exporter
path: /metrics
relabelings:
- sourceLabels: [__meta_kubernetes_pod_node_name]
targetLabel: instance