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

How to set up only partial collection of metrics #2823

Open
garysdevil opened this issue Mar 5, 2021 · 7 comments
Open

How to set up only partial collection of metrics #2823

garysdevil opened this issue Mar 5, 2021 · 7 comments

Comments

@garysdevil
Copy link

Our prometheus pull metrics from k8s, but it can't finish request during 30s.
I think there are too much data and can not return result quickly.
So I want to only collect partial metrics.
Can I set up the configuration?
image

@iwankgb
Copy link
Collaborator

iwankgb commented Mar 6, 2021

https://github.com/google/cadvisor/blob/master/docs/runtime_options.md#metrics

@garysdevil
Copy link
Author

garysdevil commented Mar 9, 2021

https://github.com/google/cadvisor/blob/master/docs/runtime_options.md#metrics

  1. version: v0.39.0
  2. images: gcr.io/cadvisor/cadvisor@sha256:45a2a291b772c5a307260afc03d9be551e362b460ebde1a06a290f0736919baa

image

@pradykaushik
Copy link

isn't it supposed to be -disable_metrics? You might have to change the runtime flags set in the cadvisor deployment config.

@garysdevil
Copy link
Author

garysdevil commented Mar 10, 2021

isn't it supposed to be -disable_metrics? You might have to change the runtime flags set in the cadvisor deployment config.

image
It shows the parameter ”disable_specific_metrics“ in https://github.com/google/cadvisor/blob/release-v0.39/docs/runtime_options.md#metrics, but run failed

@pradykaushik
Copy link

pradykaushik commented Mar 10, 2021

Interesting. I just took a look at the latest commit on version 0.39.0 and it in fact removes this flag. This commit was made 4 days ago.

I then look at the documentation for runtime options on version 0.39.0 and -disable_specific_metrics is indeed there. In fact, it seems that it was added to the docs 5 days ago. So, was the flag removed from the codebase a day after it was added to the documentation? I'm not too familiar with the codebase but this feels like a discrepancy. Seems like there's been an attempt to stabilize cAdvisor API in Kubernetes. Probably better to wait for one of the maintainers to reply here.

That said, 0.39.0 is still a pre-release so might be better to switch to a more stable release.

cc @dashpole @iwankgb

@pradykaushik
Copy link

@garysdevil maybe these threads will help you get some context on what's happening here.
#2774
#2827

@garysdevil
Copy link
Author

@garysdevil maybe these threads will help you get some context on what's happening here.
#2774
#2827

Thanks very much for your help. I am still waiting the progress of maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants