Skip to content

Commit

Permalink
[YUNIKORN-1626] Listing Yunikorn metrics revealed in the prometheus (#…
Browse files Browse the repository at this point in the history
…330)

Signed-off-by: Hsuan Zong Wu <[email protected]>
  • Loading branch information
0yukali0 authored Nov 3, 2023
1 parent aae3bec commit 0da2854
Show file tree
Hide file tree
Showing 4 changed files with 425 additions and 0 deletions.
63 changes: 63 additions & 0 deletions docs/metrics/queue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
id: queue
title: Queue
---

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
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.
`<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`

**Namespace**: `yunikorn`

**Subsystem**: `<queue name>`

**TYPE**: `yunikorn_<queue name>_queue_app`

```json
yunikorn_root_default_queue_app{state="accepted"} 3
yunikorn_root_default_queue_app{state="running"} 3
```

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

**Metric Type**: `guage`

**Namespace**: `yunikorn`

**Subsystem**: `<queue name>`

**TYPE**: `yunikorn_<queue name>_queue_resource`

```json
yunikorn_root_queue_resource{resource="ephemeral-storage",state="max"} 9.41009558e+10
yunikorn_root_queue_resource{resource="hugepages-1Gi",state="max"} 0
yunikorn_root_queue_resource{resource="hugepages-2Mi",state="max"} 0
yunikorn_root_queue_resource{resource="memory",state="max"} 1.6223076352e+10
yunikorn_root_queue_resource{resource="pods",state="max"} 110
yunikorn_root_queue_resource{resource="vcore",state="max"} 8000
```
39 changes: 39 additions & 0 deletions docs/metrics/runtime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
id: runtime
title: Runtime
---

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## MemStats
| Yunikorn Metric | Runtime MemStats | Metric Type |
|-------------------------|---------------------------------------------------|-----------------|
| go_mem_stats | `Alloc`,`TotalAlloc`, `Sys`, `HeapIdle` and so on | `guage` |
| go_pause_ns | `PauseNs` | `guage` |
| go_pause_end | `PauseEnd` | `guage` |
| go_alloc_bysize_maxsize | `BySize.Size` | `histogram` |
| go_alloc_bysize_free | `BySize.Frees` | `histogram` |
| go_alloc_bysize_malloc | `BySize.Mallocs` | `histogram` |

## Generic
The `go_generic` metric includes descriptions of supported metrics
in the `runtime/metrics` package.

**Metric Type**: `guage`
Loading

0 comments on commit 0da2854

Please sign in to comment.