Extract the checking logic to only keep the Nagios parts