Success rate script - Now updated for new delete terminology since v1.29.3

Hi @BrightSilence , hi all,

I want to proper handle this issue in the script resp. in a copy of your script.

Currently audits are selected like this:

audit_failed_warn=$(echo "$LOG1D" 2>&1 | grep -E 'GET_AUDIT|GET_REPAIR' | grep failed | grep -v -e exist -c)
audit_failed_crit=$(echo "$LOG1D" 2>&1 | grep -E 'GET_AUDIT|GET_REPAIR' | grep failed | grep exist -c)

The issue is, that the new “audit failure” contains both, “exist” AND “failed”, but it is more a “warning” instead of a “critical” error. Example:

2022-04-03T10:14:55.159Z        ERROR   piecestore      download failed {"Piece ID": "32B7EYRW5CFKH3MHXQSPIX7XSE2IJK7H7TF3OJCVTY6DXBNNCJ7A", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Action": "GET_REPAIR", "error": "used serial already exists in store", "errorVerbose": "used serial already exists in store

Do you have an idea how to properly mix the grep commands to properly categorise it? Something like:

WARN = grep "failed" | grep [not "exist"] OR ["exist" AND "used serial"]
CRIT = grep "failed" | grep ["exist"] AND NOT ["used serial"]