Skip to content

Commit

Permalink
Add the "status" field content to deployments, work_pools and work_qu…
Browse files Browse the repository at this point in the history
…eues info (#30)

For monitoring it is a crucial information if a system is ready, so I added the status field from the json to the prometheus output.
  • Loading branch information
datenhahn authored Jun 17, 2024
1 parent 2d2c294 commit 1077a02
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def collect(self):
"path",
"work_pool_name",
"work_queue_name",
"status"
],
)

Expand Down Expand Up @@ -109,6 +110,7 @@ def collect(self):
str(deployment.get("path", "null")),
str(deployment.get("work_pool_name", "null")),
str(deployment.get("work_queue_name", "null")),
str(deployment.get("status", "null")),
],
1,
)
Expand Down Expand Up @@ -296,6 +298,7 @@ def collect(self):
"is_paused",
"work_pool_name",
"type",
"status"
],
)

Expand All @@ -309,6 +312,7 @@ def collect(self):
str(work_pool.get("is_paused", "null")),
str(work_pool.get("name", "null")),
str(work_pool.get("type", "null")),
str(work_pool.get("status", "null")),
],
state,
)
Expand Down Expand Up @@ -339,6 +343,7 @@ def collect(self):
"type",
"work_pool_id",
"work_pool_name",
"status"
],
)

Expand All @@ -354,6 +359,7 @@ def collect(self):
str(work_queue.get("type", "null")),
str(work_queue.get("work_pool_id", "null")),
str(work_queue.get("work_pool_name", "null")),
str(work_queue.get("status", "null")),
],
state,
)
Expand Down

0 comments on commit 1077a02

Please sign in to comment.