Skip to content
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

[YUNIKORN-970] Add queue metrics with queue names as labels #365

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 54 additions & 7 deletions docs/metrics/queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,37 @@ specific language governing permissions and limitations
under the License.
-->

## Queue
### Application
Eech queue has a `<queue_name> queue_app` metric to trace the applications in the queue.
## Application
Each queue has a `<queue_name> queue_app` metric to trace the applications in the queue.
`<queue_name> queue_app` metrics records the number of applications in different states.
These application states include `running`, `accepted`, `rejected`, `failed` and `completed`.
`<queue_name> queue_app` metrics record container states including `released`, `allocated`.
**Metric Type**: `guage`
`<queue_name> queue_app` metrics record container states including `released`, `allocated`.

Prior to `1.5.0` queue metrics were pushed to a separate subsystem for each queue. In `1.5.0`
fixed metrics with `<queue name>` labels were introduced. Metrics using `<queue name>` subsystems
will be **deprecated in `1.6.0` and removed in `1.7.0`** in favor of a `<queue name>` label based approach.

### Label
(Introduced in `1.5.0`)

**Metric Type**: `gauge`

**Namespace**: `yunikorn`

**Label**: `queue: <queue name>`

**TYPE**: `yunikorn_queue_app`

```json
yunikorn_queue_app{queue="root.default",state="accepted"} 3
yunikorn_queue_app{queue="root.default",state="running"} 3
```

### Subsystem
|:exclamation: To be deprecated in `1.6.0` and removed in `1.7.0`|
|----------------------------------------------------------------|

**Metric Type**: `gauge`

**Namespace**: `yunikorn`

Expand All @@ -41,11 +65,34 @@ yunikorn_root_default_queue_app{state="accepted"} 3
yunikorn_root_default_queue_app{state="running"} 3
```

### Resource
## Resource
The `<queue_name> queue_resource` metric to trace the resource in the queue.
These resource states include `guaranteed`, `max`, `allocated`, `pending`, `preempting`.
### Label
(Introduced in `1.5.0`)

**Metric Type**: `gauge`

**Namespace**: `yunikorn`

**Label**: `queue: <queue name>`

**TYPE**: `yunikorn_queue_resource`

```json
yunikorn_queue_resource{queue="root",resource="ephemeral-storage",state="max"} 9.41009558e+10
yunikorn_queue_resource{queue="root",resource="hugepages-1Gi",state="max"} 0
yunikorn_queue_resource{queue="root",resource="hugepages-2Mi",state="max"} 0
yunikorn_queue_resource{queue="root",resource="memory",state="max"} 1.6223076352e+10
yunikorn_queue_resource{queue="root",resource="pods",state="max"} 110
yunikorn_queue_resource{queue="root",resource="vcore",state="max"} 8000
```

### Subsystem
|:exclamation: To be deprecated in `1.6.0` and removed in `1.7.0`|
|----------------------------------------------------------------|

**Metric Type**: `guage`
**Metric Type**: `gauge`

**Namespace**: `yunikorn`

Expand Down