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!

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...

[Live Demo] Watch SOC transformation in action with the reimagined Splunk Enterprise ...

Overwhelmed SOC? Splunk ES Has Your Back Tool sprawl, alert fatigue, and endless context switching are making ...

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us on ...