mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 10:12:53 +01:00
Move alert generation outside of the inner loop
This commit is contained in:
@@ -58,10 +58,10 @@ while overlimit && [[ $ITERATION -lt $MAX_ITERATIONS ]]; do
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
((ITERATION++))
|
((ITERATION++))
|
||||||
|
done
|
||||||
if [[ $ITERATION -ge $MAX_ITERATIONS ]]; then
|
if [[ $ITERATION -ge $MAX_ITERATIONS ]]; then
|
||||||
alert_id=$(uuidgen)
|
alert_id=$(uuidgen)
|
||||||
printf "\n$(date) -> Maximum iteration limit reached ($MAX_ITERATIONS). Unable to bring disk below threshold. Writing alert ($alert_id) to ${ALERT_LOG}\n" >> ${LOG}
|
printf "\n$(date) -> Maximum iteration limit reached ($MAX_ITERATIONS). Unable to bring disk below threshold. Writing alert ($alert_id) to ${ALERT_LOG}\n" >> ${LOG}
|
||||||
printf "\n$(date),$alert_id,Maximum iteration limit reached ($MAX_ITERATIONS). Unable to bring disk below threshold.\n" >> ${ALERT_LOG}
|
printf "\n$(date),$alert_id,Maximum iteration limit reached ($MAX_ITERATIONS). Unable to bring disk below threshold.\n" >> ${ALERT_LOG}
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user