added script for a new nagios check

This commit is contained in:
Maria Haider 2020-07-07 17:18:41 +02:00
parent 4d2709ea51
commit 3abc518ec9
Signed by: mariah
GPG key ID: 7414A760CA747E57

View file

@ -46,11 +46,11 @@ exp=$(date -d $dstr +%s)
now=$(date +%s)
d=$(expr $exp - $now)
if [ $d -ge $diff_crit ]; then
if [ $d -lt $diff_crit ]; then
echo "CRITICAL - metadata in $1 expires in $d seconds"
echo $status
exit $STATE_CRITICAL
elif [ $d -ge $diff_warn ]; then
elif [ $d -lt $diff_warn ]; then
echo "WARNING - metadata in $1 expires in $d seconds"
echo $status
exit $STATE_WARNING