Initial commit for restart_service

This commit is contained in:
Yavuz Aydın 2021-10-06 15:58:58 +02:00
parent c11f7652b1
commit 5310804998
1 changed files with 11 additions and 0 deletions

View File

@ -8,3 +8,14 @@ to check if a reboot is required and also list packages that requires reboot
#### stat_net.pl
Plugin for checking network errors and statictics
#### restart_service
Event command to restart a service. Restaring a service will require sudo privileges on systemctl / service binaries. Add the following to `/etc/sudoers` on the client machine:
```
icinga ALL=(ALL) NOPASSWD: /bin/systemctl restart *
icinga ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart *
icinga ALL=(ALL) NOPASSWD: /sbin/service * restart
icinga ALL=(ALL) NOPASSWD: /usr/sbin/service * restart
```
If your Icinga2 client runs as a different user adjust as necessary.