I am using icinga to monitor my infrastructure and basically i wrote a small script with sudo privileges that does exactly what you are doing. it reads the timestamp of the last run and compares it to the current system time. if the difference is too big (arbitrary value we set) it returns with an exit code of 1 or 2 instead of 0. The icinga agent calls this locally