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

Only keep certain K8s API server metrics by default #384

Merged
merged 5 commits into from
Feb 4, 2021

Conversation

hjet
Copy link
Contributor

@hjet hjet commented Feb 4, 2021

PR Description

Per #352 and other user feedback, the default scrape configuration results in a large number of metrics being shipped out of the box, which can create a significant storage costs.

Using guidelines from https://grafana.com/docs/grafana-cloud/billing-and-usage/prometheus/usage-reduction-k8s/, this temporary fix only scrapes a handful of API server metrics by default instead of scraping everything (~20k active series).

The inclusion criteria is basically "are these API server metrics referenced in a kubernetes-mixin dashboard." If they are referenced in a recording rule, they are not included here.

This is not a perfect solution to this problem, but a temporary patch to make the default less jarring and cost-intensive for users getting started with the agent.

Which issue(s) this PR fixes

Notes to the Reviewer

@rfratto Please generate the relevant JSON from the Tanka... got a new laptop and still have to set up all the build stuff...Sorry!!

PR Checklist

  • [✔️ ] CHANGELOG updated
  • Documentation added
  • Tests updated

@hjet hjet requested a review from rfratto February 4, 2021 21:00
@hjet
Copy link
Contributor Author

hjet commented Feb 4, 2021

Updating changelog

Copy link
Member

@rfratto rfratto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'd like to fix the changelog but this LGTM, and I'm sure will be appreciated by new users :)

CHANGELOG.md Outdated
Comment on lines 7 to 9
- [ENHANCEMENT] Only keep a handful of K8s API server metrics by default to reduce
default active series usage.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I try to sort the changelog, can you add it after the last [ENHANCEMENT] entry and also credit yourself like the other examples?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, sorry

Merge branch 'limit_apiserver_metrics' of github.com:grafana/agent into limit_apiserver_metrics
Copy link
Member

@rfratto rfratto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you! I'll merge as soon as the CI is green

@rfratto rfratto merged commit 2a562d2 into master Feb 4, 2021
@rfratto rfratto deleted the limit_apiserver_metrics branch February 4, 2021 21:47
@mattdurham mattdurham mentioned this pull request Sep 7, 2021
3 tasks
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Apr 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants