I'm using filebeat to send IIS log files from Windows Server machine. It parses logs from IIS (web logs) just fine, but it can't parse SMTP logs which have the same format.
On Kibana I see this error:
Provided Grok expressions do not match field value:
[2020-04-27 06:43:55 127.0.0.1 hostname SMTPSVC1 hostname 127.0.0.1 0 EHLO - +hostname 250 0 185 16 0 SMTP - - - -]
Please advise what I supposed to do to see parsed SMTP logs. Let me know if any extra info is needed.
Sorry to hear you're having problems. Could you please provide the following information:
Are you using Filebeat "as-is" (using the Filebeat index templates, using the IIS module etc)? Or do you have something like an Ingest pipeline in between?
Hi @Kerry!
I'm using IIS module for filebeat 7.6.1 version "as-is" with default grok patterns.
Here are these patterns from this file:
C:\Program Files\Elastic\Beats\7.6.1\filebeat\module\iis\access\ingest
default.json
Those Grok patterns are definitely incompatible with the log examples you've provided. It looks like you'll need to add some extra patterns to cover the SMTP scenario.
We have a Grok debugger available at app/kibana#/dev_tools/grokdebugger which you can use to help with the creation of patterns.
Using the fields listed for the IIS module you'll be able to create a suitable pattern that follows date time c-ip cs-username s-sitename s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status sc-win32-status sc-bytes cs-bytes time-taken cs-version cs-host cs(User-Agent) cs(Cookie) cs(Referer)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.