PRTG sensor for determining whether or not a Linux machine is in need of a reboot

On Ubuntu (and sometimes Debian systems) the existence of the /var/run/reboot-required file indicates whether or not a reboot is required after updates have been applied.

I have a github repository with updated versions of these PRTG sensors at: https://github.com/andygajetzki/prtg-sensors

The below script should be placed in /var/prtg/scripts on the machine you wish to monitor. Once an appropriate SSH Script Sensor is created, it will allow PRTG to monitor this parameter of your system.

#!/bin/sh
if [ -f /var/run/reboot-required ]
then
    echo '2:0:REBOOT REQUIRED'
else
   echo '0:0:OK'
fi