A keepalived FIFO notification handler
Go to file
Paul Stemmet d428ff7086
Makefile: rm BUILD target
This is the parent directory for our build system, and having it as part
of the deps makes Make rebuild stuff inside of it arbitrarily, so we
pull it out.

We also silence git shells, to quiet down their noise when running
outside of a git repo; like say in a src tar.gz
2022-12-10 21:08:42 +00:00
buildinfo buildinfo: compile time variables 2022-12-09 18:06:00 +00:00
cmd cmd: add CLI 2022-12-09 18:06:01 +00:00
config config: pad log level 2022-12-10 19:39:57 +00:00
doc doc: add example config file for kdnotify watch 2022-12-10 08:25:17 +00:00
fifo
handler
schema/notify schema/notify: add tests for Message parsing 2022-12-10 17:01:44 +00:00
systemd systemd: add kdnotify.service, kdnotify.socket 2022-12-10 19:01:35 +00:00
tool tool/fmtck: gofmt err exit wrapper 2022-12-09 18:07:23 +00:00
watcher
.gitignore systemd: add kdnotify.service, kdnotify.socket 2022-12-10 19:01:35 +00:00
LICENSE
Makefile Makefile: rm BUILD target 2022-12-10 21:08:42 +00:00
README.md doc: correct #usage guidance 2022-12-10 19:17:48 +00:00
go.mod
go.sum
main.go main: wire up CLI 2022-12-09 18:06:01 +00:00

README.md

kdnotify - A keepalived FIFO handler

This is a utility that is primary focused on integrating with Keepalived's vrrp_notify_fifo_script and vrrp_notify_fifo configuration options.

It provides a more structured approach than Keepalived's suggested shell script, allowing users to specify rules for processing events, rather than requiring tedious and error prone handling of parsing and processing each event individually.

Usage

The primary usage of this binary requires three things:

  1. A configuration file in /etc/kdnotify/config.yaml
  2. A running kdnotify service, see kdnotify.socket
  3. Enabling Keepalived to use this project for notifications via:
# Or in any other block where vrrp_notify_fifo_script is legal
global_defs {
  notify_fifo /run/kdnotify.fifo [username [groupname]]
}

Development

You can run make help in the repo root to get a list of available targets, but these are the most useful:

Target Description
build Build the binary to build/kdnotify
check Run project checks and lints
install Install the project to the local system
clean Cleans build directory
configure Configures build time directives

Make sure you run check before merging to master.