Add node job phase metric showing active jobs on nodes#4635
Merged
nikola-jokic merged 5 commits intomasterfrom Jan 29, 2026
Merged
Add node job phase metric showing active jobs on nodes#4635nikola-jokic merged 5 commits intomasterfrom
nikola-jokic merged 5 commits intomasterfrom
Conversation
Signed-off-by: Nikola Jokic <jokicnikola07@gmail.com>
dejanzele
reviewed
Jan 28, 2026
internal/scheduler/metrics.go
Outdated
| phaseCountByQueue[key]++ | ||
|
|
||
| switch phase { | ||
| case "PENDING", "RUNNING": // Only active phases |
Member
There was a problem hiding this comment.
Can we use schedulerobjects.JobRunState_name[schedulerobjects.JobRunState_RUNNING] and schedulerobjects.JobRunState_name[schedulerobjects.JobRunState_PENDING] instead of hardcoded strings?
It is not perfect, but we reuse existing logic without duplication or repetition.
dejanzele
reviewed
Jan 28, 2026
|
|
||
| var NodeJobPhaseCounterDesc = prometheus.NewDesc( | ||
| MetricPrefix+"node_job_phase_count", | ||
| "Number of jobs in a given phase on a node", |
Member
There was a problem hiding this comment.
nit: I'd tweak the description a bit to explain all metric labels, for example:
Count of jobs per node, executor, and job phase.
Signed-off-by: Nikola Jokic <jokicnikola07@gmail.com>
Signed-off-by: Nikola Jokic <jokicnikola07@gmail.com>
JamesMurkin
approved these changes
Jan 28, 2026
Sigele
pushed a commit
to Sigele/armada
that referenced
this pull request
Jan 30, 2026
…#4635) <!-- Thanks for sending a pull request! Here are some tips for you: --> #### What type of PR is this? Feature #### What this PR does / why we need it Include metric showing active jobs on nodes by executor --------- Signed-off-by: Nikola Jokic <jokicnikola07@gmail.com> Signed-off-by: Sigele Nickerson-Adams <sigele.nickerson-adams@nmc2.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Feature
What this PR does / why we need it
Include metric showing active jobs on nodes by executor