monitoring-plugins/README.md

36 lines
1.6 KiB
Markdown
Raw Normal View History

2021-01-07 15:34:16 +01:00
# monitoring-plugins
Monitoring plugins for Nagios, Icinga and all other NRPE compatible monitoring solutions
#### check_reboot-required
Plugin for NRPE (Nagios Remote Plugin Executor) for Debian/Ubuntu and Red Hat/CentOS
to check if a reboot is required and also list packages that requires reboot
2021-06-11 09:17:24 +02:00
#### stat_net.pl
Plugin for checking network errors and statictics
2021-10-06 15:58:58 +02:00
#### restart_service
2021-10-06 22:11:21 +02:00
Event command to restart a service. Restarting a service will require sudo privileges on systemctl / service binaries. Add the following to `/etc/sudoers` on the client machine:
2021-10-06 15:58:58 +02:00
```
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
```
2021-10-06 22:11:21 +02:00
If your Icinga2 client runs as a different user adjust as necessary.
This is meant for use with a command_endpoint set to the client. See [official documentation](https://icinga.com/docs/icinga-2/latest/doc/03-monitoring-basics/#use-event-commands-to-send-information-from-the-master) examples.
#### restart_service_from_remote
Event command to restart a service. Restarting 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.
This is meant to be called from the master / satellite through restart_service_on_endpoint.