diff --git a/src/sysalert/email.py b/src/sysalert/email.py index 2790670..d9163a6 100644 --- a/src/sysalert/email.py +++ b/src/sysalert/email.py @@ -50,7 +50,11 @@ def failure(name, failures, config): reader.add_match(MONITOR_INVOCATION_ID=latest_inv_id) reader.add_disjunction() reader.add_match(_SYSTEMD_INVOCATION_ID=latest_inv_id) - journal_txt = "\n".join([entry['MESSAGE'] for entry in reader]) + journal_txt = "\n".join( + [ + f'{entry["_SOURCE_REALTIME_TIMESTAMP"]}: {entry["MESSAGE"]}' + for entry in list(reader)[-200:] + ]) if nr_failures <= 1: subject=f"{hostname} - {name}: failure"