ClusterLabs / ha_cluster_exporter

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

Export cluster node name #161

Open steffenv-msft opened 4 years ago

steffenv-msft commented 4 years ago

The cluster node name should be available in the data exported on the endpoint to help identifying them in later analytics steps. If connecting to the endpoints i.e. by IP address (http://IP:9664/metrics), it's currently impossible to correlate data imported to analytic data sources, unless there is a (manual) mapping somewhere available to the analytical data source also. Ideally the cluster name can be made available as well. The information is available from ". crm_node --name"

A simple approach could be to export as some kind of meta-data:

'# TYPE meta_data meta_data{node="cluster node name",cluster="cluster name"} 1

or '# TYPE meta_data meta_data{node="cluster node name"} 1 meta_data{cluster="cluster name"} 1

stefanotorresi commented 4 years ago

Hey @steffenv-msft, Yeah, we are well aware of this issue, and we have been having some discussions about this. The problem is that this exporter is quite atypical in the fact that it exports data related to other nodes other than the exporter host itself; we are evaluating different solutions for this problem. We're not super-enthusiastic about putting static metadata in dedicated time-series, since labels would be the correct tool instead, but we'll try to find a compromise that can solve the root design issue and works for you too.

towo commented 3 years ago

If you're worried about determinability: Export a metric that checks if connection to the cluster endpoint is possible and attach the basic CIB options (cluster name, cluster-infrastructure, etc.) to it as labels. The only issue you'd walk into is that you'd have to parse the XML when the endpoint's actually down.