From 2a63686b8c63a8e3aa71c649e681826e1e904e52 Mon Sep 17 00:00:00 2001 From: William Tom Date: Tue, 14 Nov 2023 13:25:47 -0800 Subject: [PATCH] [YUNIKORN-970] Add queue metrics with queue names as labels (#365) Reverted as part of the YuniKorn 1.4 release steps and re-published after versioning documentation under a new commit to master. Co-authored-by: William Tom --- docs/metrics/queue.md | 61 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/docs/metrics/queue.md b/docs/metrics/queue.md index 0aa1f7cd36c..4943fd30920 100644 --- a/docs/metrics/queue.md +++ b/docs/metrics/queue.md @@ -22,13 +22,37 @@ specific language governing permissions and limitations under the License. --> -## Queue -### Application -Eech queue has a ` queue_app` metric to trace the applications in the queue. +## Application +Each queue has a ` queue_app` metric to trace the applications in the queue. ` queue_app` metrics records the number of applications in different states. These application states include `running`, `accepted`, `rejected`, `failed` and `completed`. -` queue_app` metrics record container states including `released`, `allocated`. -**Metric Type**: `guage` +` 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 `` labels were introduced. Metrics using `` subsystems +will be **deprecated in `1.6.0` and removed in `1.7.0`** in favor of a `` label based approach. + +### Label +(Introduced in `1.5.0`) + +**Metric Type**: `gauge` + +**Namespace**: `yunikorn` + +**Label**: `queue: ` + +**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` @@ -41,11 +65,34 @@ yunikorn_root_default_queue_app{state="accepted"} 3 yunikorn_root_default_queue_app{state="running"} 3 ``` -### Resource +## Resource The ` 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: ` + +**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`