#!/bin/bash
THRESHOLD='600';

UPTIME=$(</proc/uptime)
UPTIME=${UPTIME%%.*}

if [ "$UPTIME" -lt "$THRESHOLD" ]; then
    echo "CRITICAL - System rebooted ${UPTIME} seconds ago";
    exit 1;
else
    echo "OK - Uptime ${UPTIME} seconds";
    exit 0;
fi
