Skip to content

Add node job phase metric showing active jobs on nodes#4635

Merged
nikola-jokic merged 5 commits intomasterfrom
nikola-jokic/node-job-metrics
Jan 29, 2026
Merged

Add node job phase metric showing active jobs on nodes#4635
nikola-jokic merged 5 commits intomasterfrom
nikola-jokic/node-job-metrics

Conversation

@nikola-jokic
Copy link
Contributor

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>
phaseCountByQueue[key]++

switch phase {
case "PENDING", "RUNNING": // Only active phases
Copy link
Member

Choose a reason for hiding this comment

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

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.


var NodeJobPhaseCounterDesc = prometheus.NewDesc(
MetricPrefix+"node_job_phase_count",
"Number of jobs in a given phase on a node",
Copy link
Member

Choose a reason for hiding this comment

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

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>
@nikola-jokic nikola-jokic merged commit 628ef6e into master Jan 29, 2026
14 checks passed
@nikola-jokic nikola-jokic deleted the nikola-jokic/node-job-metrics branch January 29, 2026 14:27
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>
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.

3 participants