Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using kube-state-metrics (custom resource state metrics) seems to upset metricbeat #36380

Closed
MKruger777 opened this issue Aug 21, 2023 · 3 comments
Assignees
Labels
Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team

Comments

@MKruger777
Copy link

MKruger777 commented Aug 21, 2023

Hi there,

I am running metricbeat:8.6.1 and prometheus:2.43.1 on AKS 1.25.6
Both of these are scraping metrics from kube-state-metrics:2.8.2

Because of an edge case we were forced to make use of the Custom Resource State Metrics functionality within kube-state-metrics as described here:
https://github.com/kubernetes/kube-state-metrics/blob/main/docs/customresourcestate-metrics.md

A new metric was introduced that is of the type “Info”.
After this was deployed to kube-state-metrics Prometheus was able to scrape this and all worked perfect.

The only problem is that it seems to break meticbeat.
When looking in the logs, we see the following:
decoding of metric family failed: text format parsing error in line 13966: unknown metric type "info".

Is this a case of missing functionality or miss configuration?

Many thanks!

Kind regards,
Morné Kruger

Tasks

Preview Give feedback
No tasks being tracked yet.
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 21, 2023
@tetianakravchenko
Copy link
Contributor

Hey @MKruger777

I've tested it and on stack and metricbeat version 8.6.2 I indeed can see this error:

{"log.level":"error","@timestamp":"2023-09-13T12:42:57.132Z","log.logger":"kubernetes.state_pod","log.origin":{"file.name":"kubernetes/state_metricset.go","file.line":97},"message":"decoding of metric family failed: text format parsing error in line 1693: unknown metric type \"info\"","service.name":"metricbeat","ecs.version":"1.6.0"}

In version 8.7 were introduced textparser in prometheus module helper library. I've tested 8.7.1 version and I am not getting the error above, all kubernetes metrics are available.

Can you upgrade metricbeat version to at least 8.7.1? You can use output.elasticsearch.allow_older_versions for testing before upgrading the stack.

Alternatively, I think the better option would be to run 2 kube-state-metrics. One for all standard metrics and another one for custom resource metrics only with --custom-resource-state-only=true flag.

@tetianakravchenko tetianakravchenko self-assigned this Sep 13, 2023
@MKruger777
Copy link
Author

Hey @tetianakravchenko , thank you so much for checking this out - much appreciated!
I will give the alternatives a whirl and get back to you.

@tetianakravchenko tetianakravchenko added the Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team label Sep 14, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 14, 2023
@tetianakravchenko
Copy link
Contributor

I will close this issue, since there were no updates. @MKruger777 feel free to reopen if any help is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team
Projects
None yet
Development

No branches or pull requests

2 participants