<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AWS Logs via Lamda to HF drop preceding key from fieldname in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/AWS-Logs-via-Lamda-to-HF-drop-preceding-key-from-fieldname/m-p/673181#M112754</link>
    <description>&lt;P&gt;Hello, I've got a Lamda function exporting AWS logs via HEC to my HF's to my indexers.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, the AWS logs are coming in with event.* as all of the field names, whereas the Splunk_TA_aws addon is expecting *.&lt;BR /&gt;&lt;BR /&gt;I can easily do a rename event.* as a *, however that's too late for the out of the box props.conf's to take effect. This causes things like the the&lt;BR /&gt;&lt;BR /&gt;"FIELDALIAS-eventName-for-aws-cloudtrail-command = eventName AS commandrename eventName as command"&lt;BR /&gt;&lt;BR /&gt;in props.conf to fail unless I go in and modify it to be event.eventName. I'd like to fix this before it gets to SPL. Is there a way to do this easily? Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2024 21:25:46 GMT</pubDate>
    <dc:creator>cybersecnutant</dc:creator>
    <dc:date>2024-01-03T21:25:46Z</dc:date>
    <item>
      <title>AWS Logs via Lamda to HF drop preceding key from fieldname</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/AWS-Logs-via-Lamda-to-HF-drop-preceding-key-from-fieldname/m-p/673181#M112754</link>
      <description>&lt;P&gt;Hello, I've got a Lamda function exporting AWS logs via HEC to my HF's to my indexers.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, the AWS logs are coming in with event.* as all of the field names, whereas the Splunk_TA_aws addon is expecting *.&lt;BR /&gt;&lt;BR /&gt;I can easily do a rename event.* as a *, however that's too late for the out of the box props.conf's to take effect. This causes things like the the&lt;BR /&gt;&lt;BR /&gt;"FIELDALIAS-eventName-for-aws-cloudtrail-command = eventName AS commandrename eventName as command"&lt;BR /&gt;&lt;BR /&gt;in props.conf to fail unless I go in and modify it to be event.eventName. I'd like to fix this before it gets to SPL. Is there a way to do this easily? Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 21:25:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/AWS-Logs-via-Lamda-to-HF-drop-preceding-key-from-fieldname/m-p/673181#M112754</guid>
      <dc:creator>cybersecnutant</dc:creator>
      <dc:date>2024-01-03T21:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: AWS Logs via Lamda to HF drop preceding key from fieldname</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/AWS-Logs-via-Lamda-to-HF-drop-preceding-key-from-fieldname/m-p/673434#M112780</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/151299"&gt;@cybersecnutant&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If we assume your events are JSON-formatted:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{"event.field1": "value1", "event.field2": "value2", "event.field3": "value3"}&lt;/LI-CODE&gt;&lt;P&gt;you can remove the event. field prefix using SEDCMD in props.conf on your heavy forwarder:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;# local/props.conf
[your_sourcetype]
SEDCMD-strip-event = s/"event\.([^"]+)"/"\1"/g&lt;/LI-CODE&gt;&lt;P&gt;or a combination of RULESET in props.conf and a transform in transforms.conf (together, an ingest action) on either your heavy forwarder or your indexer(s):&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;# local/props.conf
[your_sourcetype]
RULESET-strip-event = strip-event

# local/transforms.conf
[strip-event]
INGEST_EVAL = _raw:=replace(_raw, "\"event\.([^\"]+)\"", "\"\\1\"")&lt;/LI-CODE&gt;&lt;P&gt;You can also reference the same INGEST_EVAL transform in a TRANSFORMS setting in props.conf. The difference is where in the pipeline the various methods execute. SEDCMD and TRANSFORMS execute between typingQueue and rulesetQueue (along the path for "raw" data), and RULESET executes between rulesetQueue and indexQueue (the injection point for parsed or "cooked" data).&lt;/P&gt;&lt;P&gt;Your final raw event would be:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{"field1": "value1", "field2": "value2", "field3": "value3"}&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 06 Jan 2024 17:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/AWS-Logs-via-Lamda-to-HF-drop-preceding-key-from-fieldname/m-p/673434#M112780</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2024-01-06T17:07:24Z</dc:date>
    </item>
  </channel>
</rss>

