Just setup a new and my first Graylog instance. I am currently sending message from Cowrie, an SSH honeypot, to Graylog. The messages that come into Graylog are all of the commands someone typed in the SSH session. If I look at all of the messages in Graylog you can see this.
I’d really like to get a single e-mail with all of those commands in there. I configured the event definition to have a message backlog of 10 messages. With the default e-mail notification I get a lot of weird data that I’m not really sure I’m comprehending.
{index=graylog_1, message=New connection: 10.93.36.50:27145 (10.93.4.229:22) [session: ea294ff6aad4], fields={eventid=cowrie.session.connect, gl2_accounted_message_size=349, gl2_receive_timestamp=2024-07-24 16:07:24.002, level=1, gl2_remote_ip=10.93.4.229, session=ea294ff6aad4, gl2_processing_error=Replaced invalid timestamp value in message with current time - Value <2024-07-24T16:07:23.735322Z> caused exception: Invalid format: “2024-07-24T16:07:23.735322Z” is malformed at “T16:07:23.735322Z”., gl2_remote_port=53564, gl2_message_id=01J3JQYKX900001NJ9JZ8D9A0W, gl2_source_input=668c50840653422bacf2aa6c, dst_ip=10.93.4.229, src_ip=10.93.36.50, src_port=27145, gl2_processing_timestamp=2024-07-24 16:07:24.331, protocol=ssh, system=cowrie.ssh.factory.CowrieSSHFactory, dst_port=22, gl2_source_node=9315c78a-db32-42f2-b372-a2f82a7a0967, sensor=backup, time=1.7218372437353218E9, gl2_processing_duration_ms=329}, id=d0906e10-49d6-11ef-b964-0242ac120004, timestamp=2024-07-24T16:07:24.329Z, source=backup, stream_ids=[000000000000000000000001]}
I tried tweaking the message body from the default
${foreach backlog message}
${message}
${end}
to
${foreach backlog message}
${message.message}
${end}
and that seemed to get me one of the messages that I saw in the search screenshot I posted above, but it was just one and not all of them. How do I get all of the backlog messages in the e-mail notification?
I tried looking though the docs, but there wasn’t enough there for me to totally understand and the JMTE doc isn’t rendering properly which makes it a little difficult to read. Can you at least point me in the right direction? Thanks