I created a custom plugin script and a CheckCommand to go with it. For some reason, it does not appear in Director’s list of external commands.
An older custom plugin+check command I created a few years ago but no longer use does show up, and I used it as a model. Both check command definitions live in their own files in the same directory on the master node (zones.d/global-templates/commands/), both files have the same ownership and permissions.
The master accepts the new config file and is able to execute the new check command and its plugin for a service that I defined the “old fashioned” way. Nevertheless, Director refuses to acknowledge its existence.
There are exactly two differences to the best of my knowledge: the older CheckCommand definition was present when I installed Director for the first time, but not the newer one; and the newer one contains both a CheckCommand template and the derived CheckCommand object I’m actually trying to use, while the older one only has the implied import "plugin-check-command" (inserted when rendered by Icingaweb2, not present in the source file). I tried explicitly adding the same import to the new template, but that had no effect–which isn’t a surprise.
I’ve tried restarting the Director service and everything else, too (systemctl restart icinga*). It’s tempting to reinstall Director and see if it picks up the new command definition or not, since that seems to be the only real difference between the two command definitions that the master would have no awareness of or capability to affect.
Did I miss a step somewhere, or is this as unexpected to others as it is to me?
Versions of everything:
- Director 1.11.8
- IcingaDB 1.1.4
- Icingaweb 2 2.12.7
- Icinga2 r2.16.5-1
- Ubuntu 22.04.5 LTS
- php-fpm 8.1.2
- nginx 1.18.0