2022-11-24 12:43:17 +00:00
|
|
|
# kdnotify - A keepalived FIFO handler
|
2022-12-10 08:50:00 +00:00
|
|
|
|
|
|
|
This is a utility that is primary focused on integrating with [Keepalived][@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
|
|
|
|
|
2022-12-10 19:17:48 +00:00
|
|
|
The primary usage of this binary requires three things:
|
2022-12-10 08:50:00 +00:00
|
|
|
|
|
|
|
1. A configuration file in `/etc/kdnotify/config.yaml`
|
2022-12-10 19:17:48 +00:00
|
|
|
2. A running kdnotify service, see [kdnotify.socket](./systemd/kdnotify.socket)
|
|
|
|
3. Enabling Keepalived to use this project for notifications via:
|
2022-12-10 08:50:00 +00:00
|
|
|
|
|
|
|
```conf
|
|
|
|
# Or in any other block where vrrp_notify_fifo_script is legal
|
2022-12-10 19:17:48 +00:00
|
|
|
global_defs {
|
|
|
|
notify_fifo /run/kdnotify.fifo [username [groupname]]
|
2022-12-10 08:50:00 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Development
|
|
|
|
|
|
|
|
You can run `make help` in the repo root to get a list of available targets, but these
|
|
|
|
are the most useful:
|
|
|
|
|
2022-12-10 19:17:48 +00:00
|
|
|
| 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 |
|
2022-12-10 08:50:00 +00:00
|
|
|
|
|
|
|
Make sure you run `check` before merging to `master`.
|
|
|
|
|
|
|
|
<!-- Links and file refs -->
|
|
|
|
|
|
|
|
[@keepalived]: https://www.keepalived.org/index.html
|