fix(observability): enable ArgoCD/CoreDNS scraping, add cluster label, fix node dashboard

This commit is contained in:
Martin McCaffery 2026-06-01 16:47:31 +01:00
parent 3212016398
commit da0ccbd1b5
No known key found for this signature in database
GPG key ID: 7C4D0F375BCEE533
4 changed files with 58 additions and 4 deletions

View file

@ -0,0 +1,13 @@
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
name: argocd
spec:
namespaceSelector:
matchNames:
- argocd
selector:
matchLabels:
app.kubernetes.io/part-of: argocd
endpoints:
- port: metrics

View file

@ -0,0 +1,14 @@
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
name: coredns
spec:
namespaceSelector:
matchNames:
- kube-system
selector:
matchLabels:
k8s-app: coredns
podMetricsEndpoints:
- targetPort: 9153
path: /metrics

View file

@ -711,10 +711,8 @@ vmagent:
port: "8429"
selectAllByDefault: true
scrapeInterval: 20s
externalLabels: {}
# For multi-cluster setups it is useful to use "cluster" label to identify the metrics source.
# For example:
# cluster: cluster-name
externalLabels:
cluster: observability
extraArgs:
promscrape.streamParse: "true"
# Do not store original labels in vmagent's memory by default. This reduces the amount of memory used by vmagent
@ -921,6 +919,11 @@ prometheus-node-exporter:
- action: drop
source_labels: [mountpoint]
regex: "/var/lib/kubelet/pods.+"
- action: replace
source_labels: [__name__, instance]
regex: "node_uname_info;([^:]+):.+"
target_label: nodename
replacement: "$1"
# -- kube-state-metrics dependency chart configuration. For possible values check [here](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-state-metrics/values.yaml)
kube-state-metrics:
enabled: true