I believe that I have succesfully configured Icinga 2 on Debian 9 (Stretch) using the stock Debian packages with the "Top Down Config Sync" mode as described in the Icinga documentation.
I have installed icinga2 and monitoring-plugins-basic on the clients and I am able to add remote checks using check_apt
etc. I've even managed to add my own CheckCommands
via the "global-templates" mechanism that are sent to the clients automatically and end up in /var/lib/icinga2/api/zones/global-templates/_etc/
I have a number of my own check scripts (written in shell and Python) that I'd also like to run. I've put them in /etc/icinga2/zones.d/global-templates
too and they also get sent to the clients. However, they lose their execute bit on the way so I'm forced to provide the interpreter explicitly when I run them. This works, but it's a bit ugly.
Is there a better way to send my check scripts from the master to clients? If not, is there a way to keep the execute bit with this method?