After upograding to the latest GRaylog verison, 4.2.4, some of my backlog messages are not sent with my alert notifications.
I have multiple alerts set up, some send the backlogs, some don’t. All of these were working prior to the upgrade and nothing was changed in my notification alerts after I upgraded.
Below are my notification templates for one that is working and one that isn’t, they are identical. Both event definitions have the “Message backlog” check box enabled and set to 1.
Message alert that works:
— [Event Definition] ---------------------------
Title: ${event_definition_title}
Description: ${event_definition_description}
Type: ${event_definition_type}
— [Event] --------------------------------------
Timestamp: ${event.timestamp}
Message: ${event.message}
Source: ${event.source}
${if backlog}
— [Backlog] ------------------------------------
Last messages accounting for this alert:
${foreach backlog message}
Source of alert: ${message.source}
Real message: ${message.message}
${message}
${end}
${end}
Message alert that doesn’t work:
Bad Email Connection Attempts
Timestamp: ${event.timestamp}
Message: ${event.message}
${if backlog}
${foreach backlog message}
Source of alert: ${message.source}
Real message: ${message.message}
${end}
${end}
Here’s examples of the emails that I receive:
— [Event Definition] ---------------------------
Title: FTP connection failure
Description: Email when a connection failure occurs via FTP
Type: aggregation-v1
— [Event] --------------------------------------
Timestamp: 2021-12-21T11:36:29.000Z
Message: FTP connection failure
Source: syslog
— [Backlog] ------------------------------------
Last messages accounting for this alert:
Source of alert: ftp
Real message: (?@35.195.93.98) [WARNING] Authentication failed for user [anonymous]
{index=graylog_187, message=(?@35.195.93.98) [WARNING] Authentication failed for user [anonymous], timestamp=2021-12-21T11:36:29.000Z, source=ftp, stream_ids=[611c1f9f42c6cb7725ef4d63, 000000000000000000000001], fields={gl2_accounted_message_size=219, application_name=pure-ftpd, level=4, gl2_remote_ip=10.1.1.1, gl2_remote_port=49236, facility_num=11, gl2_message_id=01FQEC337S9VRGXVYNRTC19X84, gl2_source_node=db8a38f9-c646-41ba-8dfc-8a04a70a387b, gl2_source_input=5f4fe62742c6cb17792cba7e, facility=FTP}, id=5c13d780-6251-11ec-9964-be7fe1bcfd20}
The one that does not work, it’s like everything within the {if backlog} fails to send:
Bad Email Connection Attempts
Timestamp: 2021-12-21T15:55:52.980Z
Message: Email Error Report: sendmail - count(application_name)=3.0