Hi graylog community,
since doesn’t exist an extractor for the exchange message tracking log, I thought I’d have a go at it.
Please consider that I’m new to regex and it may be too compliacted or total nonsense.
An exchange message tracking log usually looks like this:
2016-04-02T16:06:58.552Z,1.2.3.4,client.fqdn.net,2.3.4.5,server-fqdn,08D31F74F20E83B8;2016-04-02T16:06:58.334Z;0,client-fqdn\Client Proxy client-fqdn,SMTP,RECEIVE,70132520976434,<b5ab16e8f5ee4eab8e89f68d147ad0f4@client.fqdn.net>,5478464c-b318-4880-66a6-08d35b10d1a3,,,1487,1,,,Client submission probe,HealthMailbox36b8315e56974a65af058f1f72987168@domain.com,HealthMailbox36b8315e56974a65af058f1f72987168@domain.com,00I: ,Originating,,127.0.0.1,1.2.3.4,S:FirstForestHop=client.fqdn.net;S:ProxiedClientIPAddress=127.0.0.1;S:ProxiedClientHostname=SmtpClientSubmissionProbe;S:DeliveryPriority=Normal;S:AccountForest=fqdn.net;S:IsProbe=true;S:PersistProbeTrace=False;S:ProbeType=OnPremisesSmtpClientSubmission;S:Mailbox=d9f070e0-eda9-4c5c-ab42-722cf42f4b62
This is what I’ve come up with so far:
(timestamp=)(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\s{4}),(clientIP=)(\d{1,}.\d{1,}.\d{1,}.\d{1,}),(clientHostname=)(\w{1,}),(serverIP=)(\d{1,}.\d{1,}.\d{1,}.\d{1,}),(serverHostname=)(\w{1,}),(sourceContext=)(\w{1,});(connectorID=)(\d),(source=)(\w{1,}),(eventID=)(\w{1,}\s{1}\w{1}),(internalMessageID=)(\d{1,}),(messageID=)(\w{1,}\p\w{1,}.\w{1,}.\w{1,}),(networkMessageID=)(\d{1,}-\d{1,}),(recipientAddress=)(\w\d{1,}\p\w{1,}),(recipientStatus=)(\w\d{1,}\p\w{1,}),(totalBytes=)(\d{1,}\w{1,}),(recipientCount))(\w{1,}),(relatedRecipientAddress=)(\d{1,}.\d{1,}.\d{1,}.\d{1,}),(reference=)(\*?)?$
Windows events are so horrible to parse…
does this even make any sense what I came up with?
I haven’t extracted all fields so far, just wanted to make sure I’m not running in the wrong direction…
Does something like “*?” as a wildcard work?
If I come up with a working solution I will put it online on github, because it could be useful to someone else as well.
cheers,
theresa