diff --git a/python/ray/autoscaler/_private/prom_metrics.py b/python/ray/autoscaler/_private/prom_metrics.py index dc5f3ecfe7d0..a37fe5e54592 100644 --- a/python/ray/autoscaler/_private/prom_metrics.py +++ b/python/ray/autoscaler/_private/prom_metrics.py @@ -248,6 +248,27 @@ def __init__( namespace="autoscaler", registry=self.registry, ) + # This represents the autoscaler's view of essentially + # `ray.cluster_resources()`, it may be slightly different from the + # core metric from an eventual consistency perspective. + self.cluster_resources: Gauge = Gauge( + "cluster_resources", + "Total logical resources in the cluster.", + unit="resources", + namespace="autoscaler", + registry=self.registry, + labelnames=["resource"], + ) + # This represents the pending launches + nodes being set up for the + # autoscaler. + self.pending_resources: Gauge = Gauge( + "pending_resources", + "Pending logical resources in the cluster.", + unit="resources", + namespace="autoscaler", + registry=self.registry, + labelnames=["resource"], + ) @property def session_name(self):