All Projects → ClusterLabs → ha_cluster_exporter

ClusterLabs / ha_cluster_exporter

Licence: Apache-2.0 license
Prometheus exporter for Pacemaker based Linux HA clusters

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ha cluster exporter

ansible-role-pacemaker
Ansible role to deploy Pacemaker HA clusters
Stars: ✭ 19 (-69.84%)
Mutual labels:  cluster, high-availability, pacemaker
pg-dock
pg-dock cluster managment
Stars: ✭ 19 (-69.84%)
Mutual labels:  cluster, high-availability
ansible-role-etcd
Ansible role for installing etcd cluster
Stars: ✭ 38 (-39.68%)
Mutual labels:  cluster, high-availability
ansible.pcs-modules-2
Ansible modules for interacting with pacemaker clusters (2nd generation)
Stars: ✭ 26 (-58.73%)
Mutual labels:  cluster, pacemaker
WatsonCluster
A simple C# class using Watson TCP to enable a one-to-one high availability cluster.
Stars: ✭ 18 (-71.43%)
Mutual labels:  cluster, high-availability
kubernetes the easy way
Automating Kubernetes the hard way with Vagrant and scripts
Stars: ✭ 22 (-65.08%)
Mutual labels:  cluster, pacemaker
k8s-lemp
LEMP stack in a Kubernetes cluster
Stars: ✭ 74 (+17.46%)
Mutual labels:  cluster, high-availability
Xenon
The MySQL Cluster Autopilot Management with GTID and Raft
Stars: ✭ 461 (+631.75%)
Mutual labels:  cluster, high-availability
Mosquitto Cluster
a built-in, autonomous Mosquitto Cluster implementation. MQTT集群.
Stars: ✭ 238 (+277.78%)
Mutual labels:  cluster, high-availability
Postgresql cluster
PostgreSQL High-Availability Cluster (based on "Patroni" and "DCS(etcd)"). Automating deployment with Ansible.
Stars: ✭ 294 (+366.67%)
Mutual labels:  cluster, high-availability
Ansible Role Patroni
🐘 Ansible Role for Patroni
Stars: ✭ 40 (-36.51%)
Mutual labels:  cluster, high-availability
Kubeadm Ha
Kubernetes high availiability deploy based on kubeadm, loadbalancer included (English/中文 for v1.15 - v1.20+)
Stars: ✭ 614 (+874.6%)
Mutual labels:  cluster, high-availability
Awx Ha Instancegroup
Build AWX clustering on Docker Standalone Installation
Stars: ✭ 106 (+68.25%)
Mutual labels:  cluster, high-availability
Redis Cluster
Redis Cluster setup running on Kubernetes
Stars: ✭ 230 (+265.08%)
Mutual labels:  cluster
node-codis
Codis client for Node.js.
Stars: ✭ 18 (-71.43%)
Mutual labels:  cluster
Coerce Rs
Coerce - an asynchronous (async/await) Actor runtime and cluster framework for Rust
Stars: ✭ 231 (+266.67%)
Mutual labels:  cluster
Reading And Comprehense Redis Cluster
分布式NOSQL redis源码阅读中文分析注释,带详尽注释以及相关流程调用注释,提出改造点,redis cluster集群功能、节点扩容、槽位迁移、failover故障切换、一致性选举完整分析,对理解redis源码很有帮助,解决了source insight中文注释乱码问题,更新完毕(redis源码学习交流QQ群:568892619)
Stars: ✭ 224 (+255.56%)
Mutual labels:  cluster
OctoPrint-Prometheus-Exporter
An octoprint plugin for prometheus compatible metrics endpoint
Stars: ✭ 36 (-42.86%)
Mutual labels:  prometheus-exporter
Magento-2-aws-cluster-terraform
Magento 2 AWS autoscaling cluster with Terraform and Packer or ImageBuilder. Adobe Commerce Cloud alternative. The best ecommerce infrastructure. Drive more sales online. Transparent billing. Developer-friendly. No hidden bottlenecks.
Stars: ✭ 107 (+69.84%)
Mutual labels:  cluster
Pyslurm
Python Interface to Slurm
Stars: ✭ 222 (+252.38%)
Mutual labels:  cluster

ha_cluster_exporter

Exporter CI Dashboards CI

This is a bespoke Prometheus exporter used to enable the monitoring of Pacemaker based HA clusters.

Table of Contents

  1. Features
  2. Installation
  3. Usage
    1. Metrics
    2. Dashboards
  4. Contributing
    1. Design
    2. Development
  5. License

Features

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.

Installation

The project can be installed in many ways, including but not limited to:

  1. Manual clone & build
  2. Go
  3. RPM

Manual clone & build

git clone https://github.com/ClusterLabs/ha_cluster_exporter
cd ha_cluster_exporter
make
make install

Go

go get github.com/ClusterLabs/ha_cluster_exporter

RPM

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.

Usage

You can run the exporter in any of the cluster nodes.

$ ./ha_cluster_exporter  
INFO[0000] 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 drbdsetup.
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.

Configuration

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 ha_cluster_exporter --help.

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, $HOME/.config, /etc and /usr/etc for files named ha_cluster_exporter.(yaml|json|toml). 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 /etc/sysconfig/prometheus-ha_cluster_exporter.

General Flags

Name Description
web.listen-address Address to listen on for web interface and telemetry (default :9664).
web.telemetry-path Path under which to expose metrics (default /metrics).
web.config.file Path to a web configuration file (default /etc/ha_cluster_exporter.web.yaml).
log.level Logging verbosity (default info).
version Print the version information.
Deprecated Flags
Name Description
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

Collector Flags

Name Description
crm-mon-path Path to crm_mon executable (default /usr/sbin/crm_mon).
cibadmin-path Path to cibadmin executable (default /usr/sbin/cibadmin).
corosync-cfgtoolpath-path Path to corosync-cfgtool executable (default /usr/sbin/corosync-cfgtool).
corosync-quorumtool-path Path to corosync-quorumtool executable (default /usr/sbin/corosync-quorumtool).
sbd-path Path to sbd executable (default /usr/sbin/sbd).
sbd-config-path Path to sbd configuration (default /etc/sysconfig/sbd).
drbdsetup-path Path to drbdsetup executable (default /sbin/drbdsetup).
drbdsplitbrain-path Path to drbd splitbrain hooks temporary files (default /var/run/drbd/splitbrain).

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 using the --web.config.file parameter. The format of the file is described in the exporter-toolkit repository.

systemd integration

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

Development

Pull requests are more than welcome!

We recommend having a look at the design document and the development notes before contributing.

License

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

https://www.apache.org/licenses/LICENSE-2.0

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].