-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Metrics for periodic jobs are creating too many timeseries due to timestamps in the labels #4061
Comments
What is your suggestion? |
I have nothing right now. Can we have this ticket open for brainstorming? I'll be doing some meditation as well and can post what I come up with. |
A pattern we use (for totally unrelated metrics in Prometheus) is:
With some elbow-grease maybe something similar can be thought up for this case? |
Sounds good. Improving metrics is always a worth while effort! |
So I'm worried about doing something like this (pseudocode mixed with Python, not valid go):
This emits things but it sort of butchers the way Periodic jobs are even named in the first place within Nomad - smells funny to me. |
In the meantime, rewriting the label on ingest is a workable stopgap:
(in the example above, the job label is already taken by service discovery) I do like having the indication of a periodic job, but I agree that altering the original job name can lead to confusion. Adding another label: job_type="periodic" may be helpful here. Rather than last_success_timestamp{} we could have something like the following that could apply to any job type:
For periodic tasks, It would be great to have metrics like:
|
Great insights, thanks. |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Hello,
This is some sample output of the Nomad
task_group_*
metrics:This is a misuse of labels in Prometheus: https://prometheus.io/docs/practices/naming/#labels
There should be a better way of representing this.
The text was updated successfully, but these errors were encountered: