diff --git a/smartgears/resource_checker_se_plugin/templates/check_missing_resources.sh.j2 b/smartgears/resource_checker_se_plugin/templates/check_missing_resources.sh.j2 index 2481e020..4c2c0c7c 100644 --- a/smartgears/resource_checker_se_plugin/templates/check_missing_resources.sh.j2 +++ b/smartgears/resource_checker_se_plugin/templates/check_missing_resources.sh.j2 @@ -3,6 +3,13 @@ COMMON_SH_LIB={{ nagios_isti_plugdir }}/check_library.sh RESOURCES_STATUS_FILE={{ smartgears_user_home }}/missing_resources/identifiers +# First things first: check if the service is running +RUNNING_FILE=$( find /{{ smartgears_user_home }}/missing_resources/identifiers -mmin -120 ) +if [ -z $RUNNING_FILE ] ; then + echo "CRITICAL - The resource checker did not update for more than two hours" + exit $NAGIOS_CRITICAL +fi + if [ -f $COMMON_SH_LIB ] ; then . $COMMON_SH_LIB else