Icinga / icinga2

The core of our monitoring platform with a powerful configuration language and REST API.
https://icinga.com/docs/icinga2/latest
GNU General Public License v2.0
1.99k stars 570 forks source link

icinga2 daemon reload #9136

Open LasBushus opened 2 years ago

LasBushus commented 2 years ago

To check the configuration icinga2 daemon -C is used, but to reload you need to use either the systemd or init.d command. Is it possible to create a different parameter, like -R to reload the daemon. This would simply be to unify/simplify the typing, as icinga2 daemon -C and icinga2 daemon -R is much quicker and more intuitive, then icinga2 daemon -C and systemctl reload icinga2

julianbrost commented 2 years ago

Sounds like something that would benefit from #7349 rather than doing some more pidfile magic (alternative would be doing kill -HUP $(cat /run/icinga2/icinga2.pid) within that proposed command).

leeclemens commented 2 years ago

fwiw, systemd would already be handling the "pidfile magic" (on those systems, at least). e.g. nginx.service: ExecReload=/bin/kill -s HUP $MAINPID