Skip to content

New program to generate Cortex usage stats from metrics #2654

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

Merged
merged 2 commits into from
Feb 28, 2020

Conversation

bboreham
Copy link

@bboreham bboreham commented Feb 24, 2020

Currently, "samples" usage stats are sent to bigtable from Cortex Distributor pods as each request arrives. That's over 1,400 per second as of February 2020.

Since (a) this is very expensive for data we don't actually use in billing and (b) cortexproject/cortex#1491 will remove the hook from Distributor, I wrote this program to do it differently.

This program runs once a minute, querys Prometheus for the number of samples per instance in the last minute, then emits them to be sent by the billing-ingester sidecar as before. I'm sending them with the tag metrics-samples so this program can be run in parallel with the current distributor mechanism. Both appear on the admin/billing page.

It will under-report if Prometheus is restarted, or if the program itself is down for several minutes.

Ref https://github.com/weaveworks/service-conf/issues/3712

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

Successfully merging this pull request may close these issues.

1 participant