I would like a service check in icinga2 to test if a reboot is required on my
ubuntu servers. something like
#!/bin/bash
if [ ! -f /var/run/reboot-required ]; then
# no reboot required (0=OK)
echo "OK: no reboot required"
exit 0
else
# reboot required (1=WARN)
On Tuesday 06 September 2016 at 16:50:29, Robert Jenkins wrote:
> I would like a service check in icinga2 to test if a reboot is required on
> my ubuntu servers. something like
>
> #!/bin/bash
> if [ ! -f /var/run/reboot-required ]; then
> # no reboot required (0=OK)
> echo "OK: n
I modified the script as per your suggestion and saved the script to
"/usr/lib/nagios/plugins" as "check_reboot_required". I then went to
"/etc/icinga2/conf.d" directory and added a config file called
"reboot_required.conf" with the following in it.
apply Service "reboot_required" {
import "
Replace
check_command = "reboot_required"
with
check_command = "check_reboot_required"
That's the name you saved it as in /usr/lib/nagios/plugins
On 09/06/2016 01:46 PM, Robert Jenkins wrote:
I modified the script as per your suggestion and saved the script to "/usr/lib/nagios/plugins" as