Getting Data In

Help with parsing a cmd log file

arijitnag
New Member

==============================================
**Command: C:\cmd command - xxx..
Started at: 12/04/2017 07:03:02

Finished at: 12/04/2017 07:06:03 with code 0**

==============================================
**Command: C:\cmd command - xxx..
Started at: 12/04/2017 07:03:02

Finished at: 12/04/2017 07:06:03 with code 0**

==============================================
**Command: Command\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
Started at: 12/04/2017 07:06:03
Command output:
c:># xxxxxxxxxxxxxxxxxxx......
c:>xxxxxxxxxxxxxxxxxxxx

Finished at: 12/04/2017 07:06:25 with code 0**

==============================================
**Command: C:\cmd command - xxx..
Started at: 12/04/2017 07:06:25

Finished at: 12/04/2017 07:06:28 with code 0**

Individual log entries begin and end with a '====' separator.

Since the timestamp entries are seemless across logs, finished and new log parsing is erratic.

Tried with putting following prop.conf at $SPLUNK_HOME/system/local

[source_type]
LINE_BREAKER = [=]+
BREAK_ONLY_BEFORE_DATE = false
SHOULD_LINEMERGE = true
DATETIME_CONFIG = NONE
MUST_BREAK_AFTER = [=]+

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The LINE_BREAKER attribute needs a capture group to work correctly. Try LINE_BREAKER = ([=\s]+)Command: or LINE_BREAKER = ()Command:.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The LINE_BREAKER attribute needs a capture group to work correctly. Try LINE_BREAKER = ([=\s]+)Command: or LINE_BREAKER = ()Command:.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...