library/roles/smartgears/resource_checker_se_plugin/templates/check_missing_resources.sh.j2: Go to critical if the resources file is older than two hours. It means that the service is not working.
This commit is contained in:
parent
2da1a671c2
commit
ae17604335
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue