- job_name: ‘sli-metrics-component’
scheme: https
authorization:
type: Bearer
credenetials: “”
tls_config:
insecure_skip_verify: true
metrics_path: /metrics/slis
kubernetes_sd_configs:- role: node
Reference Document : Kubernetes Component SLI Metrics | Kubernetes
I have created a job in the Prometheus Helm values file to scrape Kubernetes Component SLI metrics. When I execute the command kubectl get --raw /metrics/slis
, I receive the following two metrics: kubernetes_healthcheck
and kubernetes_healthchecks_total
.
According to the reference document, this metric endpoint is exposed on the serving HTTPS port of each component, specifically at the path /metrics/slis
. I have created a service account with cluster view role access, and I can see that my target appears healthy in the Targets and Service Discovery sections of the Prometheus UI. However, I am unable to see the related metrics (kubernetes_healthcheck
and kubernetes_healthchecks_total
) when querying in the Prometheus UI.
While I can successfully retrieve these metrics using the command kubectl get --raw /metrics/slis
, I encounterd an issue with the following curl command:
curl -k -H “Authorization: Bearer ” https://:10250/metrics/slis
The request authenticates correctly, but I only see the last two lines as comments and not the expected metrics. In contrast, when I execute:
curl -k -H “Authorization: Bearer ” https://:10250/metrics/cadvisor
I can see metrics related to cAdvisor, but the /metrics/slis path returns nothing and does not produce any error messages. I have also tried /metrics/slis request by giving cluster admin role service account token but still facing the same issue.
For your information, I am using EKS (1.29) with self-managed nodes.