ClusterLabs / ha_cluster_exporter

Prometheus exporter for Pacemaker based Linux HA clusters
Apache License 2.0
79 stars 35 forks source link

add support to show overall cluster maintenance mode #260

Closed scrusanhrt closed 1 month ago

scrusanhrt commented 1 month ago

if you put an entire cluster into maintenance mode (for whatever reason, sometimes valid) via "crm configure property maintenance-mode=true", then it won't be shown by this exporter.

this is because it currently only checks node properties. If you set an individual node to maintenance-mode, then it will show up.

new functionality:

# HELP ha_cluster_pacemaker_maintenance_mode_enabled Whether or not cluster wide maintenance-mode is enabled
# TYPE ha_cluster_pacemaker_maintenance_mode_enabled gauge
ha_cluster_pacemaker_maintenance_mode_enabled 1
ha_cluster_pacemaker_nodes{node="<host>",status="maintenance",type="member"} 0

tests pass via "make test"

stefanotorresi commented 1 month ago

Cool! Thanks a lot for your contribution!