hashicorp / hashicorp/nomad

unblocking eval doesn't decrease `blocked_evals_total_blocked` metric

Open
#16,147 1 comment 1 reaction 0 assignees View on GitHub
stage/accepted theme/metrics type/bug
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Nomad version
`Nomad v1.4.1 (2aa7e66bdb526e25f59883952d74dad7ea9a014e)`

### Operating system and Environment details
RHEL 7.9
Docker 20.10.14

### Issue
The following metric appears to be a counter, as it shows an evaluation blocked - we definitely had one blocked, but have since resolved it.
```
# HELP nomad_nomad_blocked_evals_total_blocked nomad_nomad_blocked_evals_total_blocked
# TYPE nomad_nomad_blocked_evals_total_blocked gauge
nomad_nomad_blocked_evals_total_blocked{host="somehost"} 1
```

```
larsonb►nomad eval list -status Pending
No evals found
larsonb►nomad eval list -status Blocked
No evals found
```

### Reproduction steps
Block an eval and see if it returns to 0 or increments.
#### Expected Result
Should either be a gauge or a counter

#### Actual Result
Seems to act like a counter.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the blocked-evaluation lifecycle and inspecting where the blocked_evals_total_blocked metric is registered and updated in Nomad. Confirm whether it is intended to be a gauge or counter, then verify the metric after an evaluation is blocked and subsequently unblocked; done means its behavior and HELP/TYPE output match the chosen semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.