Getting Data In

Splunk not formatting AMP logs

jaridaycock
Explorer

I will preface by saying I am very new to using Splunk. We have recently did a rebuild of our environment and I noticed that one of our log sources does not return formatted logs the same way our other log sources do. Whenever I try and do a query for AMP (Cisco Secure Endpoint) I have to click 'Show as raw text' to see any data which does not seem right to me. 

I have been trying to extract fields using Rex as well and it just does not seem to be working and I'm not sure if it has something to do with how the logs are displaying when I do a query. Could someone point me in the right direction?

Endpoint.PNGEndpoint_Rawmessage.png

Labels (3)
0 Karma
1 Solution

marnall
Motivator

At search time, you could use spath to navigate past the "event:" part of the log:

<yoursearch>
| spath path=event output=_raw

However you may want a solution that does not require spath on every search. You can configure your indexing tier to remove the "event:" part of the log, so that it directly shows you the useful fields without needing to be expanded.

On the indexing tier, make a props.conf file in an app e.g.
/opt/splunk/etc/apps/yourappname/local/props.conf

Make this stanza:

[cisco:amp:event]
SEDCMD-RemoveEventKey = s/{"event":\s*//
SEDCMD-RemoveLastBracket = s/}$//

 (and more stanzas for other sourcetypes you would like this change to apply to) 

View solution in original post

marnall
Motivator

At search time, you could use spath to navigate past the "event:" part of the log:

<yoursearch>
| spath path=event output=_raw

However you may want a solution that does not require spath on every search. You can configure your indexing tier to remove the "event:" part of the log, so that it directly shows you the useful fields without needing to be expanded.

On the indexing tier, make a props.conf file in an app e.g.
/opt/splunk/etc/apps/yourappname/local/props.conf

Make this stanza:

[cisco:amp:event]
SEDCMD-RemoveEventKey = s/{"event":\s*//
SEDCMD-RemoveLastBracket = s/}$//

 (and more stanzas for other sourcetypes you would like this change to apply to) 

Get Updates on the Splunk Community!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...