{"id":13561751,"url":"https://github.com/mehdy/keepalived-exporter","last_synced_at":"2025-04-12T22:20:21.793Z","repository":{"id":39711531,"uuid":"236187396","full_name":"mehdy/keepalived-exporter","owner":"mehdy","description":"Prometheus Keepalived exporter","archived":false,"fork":false,"pushed_at":"2025-04-01T04:55:19.000Z","size":550,"stargazers_count":136,"open_issues_count":9,"forks_count":40,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-04T01:25:01.480Z","etag":null,"topics":["keepalived","keepalived-exporter","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mehdy.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":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-25T15:21:06.000Z","updated_at":"2025-03-28T13:53:18.000Z","dependencies_parsed_at":"2024-05-01T05:26:14.867Z","dependency_job_id":"76299f94-8c7a-4bb0-9bd9-2e27d135d060","html_url":"https://github.com/mehdy/keepalived-exporter","commit_stats":{"total_commits":180,"total_committers":10,"mean_commits":18.0,"dds":"0.30000000000000004","last_synced_commit":"3428698c232b3758ca690fa8710fc483660acf44"},"previous_names":["cafebazaar/keepalived-exporter"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdy%2Fkeepalived-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdy%2Fkeepalived-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdy%2Fkeepalived-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdy%2Fkeepalived-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehdy","download_url":"https://codeload.github.com/mehdy/keepalived-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248638394,"owners_count":21137660,"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":["keepalived","keepalived-exporter","prometheus-exporter"],"created_at":"2024-08-01T13:01:00.708Z","updated_at":"2025-04-12T22:20:21.768Z","avatar_url":"https://github.com/mehdy.png","language":"Go","funding_links":[],"categories":["Go","others"],"sub_categories":[],"readme":"# Keepalived Exporter\n\n[![Continuous Integration](https://github.com/mehdy/keepalived-exporter/workflows/Continuous%20Integration/badge.svg)](https://github.com/mehdy/keepalived-exporter/actions)\n\nPrometheus exporter for [Keepalived](https://keepalived.org) metrics.\n\n## Installation\n\n### Debian/Ubuntu\n\nDownload the latest release from [here](https://github.com/mehdy/keepalived-exporter/releases) and install it using dpkg\n\n```bash\ndpkg -i keepalived-exporter-downloaded-pkg.deb\n```\n\n### RedHat/CentOS\n\nDownload the latest release from [here](https://github.com/mehdy/keepalived-exporter/releases) and install it using rpm\n\n```bash\nrpm -i keepalived-exporter-downloaded-pkg.rpm\n```\n\n### Binary releases\n\n```bash\nexport VERSION=1.3.2\nwget https://github.com/mehdy/keepalived-exporter/releases/download/v${VERSION}/keepalived-exporter-${VERSION}.linux-amd64.tar.gz\ntar xvzf keepalived-exporter-${VERSION}.linux-amd64.tar.gz keepalived-exporter-${VERSION}.linux-amd64/keepalived-exporter\nsudo mv keepalived-exporter-${VERSION}.linux-amd64/keepalived-exporter /usr/local/bin/\n```\n\n### From source\n\n```bash\ngit clone --depth 1 https://github.com/mehdy/keepalived-exporter.git\ncd keepalived-exporter\nmake build\nsudo mv keepalived-exporter /usr/local/bin/\n```\n\n## Usage\n\nRun keepalived-exporter\n\n```bash\nsudo keepalived-exporter [flags]\n```\n\nHelp on flags\n\n```bash\n./keepalived-exporter --help\n```\n\nName               | Description\n-------------------|------------\nweb.listen-address | Address to listen on for web interface and telemetry, defaults to `:9165`.\nweb.telemetry-path | A path under which to expose metrics, defaults to `/metrics`.\nka.json            | Send SIGJSON and decode JSON file instead of parsing text files, defaults to `false`.\nka.pid-path        | A path for Keepalived PID, defaults to `/var/run/keepalived.pid`.\ncs                 | Health Check script path to be execute for each VIP.\ncontainer-name     | Keepalived container name to export metrics from Keepalived container.\ncontainer-tmp-dir  | Keepalived container tmp volume path, defaults to `/tmp`.\n\n**Note:** For `ka.json` option requirement is to have Keepalived compiled with `--enable-json` configure option.\n\n### Keepalived on Docker and Keepalived Exporter on host\n\nSet 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\n\n```bash\n./keepalived-exporter --container-name keepalived --container-tmp-dir /tmp\n```\n\n### Keepalived and Keepalived Exporter on docker\n\nVolume docker socket (`/var/run/docker.sock`) to Keepalived Exporter cotnainer in the same path and pass the args like as using Keepalived on container\n\n```bash\ndocker pull ghcr.io/mehdy/keepalived-exporter\ndocker run -v keepalived-data:/tmp/ -v run:/var/run/ ... $KEEPALIVED_IMAGE\ndocker run -v /var/run/docker.sock:/var/run/docker.sock -v keepalived-data:/tmp/keepalived-data:ro -v run/keepalived.pid:/var/run/keepalived.pid:ro -p 9165:9165 ghcr.io/mehdy/keepalived-exporter --container-name keepalived --container-tmp-dir \"/tmp/keepalived-data\"\n```\n\n## Metrics\n\n| Metric                                          | Notes\n|-------------------------------------------------|------------------------------------\n| keepalived_exporter_build_info                  | Exporter build info\n| keepalived_up                                   | Status of Keepalived service\n| keepalived_vrrp_state                           | State of vrrp\n| keepalived_vrrp_excluded_state                  | State of vrrp with excluded VIP\n| keepalived_exporter_check_script_status         | Check Script status for each VIP\n| keepalived_gratuitous_arp_delay_total           | Gratuitous ARP delay\n| keepalived_advertisements_received_total        | Advertisements received\n| keepalived_advertisements_sent_total            | Advertisements sent\n| keepalived_become_master_total                  | Became master\n| keepalived_release_master_total                 | Released master\n| keepalived_packet_length_errors_total           | Packet length errors\n| keepalived_advertisements_interval_errors_total | Advertisement interval errors\n| keepalived_ip_ttl_errors_total                  | TTL errors\n| keepalived_invalid_type_received_total          | Invalid type errors\n| keepalived_address_list_errors_total            | Address list errors\n| keepalived_authentication_invalid_total         | Authentication invalid\n| keepalived_authentication_mismatch_total        | Authentication mismatch\n| keepalived_authentication_failure_total         | Authentication failure\n| keepalived_priority_zero_received_total         | Priority zero received\n| keepalived_priority_zero_sent_total             | Priority zero sent\n| keepalived_script_status                        | Tracker Script Status\n| keepalived_script_state                         | Tracker Script State\n\n## Check Script\n\nYou can specify a check script like Keepalived script check to check if all the things is okay or not.\nThe script will run for each VIP and gives an arg `$1` that contains VIP.\n\n**Note:** The script should be executable.\n\n```bash\nchmod +x check_script.sh\n```\n\n### Sample Check Script\n\n```bash\n#!/usr/bin/env bash\n\nping $1 -c 1 -W 1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehdy%2Fkeepalived-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehdy%2Fkeepalived-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehdy%2Fkeepalived-exporter/lists"}