nagios: file-age: drop stderr from find command
This commit is contained in:
parent
b4c974309a
commit
1fdd934e30
1 changed files with 2 additions and 2 deletions
|
@ -128,8 +128,8 @@ while getopts hw:c:W:C:s:b:f: f; do
|
||||||
# un buffer et de le traiter ensuite
|
# un buffer et de le traiter ensuite
|
||||||
FIND_NAME_REGEXP="$OPTARG"
|
FIND_NAME_REGEXP="$OPTARG"
|
||||||
|
|
||||||
FILES_NUMBER_AT_WARN_AGE="$( find "$FIND_BASEDIR" -name "$FIND_NAME_REGEXP" -type f \( -size "$MIN_SIZE" -or -size "+$MIN_SIZE" \) -mtime "-$RANGE_WARNING_AGE" -printf "a\n" | wc -l )"
|
FILES_NUMBER_AT_WARN_AGE="$( find "$FIND_BASEDIR" -name "$FIND_NAME_REGEXP" -type f \( -size "$MIN_SIZE" -or -size "+$MIN_SIZE" \) -mtime "-$RANGE_WARNING_AGE" -printf "a\n" 2>/dev/null | wc -l )"
|
||||||
FILES_NUMBER_AT_CRIT_AGE="$( find "$FIND_BASEDIR" -name "$FIND_NAME_REGEXP" -type f \( -size "$MIN_SIZE" -or -size "+$MIN_SIZE" \) -mtime "-$RANGE_CRITICAL_AGE" -printf "a\n" | wc -l )"
|
FILES_NUMBER_AT_CRIT_AGE="$( find "$FIND_BASEDIR" -name "$FIND_NAME_REGEXP" -type f \( -size "$MIN_SIZE" -or -size "+$MIN_SIZE" \) -mtime "-$RANGE_CRITICAL_AGE" -printf "a\n" 2>/dev/null | wc -l )"
|
||||||
|
|
||||||
# mémo : 'label'=value[UOM];[warn];[crit];[min];[max]
|
# mémo : 'label'=value[UOM];[warn];[crit];[min];[max]
|
||||||
OUTPUT_PERFDATA=$( printf "%s'warn%s'=%d;%s;;0;" \
|
OUTPUT_PERFDATA=$( printf "%s'warn%s'=%d;%s;;0;" \
|
||||||
|
|
Loading…
Reference in a new issue