Getting Data In

Splunk not formatting AMP logs

jaridaycock
Engager

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
Builder

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
Builder

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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

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

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...