Prometheus Metrics for maas_machines per resource pool

Hi there,

We have MaaS 3.2.x installed using apt. We heavily use resource pools. I am looking forward to build some alerting on the basis of number of machines in a particular state within a resourcepool. I have enabled prometheus metrics, and it provides some data wrt maas_machines as can be seen below:

# HELP maas_machines Number of machines by status
# TYPE maas_machines gauge
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="new"} 0.0
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="ready"} 0.0
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="allocated"} 0.0
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="deployed"} 0.0
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="commissioning"} 1.0
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="testing"} 0.0
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="deploying"} 0.0
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="failed_deployment"} 0.0
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="failed_commissioning"} 23.0
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="failed_testing"} 0.0
maas_machines{maas_id="1f93ec65-3e29-4338-86d2-71eafa6a9678",status="broken"} 0.0

However, it looks to me that maas_machines guage considers all the machines managed by MaaS and not per resource pool. Is there any way to get the details per resource pool? Looking through the codebase, doesn’t look like its implemented yet.

thanks!

Hey there!

No, this is not available yet. I’m turning this into a feature request