This is a bespoke Prometheus exporter used to enable the monitoring of Pacemaker based HA clusters.
Table of Contents
The exporter is a stateless HTTP endpoint. On each HTTP request, it locally inspects the cluster status by parsing pre-existing distributed data, provided by the tools of the various cluster components.
Exported data include:
- Pacemaker cluster summary, nodes and resources stats
- Corosync ring errors and quorum votes
- SBD devices health status
- DRBD resources and connections stats
(note: only DBRD v9 is supported; for v8.4, please refer to the Prometheus Node Exporter project)
A comprehensive list of all the metrics can be found in the metrics document.
The project can be installed in many ways, including but not limited to:
Manual clone & build
git clone https://github.com/ClusterLabs/ha_cluster_exporter cd ha_cluster_exporter make make install
go get github.com/ClusterLabs/ha_cluster_exporter
On openSUSE or SUSE Linux Enterprise you can just use the
zypper system package manager:
zypper install prometheus-ha_cluster_exporter
You can find the latest development repositories at SUSE's Open Build Service.
You can run the exporter in any of the cluster nodes.
$ ./ha_cluster_exporter INFO Serving metrics on 0.0.0.0:9664
Though not strictly required, it is strongly advised to run it in all the nodes.
It will export the metrics under the
/metrics path, on port
9664 by default.
While the exporter can run outside a HA cluster node, it won't export any metric it can't collect; e.g. it won't export DRBD metrics if it can't be locally inspected with
A warning message will inform the user of such cases.
Please, refer to doc/metrics.md for extensive details about all the exported metrics.
To see a practical example of how to consume the metrics, we also provide a couple of Grafana dashboards.
Hint: You can deploy a full HA Cluster via Terraform with SUSE/ha-sap-terraform-deployments.
All the runtime parameters can be configured either via CLI flags or via a configuration file, both or which are completely optional.
For more details, refer to the help message via
Note: the built-in defaults are tailored for the latest version of SUSE Linux Enterprise and openSUSE.
The program will scan, in order, the current working directory,
/usr/etc for files named
The first match has precedence, and the CLI flags have precedence over the config file.
Please refer to the example YAML configuration for more details.
Additional CLI flags can also be passed via
|web.listen-address||Address to listen on for web interface and telemetry (default
|web.telemetry-path||Path under which to expose metrics (default
|web.config.file||Path to a web configuration file (default
|log.level||Logging verbosity (default
|version||Print the version information.|
|address||deprecated: please use --web.listen-address or --web.config.file to use Prometheus Exporter Toolkit|
|port||deprecated: please use --web.listen-address or --web.config.file to use Prometheus Exporter Toolkit|
|log-level||deprecated: please use log.level|
|enable-timestamps||deprecated: server-side metric timestamping is discouraged by Prometheus best-practices and should be avoided|
|crm-mon-path||Path to crm_mon executable (default
|cibadmin-path||Path to cibadmin executable (default
|corosync-cfgtoolpath-path||Path to corosync-cfgtool executable (default
|corosync-quorumtool-path||Path to corosync-quorumtool executable (default
|sbd-path||Path to sbd executable (default
|sbd-config-path||Path to sbd configuration (default
|drbdsetup-path||Path to drbdsetup executable (default
|drbdsplitbrain-path||Path to drbd splitbrain hooks temporary files (default
TLS and basic authentication
The ha_cluster_exporter supports TLS and basic authentication.
To use TLS and/or basic authentication, you need to pass a configuration file
--web.config.file parameter. The format of the file is described
in the exporter-toolkit repository.
A systemd unit file is provided with the RPM packages. You can enable and start it as usual:
systemctl --now enable prometheus-ha_cluster_exporter
Pull requests are more than welcome!
Copyright 2019-2022 SUSE LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.