ClusterLabs / ha_cluster_exporter

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

Add qdevice membership parsing and metric label #172

Closed MalloZup closed 4 years ago

MalloZup commented 4 years ago

Fix #170

There is only one special case, we might need to handle:

ha_cluster_corosync_member_votes{local="false",node="Qdevice",node_id="0",qdevice=""} 1

when the qdevice is active

Quorum information
------------------
Date:             Thu Jul 16 12:40:44 2020
Quorum provider:  corosync_votequorum
Nodes:            2
Node ID:          1
Ring ID:          1/139
Quorate:          Yes

Votequorum information
----------------------
Expected votes:   3
Highest expected: 3
Total votes:      3
Quorum:           2  
Flags:            Quorate Qdevice 

Membership information
----------------------
    Nodeid      Votes    Qdevice Name
         1          1    A,V,NMW nfs01 (local)
         2          1    A,V,NMW nfs02
         0          1            Qdevice

the table qdevice is empty so we create an empty metric.

I was thinking in order to avoid an empty metric we should populated the label qdevice with qdevice for indicating that it is the qdevice.

@gao-yan @nick-wang let me know what do you think

stefanotorresi commented 4 years ago

I was thinking in order to avoid an empty metric we should populated the label qdevice with qdevice for indicating that it is the qdevice.

Well, it's not really empty, you can see it's the Qdevice from the name! I don't think this is that special, after all.

stefanotorresi commented 4 years ago

thanks Dario!

MalloZup commented 4 years ago

thx