Getting Data In

Writing props.conf for logfile having below log style

ajaylowes
Path Finder
*****************************************************************************
***************           SYSTEM    ERROR:   000000           ***************
DATE: 07/05/2017 ********************************************* TIME: 12:00 AM

i am starting to learn splunk , its good and very interesting > i love splunk ./
REFERENCE CODE: ABC_XYZ_FILECOPY-82728

i need to create props.conf to break the logfile containing logs shown above into events.
Please help me write one props.conf which remove all stars since they are not useful

Thanks

Tags (1)
0 Karma
1 Solution

lguinn2
Legend

If this is the whole log, then it looks like you want one event per file. Try this in props.conf

[yoursourcetypehere]
BREAK_ONLY_BEFORE=^**************************************************$
TIME_PREFIX = DATE\:
MAX_TIMESTAMP_LOOKAHEAD = 200
TIME_FORMAT = %m/%d/%Y ********************************************* TIME: %H:%M %p

You may have to tweak this a bit to get it right for your log file.

View solution in original post

0 Karma

woodcock
Esteemed Legend

Use these settings in props.conf:

[yourSourcetypeHere]
LINE_BREAKER = ([\r\n]+)\*{70}
TIME_PREFIX = DATE\:
MAX_TIMESTAMP_LOOKAHEAD = 80
TIME_FORMAT = %m/%d/%Y ********************************************* TIME: %H:%M %p
0 Karma

ajaylowes
Path Finder

does this remove the star from the event and then digest it into splunk?

0 Karma

woodcock
Esteemed Legend

Show us the first 2 events and the last 2 events.

0 Karma

ajaylowes
Path Finder
*****************************************************************************
***************           SYSTEM    ERROR:   510762           ***************
DATE: 07/06/2017 ********************************************* TIME: 12:00 AM

<1 line text>


<2 line text>

REFERENCE CODE: DMS_RMT_FILECOPY-82727


*****************************************************************************
***************           SYSTEM    ERROR:   510763           ***************
DATE: 07/06/2017 ********************************************* TIME: 12:00 AM

<1 line text>


<2 line text>

REFERENCE CODE: DMS_RMT_FILECOPY-82728


*****************************************************************************
***************           SYSTEM    ERROR:   510764           ***************
DATE: 07/06/2017 ********************************************* TIME: 12:00 AM

<1 line text>


<2 line text>

REFERENCE CODE: DMS_RMT_FILECOPY-82727
0 Karma

lguinn2
Legend

If this is the whole log, then it looks like you want one event per file. Try this in props.conf

[yoursourcetypehere]
BREAK_ONLY_BEFORE=^**************************************************$
TIME_PREFIX = DATE\:
MAX_TIMESTAMP_LOOKAHEAD = 200
TIME_FORMAT = %m/%d/%Y ********************************************* TIME: %H:%M %p

You may have to tweak this a bit to get it right for your log file.

0 Karma

ajaylowes
Path Finder

There are several similar logs in one file. Also , i need to remove stars from the log since they are unwanted.

0 Karma

sbbadri
Motivator

in props.conf

[my_source_type]
SEDCMD-remove_asteriks1 = s/(\W+\s+)SYSTEM/SYSTEM/g
SEDCMD-remove_asteriks2 = s/(\s+\W+)DATE:/ DATE:/g
SEDCMD-remove_asteriks3 = s/(\s+\W+)TIME:/ TIME:/g

0 Karma

ajaylowes
Path Finder

hi ,

can you please explain how that works....

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Event Series: Telemetry Pipeline Management

Balancing Scale and Spend: Gaining Control Over High-Volume Metrics in Splunk Observability Cloud As ...

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...

Deep insights, no barriers: Splunk Observability Cloud Free Edition

As software delivery cycles continue to accelerate, observability shouldn’t be a luxury — it should be a ...