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!

Splunk Cloud | Empowering Splunk Administrators with Admin Config Service (ACS)

Greetings, Splunk Cloud Admins and Splunk enthusiasts! The Admin Configuration Service (ACS) team is excited ...

Tech Talk | One Log to Rule Them All

One log to rule them all: how you can centralize your troubleshooting with Splunk logs We know how important ...

Splunk Security Content for Threat Detection & Response, Q1 Roundup

Join Principal Threat Researcher, Michael Haag, as he walks through: An introduction to the Splunk Threat ...