All Projects → cafebazaar → keepalived-exporter

cafebazaar / keepalived-exporter

Licence: GPL-3.0 License
Prometheus Keepalived exporter

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to keepalived-exporter

zfs exporter
Prometheus ZFS exporter
Stars: ✭ 52 (-3.7%)
Mutual labels:  prometheus-exporter
weather-station
A Prometheus exporter for 433 MHz temperature and humidity sensors
Stars: ✭ 60 (+11.11%)
Mutual labels:  prometheus-exporter
NettyAndroid
Netty for Android
Stars: ✭ 18 (-66.67%)
Mutual labels:  keepalived
haproxy-keepalived
HAProxy & Keepalived for Docker and kubernetes
Stars: ✭ 29 (-46.3%)
Mutual labels:  keepalived
spot-termination-exporter
Prometheus spot instance exporter to monitor AWS instance termination with Hollowtrees
Stars: ✭ 30 (-44.44%)
Mutual labels:  prometheus-exporter
influxdb stats exporter
Prometheus exporter for InfluxDB stats
Stars: ✭ 20 (-62.96%)
Mutual labels:  prometheus-exporter
starboard-exporter
A standalone exporter for vulnerability reports and other CRs created by Starboard.
Stars: ✭ 22 (-59.26%)
Mutual labels:  prometheus-exporter
geoip-exporter
GeoIP exporter for Prometheus
Stars: ✭ 27 (-50%)
Mutual labels:  prometheus-exporter
mc-monitor
Monitor the status of Minecraft servers and provides Prometheus exporter and Influx line protocol output
Stars: ✭ 100 (+85.19%)
Mutual labels:  prometheus-exporter
resoto
Resoto - Find leaky resources, manage quota limits, detect drift, and clean up!
Stars: ✭ 562 (+940.74%)
Mutual labels:  prometheus-exporter
deluge exporter
Prometheus exporter for the Deluge BitTorrent client
Stars: ✭ 24 (-55.56%)
Mutual labels:  prometheus-exporter
prometheus-mysql-exporter
Prometheus MySQL Exporter
Stars: ✭ 33 (-38.89%)
Mutual labels:  prometheus-exporter
s3 exporter
Exports Prometheus metrics about S3 buckets and objects
Stars: ✭ 65 (+20.37%)
Mutual labels:  prometheus-exporter
sentry exporter
Prometheus exporter for Sentry
Stars: ✭ 23 (-57.41%)
Mutual labels:  prometheus-exporter
prometheus aci exporter
Cisco ACI exporter for Prometheus
Stars: ✭ 13 (-75.93%)
Mutual labels:  prometheus-exporter
github exporter
Prometheus exporter for GitHub
Stars: ✭ 21 (-61.11%)
Mutual labels:  prometheus-exporter
aws-ec2-sg-exporter
A dockerized Prometheus exporter that compares desired/wanted IPv4/IPv6 CIDR against currently applied inbound CIDR rules in your security group(s).
Stars: ✭ 23 (-57.41%)
Mutual labels:  prometheus-exporter
sa-prometheus-exporters
Collection of the preselected prometheus exporters to be installed on a target nodes
Stars: ✭ 17 (-68.52%)
Mutual labels:  prometheus-exporter
gobgp exporter
Prometheus Exporter for GoBGP
Stars: ✭ 15 (-72.22%)
Mutual labels:  prometheus-exporter
loki exporter
Prometheus exporter to collect metrics and run queries against the Grafana Loki API.
Stars: ✭ 28 (-48.15%)
Mutual labels:  prometheus-exporter

Keepalived Exporter

Continuous Integration

Prometheus exporter for Keepalived metrics.

Installation

Binary releases (Recommended)

export VERSION=1.0.0
wget https://github.com/cafebazaar/keepalived-exporter/releases/download/v${VERSION}/keepalived-exporter-${VERSION}.linux-amd64.tar.gz
tar xvzf keepalived-exporter-${VERSION}.linux-amd64.tar.gz keepalived-exporter-${VERSION}.linux-amd64/keepalived-exporter
sudo mv keepalived-exporter-${VERSION}.linux-amd64/keepalived-exporter /usr/local/bin/

From source

git clone --depth 1 https://github.com/cafebazaar/keepalived-exporter.git
cd keepalived-exporter
make build
sudo mv keepalived-exporter /usr/local/bin/

Usage

Run keepalived-exporter

sudo keepalived-exporter [flags]

Help on flags

./keepalived-exporter --help
Name Description
web.listen-address Address to listen on for web interface and telemetry, defaults to :9165.
web.telemetry-path A path under which to expose metrics, defaults to /metrics.
ka.json Send SIGJSON and decode JSON file instead of parsing text files, defaults to false.
ka.pid-path A path for Keepalived PID, defaults to /var/run/keepalived.pid.
cs Health Check script path to be execute for each VIP.
container-name Keepalived container name to export metrics from Keepalived container.
container-tmp-dir Keepalived container tmp volume path, defaults to /tmp.

Note: For ka.json option requirement is to have Keepalived compiled with --enable-json configure option.

Keepalived on Docker and Keepalived Exporter on host

Set the --container-name to the Keepalived container name and set --container-tmp-dir to the Keepalived /tmp dir path that is volumed to the host

./keepalived-exporter --container-name keepalived --container-tmp-dir /tmp

Keepalived and Keepalived Exporter on docker

Volume docker socket (/var/run/docker.sock) to Keepalived Exporter cotnainer in the same path and pass the args like as using Keepalived on container

docker pull ghcr.io/cafebazaar/keepalived-exporter
docker run -v keepalived-data:/tmp/ ... $KEEPALIVED_IMAGE
docker run -v /var/run/docker.sock:/var/run/docker.sock -v keepalived-data:/tmp/keepalived-data:ro -p 9165:9165 ghcr.io/cafebazaar/keepalived-exporter --container-name keepalived --container-tmp-dir "/tmp/keepalived-data"

Metrics

Metric Notes
keepalived_up Status of Keepalived service
keepalived_vrrp_state State of vrrp
keepalived_exporter_check_script_status Check Script status for each VIP
keepalived_gratuitous_arp_delay_total Gratuitous ARP delay
keepalived_advertisements_received_total Advertisements received
keepalived_advertisements_sent_total Advertisements sent
keepalived_become_master_total Became master
keepalived_release_master_total Released master
keepalived_packet_length_errors_total Packet length errors
keepalived_advertisements_interval_errors_total Advertisement interval errors
keepalived_ip_ttl_errors_total TTL errors
keepalived_invalid_type_received_total Invalid type errors
keepalived_address_list_errors_total Address list errors
keepalived_authentication_invalid_total Authentication invalid
keepalived_authentication_mismatch_total Authentication mismatch
keepalived_authentication_failure_total Authentication failure
keepalived_priority_zero_received_total Priority zero received
keepalived_priority_zero_sent_total Priority zero sent
keepalived_script_status Tracker Script Status
keepalived_script_state Tracker Script State

Check Script

You can specify a check script like Keepalived script check to check if all the things is okay or not. The script will run for each VIP and gives an arg $1 that contains VIP.

Note: The script should be executable.

chmod +x check_script.sh

Sample Check Script

#!/usr/bin/env bash

ping $1 -c 1 -W 1
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].