• /
  • EnglishEspañol日本語한국어Português
  • Log inStart now

Error populating KSM metrics

Problem

The kubernetes integration requires kube-state-metrics. If this is missing or there is more than one, you may see an error in the nrk8s-ksm container logs similar to:

bash
$
time="2024-10-18T04:04:21Z" level=warning msg="Error populating KSM metrics: populate errors:, querying KSM: getting filtered metric families: error calling prometheus exposed metrics endpoint. Got status code: 400"
$
time="2024-10-18T04:04:21Z" level=warning msg="Error populating KSM metrics: populate errors:, querying KSM: getting filtered metric families: error calling prometheus exposed metrics endpoint. Got status code: 400"
$
time="2024-10-18T04:04:21Z" level=warning msg="Error populating KSM metrics: populate errors:, no data was populated"
$
time="2024-10-18T04:04:21Z" level=error msg="retrieving scraper data: retrieving ksm data: KSM data was not populated after trying all endpoints"

Solution

Try the following:

  • Refer suggestions at Failed to discover kube-state-metrics.
  • Specify namespace for the kube-state-metrics container. By default, the Kubernetes integration bundle creates it in the newrelic namespace.
newrelic-infrastructure:
ksm:
enabled: true
config:
selector: "app.kubernetes.io/name=kube-state-metrics"
namespace: "newrelic"
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.