You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have KSM configured to publish Custom Resource Metrics along with builtin metrics. Some of the Custom Resource Metrics are of type Info and Stateset.
In my cluster, telegraf is my metric collector. I have configured telegraf to collect metrics from KSM as a promethus input plugin
[[inputs.prometheus]]
alias = "kube_state_metrics"
kubernetes_services = ["http://kube-state-metrics.kube-state-metrics-someurl:someport/metrics"]
name_prefix = "ksm_metrics_"
With this configuration the input plugin runs into the following error
2025-04-23T07:30:05Z E! [inputs.prometheus::kube_state_metrics] Error in plugin: error reading metrics for "http://someip:someport/metrics": decoding response failed: text format parsing error in line 7979: unknown metric type "info"
2025-04-23T07:30:05Z E! [inputs.prometheus::kube_state_metrics] Error in plugin: error reading metrics for "http://someip:someport/metrics": decoding response failed: text format parsing error in line 8359: unknown metric type "stateset"
Can someone help how i can fix this issue.
On querying the KSM metric endpoint, i see the following metrics for example
# HELP capi_cluster_status_condition_last_transition_time The condition's last transition time of a cluster.
# TYPE capi_cluster_status_condition_last_transition_time gauge
capi_cluster_status_condition_last_transition_time{customresource_group="cluster.x-k8s.io",customresource_kind="Cluster",customresource_version="v1beta1",name="somename",namespace="somenamespace",status="True",type="WorkerMachinesUpToDate",uid="50e401fb-9651-47e2-9baf-43d518cea952"} 1.744873934e+09
capi_cluster_status_condition_last_transition_time{customresource_group="cluster.x-k8s.io",customresource_kind="Cluster",customresource_version="v1beta1",name="somename",namespace="somenamespace",status="True",type="WorkersAvailable",uid="50e401fb-9651-47e2-9baf-43d518cea952"} 1.745265493e+09
# HELP capi_cluster_status_phase The clusters current phase.
# TYPE capi_cluster_status_phase stateset
capi_cluster_status_phase{customresource_group="cluster.x-k8s.io",customresource_kind="Cluster",customresource_version="v1beta1",name="somename",namespace="somenamespace",phase="Deleting",uid="50e401fb-9651-47e2-9baf-43d518cea952"} 0
capi_cluster_status_phase{customresource_group="cluster.x-k8s.io",customresource_kind="Cluster",customresource_version="v1beta1",name="somename",namespace="somenamespace",phase="Failed",uid="50e401fb-9651-47e2-9baf-43d518cea952"} 0
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Folks,
I have KSM configured to publish Custom Resource Metrics along with builtin metrics. Some of the Custom Resource Metrics are of type Info and Stateset.
In my cluster, telegraf is my metric collector. I have configured telegraf to collect metrics from KSM as a promethus input plugin
With this configuration the input plugin runs into the following error
2025-04-23T07:30:05Z E! [inputs.prometheus::kube_state_metrics] Error in plugin: error reading metrics for "http://someip:someport/metrics": decoding response failed: text format parsing error in line 7979: unknown metric type "info"
2025-04-23T07:30:05Z E! [inputs.prometheus::kube_state_metrics] Error in plugin: error reading metrics for "http://someip:someport/metrics": decoding response failed: text format parsing error in line 8359: unknown metric type "stateset"
Can someone help how i can fix this issue.
On querying the KSM metric endpoint, i see the following metrics for example
Beta Was this translation helpful? Give feedback.
All reactions