Merge pull request #6 from grafana/add_kube_state_metrics_scraping

Add scraping of kube state metrics
This commit is contained in:
Michel Hollands 2023-07-28 09:42:16 +01:00 committed by GitHub
commit 07a336d9ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -63,6 +63,13 @@ data:
targets = discovery.relabel.rename_meta_labels.output
forward_to = [ {{ include "agent.prometheus_write_targets" . }} ]
}
{{- if .Values.kubeStateMetrics.enabled }}
prometheus.scrape "kubeStateMetrics" {
targets = [ { "__address__" = "{{ .Values.kubeStateMetrics.endpoint }}" } ]
forward_to = [ {{ include "agent.prometheus_write_targets" . }} ]
}
{{- end }}
{{- end }}
{{- if or .Values.local.traces.enabled .Values.cloud.traces.enabled }}

View File

@ -46,6 +46,14 @@ global:
rootUser: "rootuser"
rootPassword: "rootpassword"
kubeStateMetrics:
# Scrape https://github.com/kubernetes/kube-state-metrics by default
enabled: true
# This endpoint is created when the helm chart from
# https://artifacthub.io/packages/helm/prometheus-community/kube-state-metrics/
# is used. Change this if kube-state-metrics is installed somewhere else.
endpoint: kube-state-metrics.kube-state-metrics.svc.cluster.local:8080
# The following are configuration for the dependencies.
# These should not be changed.