Skip to content

Simplify metrics with labels

Pre-release
Pre-release

Choose a tag to compare

@MalloZup MalloZup released this 17 Sep 15:58

Rationale:

Behind this the motivation is that the promql language should filter/add/remove metrics and not an exporter ( we were doing this before).

So seeing the example later, an user can easy filter by status="active" label the number of resource active by node etc.

Features:

this release fix issue #7 #8 , which were mostly inherent to a refactor of metrics exposed.

We have now only 2 metrics exposed which have labels for grouping all the past metrics.

Examples of metrics:

An example of the metrics is like this:

# HELP cluster_node_resources metric inherent per node resources
# TYPE cluster_node_resources gauge
cluster_node_resources{node="dma-dog-hana01",resource_name="rsc_ip_prd_hdb00",role="started",status="active"} 1
cluster_node_resources{node="dma-dog-hana01",resource_name="rsc_ip_prd_hdb00",role="started",status="managed"} 1
cluster_node_resources{node="dma-dog-hana01",resource_name="rsc_saphana_prd_hdb00",role="master",status="active"} 1
cluster_node_resources{node="dma-dog-hana01",resource_name="rsc_saphana_prd_hdb00",role="master",status="managed"} 1
cluster_node_resources{node="dma-dog-hana01",resource_name="rsc_saphanatopology_prd_hdb00",role="started",status="active"} 1
cluster_node_resources{node="dma-dog-hana01",resource_name="rsc_saphanatopology_prd_hdb00",role="started",status="managed"} 1
cluster_node_resources{node="dma-dog-hana01",resource_name="stonith-sbd",role="started",status="active"} 1
cluster_node_resources{node="dma-dog-hana01",resource_name="stonith-sbd",role="started",status="managed"} 1
cluster_node_resources{node="dma-dog-hana02",resource_name="rsc_saphana_prd_hdb00",role="slave",status="active"} 1
cluster_node_resources{node="dma-dog-hana02",resource_name="rsc_saphana_prd_hdb00",role="slave",status="managed"} 1
cluster_node_resources{node="dma-dog-hana02",resource_name="rsc_saphanatopology_prd_hdb00",role="started",status="active"} 1
cluster_node_resources{node="dma-dog-hana02",resource_name="rsc_saphanatopology_prd_hdb00",role="started",status="managed"} 1
# HELP cluster_nodes cluster nodes metrics for all of them
# TYPE cluster_nodes gauge
cluster_nodes{node="dma-dog-hana01",type="dc"} 1
cluster_nodes{node="dma-dog-hana01",type="expected_up"} 1
cluster_nodes{node="dma-dog-hana01",type="member"} 1
cluster_nodes{node="dma-dog-hana01",type="online"} 1
cluster_nodes{node="dma-dog-hana02",type="expected_up"} 1
cluster_nodes{node="dma-dog-hana02",type="member"} 1
cluster_nodes{node="dma-dog-hana02",type="online"} 1
# HELP go_gc_duration_seconds A summary of the GC invocation durations.