diff --git a/contrib/eddn-logs-archive b/contrib/eddn-logs-archive index 972f710..c6bcdea 100755 --- a/contrib/eddn-logs-archive +++ b/contrib/eddn-logs-archive @@ -88,8 +88,8 @@ do # We have no means to tell the service to close and re-open output, it's # to stdout/err anyway. So we copy it. TIMESTAMP="$(date --iso-8601=seconds)" - COMPRESSED_NAME="${service}.log.${TIMESTAMP}" - cp ${service}.log "${COMPRESSED_NAME}" + ARCHIVED_NAME="${service}.log.${TIMESTAMP}" + cp ${service}.log "${ARCHIVED_NAME}" if [ $? -ne 0 ]; then echo " FAILED copying live log file to new archive!!!" >&2 @@ -99,12 +99,14 @@ do # Truncate the live file. :> ${service}.log - # Produce a report on the just-rotated log - ${HOME}/.local/bin/eddn-report-log-errors "${COMPRESSED_NAME}" > \ - "${HOME}/reports/eddn-errors/by-log-rotation/eddn-errors-${TIMESTMAP}.txt" + if [ "${service}" == "gateway" ]; + then + # Produce a report of interesting errors + ${HOME}/.local/bin/eddn-report-log-errors "${ARCHIVED_NAME}" > "${HOME}/reports/eddn-errors/by-log-rotation/eddn-errors-${TIMESTAMP}.txt" + fi # Now compress the newly archived log - gzip -9v "${COMPRESSED_NAME}" + gzip -9v "${ARCHIVED_NAME}" log " DONE" else log " No" diff --git a/scripts/eddn-report-log-errors b/scripts/eddn-report-log-errors index 45a95c7..0f95367 100755 --- a/scripts/eddn-report-log-errors +++ b/scripts/eddn-report-log-errors @@ -105,6 +105,23 @@ def process_file(input_file: str) -> None: print(matches.group('err_msg')) print(line) + elif matches.group('schema_ref') == 'https://eddn.edcd.io/schemas/journal/1': + # + if matches.group('err_msg') == 'Failed Validation "[]"': + # + pass + + elif matches.group('err_msg').startswith( + 'Failed Validation "[ + pass + + elif matches.group('schema_ref') == 'https://eddn.edcd.io/schemas/fssdiscoveryscan/1': + if matches.group('err_msg') == 'Failed Validation "[]"': + # + pass + else: print(line)