{"id":22758801,"url":"https://github.com/clusterlabs/ha_cluster_exporter","last_synced_at":"2025-04-05T12:04:18.192Z","repository":{"id":35929198,"uuid":"208083759","full_name":"ClusterLabs/ha_cluster_exporter","owner":"ClusterLabs","description":"Prometheus exporter for Pacemaker based Linux HA clusters","archived":false,"fork":false,"pushed_at":"2025-03-13T01:30:07.000Z","size":3029,"stargazers_count":81,"open_issues_count":10,"forks_count":36,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-29T11:05:56.869Z","etag":null,"topics":["cluster","golang","high-availability","linux","metrics","monitoring","pacemaker","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClusterLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"supportconfig-ha_cluster_exporter","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-12T15:29:22.000Z","updated_at":"2025-02-19T10:04:59.000Z","dependencies_parsed_at":"2024-06-18T21:35:51.403Z","dependency_job_id":"f3117b85-1bff-49f4-9c5f-c7437437262d","html_url":"https://github.com/ClusterLabs/ha_cluster_exporter","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2Fha_cluster_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2Fha_cluster_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2Fha_cluster_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2Fha_cluster_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClusterLabs","download_url":"https://codeload.github.com/ClusterLabs/ha_cluster_exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332560,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cluster","golang","high-availability","linux","metrics","monitoring","pacemaker","prometheus","prometheus-exporter"],"created_at":"2024-12-11T08:15:57.108Z","updated_at":"2025-04-05T12:04:18.170Z","avatar_url":"https://github.com/ClusterLabs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ha_cluster_exporter\n\n[![Exporter CI](https://github.com/ClusterLabs/ha_cluster_exporter/workflows/Exporter%20CI/badge.svg)](https://github.com/ClusterLabs/ha_cluster_exporter/actions?query=workflow%3A%22Exporter+CI%22)\n[![Dashboards CI](https://github.com/ClusterLabs/ha_cluster_exporter/workflows/Dashboards%20CI/badge.svg)](https://github.com/ClusterLabs/ha_cluster_exporter/actions?query=workflow%3A%22Dashboards+CI%22)\n\nThis is a bespoke Prometheus exporter used to enable the monitoring of Pacemaker based HA clusters.  \n\n## Table of Contents\n1. [Features](#features)\n2. [Installation](#installation)\n3. [Usage](#usage)\n   1. [Metrics](doc/metrics.md)\n   2. [Dashboards](dashboards/README.md)\n5. [Contributing](#contributing)\n   1. [Design](doc/design.md)\n   2. [Development](doc/development.md)\n5. [License](#license)\n\n## Features\n\nThe 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.\n\nExported data include:\n- Pacemaker cluster summary, nodes and resources stats \n- Corosync ring errors and quorum votes\n- SBD devices health status \n- DRBD resources and connections stats  \n  (note: only DBRD v9 is supported; for v8.4, please refer to the [Prometheus Node Exporter](https://github.com/prometheus/node_exporter) project)\n\nA comprehensive list of all the metrics can be found in the [metrics document](doc/metrics.md).\n\n## Installation\n\nThe project can be installed in many ways, including but not limited to:\n\n1. [Manual clone \u0026 build](#manual-clone-\u0026-build)\n2. [Go](#go)\n3. [RPM](#rpm)\n\n### Manual clone \u0026 build\n\n```\ngit clone https://github.com/ClusterLabs/ha_cluster_exporter\ncd ha_cluster_exporter\nmake\nmake install\n```\n\n### Go\n\n```\ngo get github.com/ClusterLabs/ha_cluster_exporter\n```\n\n### RPM\n\nOn openSUSE or SUSE Linux Enterprise you can just use the `zypper` system package manager:\n```shell\nzypper install prometheus-ha_cluster_exporter\n```\n\nYou can find the latest development repositories at [SUSE's Open Build Service](https://build.opensuse.org/package/show/network:ha-clustering:sap-deployments:devel/prometheus-ha_cluster_exporter).\n\n## Usage\n\nYou can run the exporter in any of the cluster nodes. \n\n```\n$ ./ha_cluster_exporter  \nINFO[0000] Serving metrics on 0.0.0.0:9664\n```\n\nThough not strictly required, it is _strongly_ advised to run it in all the nodes.\n\nIt will export the metrics under the `/metrics` path, on port `9664` by default.\n\nWhile 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 `drbdsetup`.  \nA warning message will inform the user of such cases.\n\nPlease, refer to [doc/metrics.md](doc/metrics.md) for extensive details about all the exported metrics.\n\nTo see a practical example of how to consume the metrics, we also provide a couple of [Grafana dashboards](dashboards). \n\n**Hint:**\nYou can deploy a full HA Cluster via Terraform with [SUSE/ha-sap-terraform-deployments](https://github.com/SUSE/ha-sap-terraform-deployments).\n\n### Configuration\n\nAll the runtime parameters can be configured either via CLI flags or via a configuration file, both or which are completely optional.\n\nFor more details, refer to the help message via `ha_cluster_exporter --help`.\n\n**Note**:\nthe built-in defaults are tailored for the latest version of SUSE Linux Enterprise and openSUSE.\n\nThe program will scan, in order, the current working directory, `$HOME/.config`, `/etc` and `/usr/etc` for files named `ha_cluster_exporter.(yaml|json|toml)`.\nThe first match has precedence, and the CLI flags have precedence over the config file.\n\nPlease refer to the example [YAML configuration](ha_cluster_exporter.yaml) for more details.\n\nAdditional CLI flags can also be passed via `/etc/sysconfig/prometheus-ha_cluster_exporter`.\n\n#### General Flags\n\nName                                       | Description\n----                                       | -----------\nweb.listen-address                         | Address to listen on for web interface and telemetry (default `:9664`).\nweb.telemetry-path                         | Path under which to expose metrics (default `/metrics`).\nweb.config.file                            | Path to a [web configuration file](#tls-and-basic-authentication) (default `/etc/ha_cluster_exporter.web.yaml`).\nlog.level                                  | Logging verbosity (default `info`).\nversion                                    | Print the version information.\n\n##### Deprecated Flags\nName                                       | Description\n----                                       | -----------\naddress                                    | deprecated: please use --web.listen-address or --web.config.file to use Prometheus Exporter Toolkit\nport                                       | deprecated: please use --web.listen-address or --web.config.file to use Prometheus Exporter Toolkit\nlog-level                                  | deprecated: please use log.level\nenable-timestamps                          | deprecated: server-side metric timestamping is discouraged by Prometheus best-practices and should be avoided\n\n#### Collector Flags\n\nName                                       | Description\n----                                       | -----------\ncrm-mon-path                               | Path to crm_mon executable (default `/usr/sbin/crm_mon`).\ncibadmin-path                              | Path to cibadmin executable (default `/usr/sbin/cibadmin`).\ncorosync-cfgtoolpath-path                  | Path to corosync-cfgtool executable (default `/usr/sbin/corosync-cfgtool`).\ncorosync-quorumtool-path                   | Path to corosync-quorumtool executable (default `/usr/sbin/corosync-quorumtool`).\nsbd-path                                   | Path to sbd executable (default `/usr/sbin/sbd`).\nsbd-config-path                            | Path to sbd configuration (default `/etc/sysconfig/sbd`).\ndrbdsetup-path                             | Path to drbdsetup executable (default `/sbin/drbdsetup`).\ndrbdsplitbrain-path                        | Path to drbd splitbrain hooks temporary files (default `/var/run/drbd/splitbrain`).\n\n### TLS and basic authentication\n\nThe ha_cluster_exporter supports TLS and basic authentication.\n\nTo use TLS and/or basic authentication, you need to pass a configuration file\nusing the `--web.config.file` parameter. The format of the file is described\n[in the exporter-toolkit repository](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md).\n\n### systemd integration\n\nA [systemd unit file](ha_cluster_exporter.service) is provided with the RPM packages. You can enable and start it as usual:  \n\n```\nsystemctl --now enable prometheus-ha_cluster_exporter\n```\n\n## Development\n\nPull requests are more than welcome!\n\nWe recommend having a look at the [design document](doc/design.md) and the [development notes](doc/development.md) before contributing.\n\n## License\n\nCopyright 2019-2022 SUSE LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclusterlabs%2Fha_cluster_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclusterlabs%2Fha_cluster_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclusterlabs%2Fha_cluster_exporter/lists"}