-
Notifications
You must be signed in to change notification settings - Fork 810
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
Add users stats http api to ingester #6178
Add users stats http api to ingester #6178
Conversation
Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
pkg/ingester/http_admin.go
Outdated
APIIngestionRate float64 `json:"APIIngestionRate"` | ||
RuleIngestionRate float64 `json:"RuleIngestionRate"` | ||
ActiveSeries uint64 `json:"activeSeries"` | ||
LoadBlocks uint64 `json:"loadBlocks"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unclear to me. I see it just uses db.Blocks()
. Does it include head block as well?
How we gonna use this data to help with scale down. Do we check LoadBlocks==0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be "loadedBlocks" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, these are blocks loaded from disk. Head is not really a block yet. The check is more LoadBlocks == 0 && ActiveSeries == 0
. I did a revision adding a +1 to loaded blocks to count for the head, but it seems more a hack than what it should be.
I will change the naming for LoadedBlocks
, but i would leave it without the head
Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
Signed-off-by: Daniel Blando <daniel@blando.com.br>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
* Add users stats http api to ingester Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com> * Changelog Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com> * Change name for loadedBlocks Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com> --------- Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com> Signed-off-by: Daniel Blando <daniel@blando.com.br>
What this PR does:
As mentioned in the feature, it would be nice if we know ingesters are empty to safely scale it down.
This extends the existent api on distributors
/distributors/all_user_stats
to also ingesters/ingester/all_user_stats
.It was also added to the api the info about
Loaded blocks
which can be used to scale down ingesters.Example of the API on ingester
Which issue(s) this PR fixes:
Fixes #6144
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]