<?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 Re: extract fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702550#M238199</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273404"&gt;@afeng&lt;/a&gt;&amp;nbsp;You want to extract at for the already ingested/existing logs at Splunk indexer(search time)&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;for the new logs yet to be ingested to splunk (are you using any addons, TA's.. are you using UF and/or HF?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2024 01:25:27 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2024-10-23T01:25:27Z</dc:date>
    <item>
      <title>extract fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702540#M238196</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Oct&lt;/SPAN&gt; &lt;SPAN class=""&gt;22&lt;/SPAN&gt; &lt;SPAN class=""&gt;14:20:45&lt;/SPAN&gt; &lt;SPAN class=""&gt;10.5.0.200&lt;/SPAN&gt; &lt;SPAN class=""&gt;DNAC&lt;/SPAN&gt; {"&lt;SPAN class=""&gt;version&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;1.0.0&lt;/SPAN&gt;","&lt;SPAN class=""&gt;instanceId&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;20fd8163-4ca8-424b-a5a9-1e4018372abb&lt;/SPAN&gt;","&lt;SPAN class=""&gt;eventId&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;AUDIT_LOG_EVENT&lt;/SPAN&gt;","&lt;SPAN class=""&gt;namespace&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;AUDIT_LOG&lt;/SPAN&gt;","&lt;SPAN class=""&gt;name&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;AUDIT_LOG&lt;/SPAN&gt;","&lt;SPAN class=""&gt;description&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;Executing&lt;/SPAN&gt; &lt;SPAN class=""&gt;command&lt;/SPAN&gt; &lt;SPAN class=""&gt;terminal&lt;/SPAN&gt; &lt;SPAN class=""&gt;width&lt;/SPAN&gt; &lt;SPAN class=""&gt;0\nconfig&lt;/SPAN&gt; &lt;SPAN class=""&gt;t\nFailed&lt;/SPAN&gt; &lt;SPAN class=""&gt;to&lt;/SPAN&gt; &lt;SPAN class=""&gt;fetch&lt;/SPAN&gt; &lt;SPAN class=""&gt;the&lt;/SPAN&gt; &lt;SPAN class=""&gt;preview&lt;/SPAN&gt; &lt;SPAN class=""&gt;commands.\n&lt;/SPAN&gt;","&lt;SPAN class=""&gt;type&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;AUDIT_LOG&lt;/SPAN&gt;","&lt;SPAN class=""&gt;category&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;INFO&lt;/SPAN&gt;","&lt;SPAN class=""&gt;domain&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;Audit&lt;/SPAN&gt;","&lt;SPAN class=""&gt;subDomain&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"","&lt;SPAN class=""&gt;severity&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:1&lt;/SPAN&gt;,"&lt;SPAN class=""&gt;source&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;NA&lt;/SPAN&gt;","&lt;SPAN class=""&gt;timestamp&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:1729606845043&lt;/SPAN&gt;,"&lt;SPAN class=""&gt;details&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;{"&lt;SPAN class=""&gt;requestPayloadDescriptor&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;terminal&lt;/SPAN&gt; &lt;SPAN class=""&gt;width&lt;/SPAN&gt; &lt;SPAN class=""&gt;0\nconfig&lt;/SPAN&gt; &lt;SPAN class=""&gt;t\nFailed&lt;/SPAN&gt; &lt;SPAN class=""&gt;to&lt;/SPAN&gt; &lt;SPAN class=""&gt;fetch&lt;/SPAN&gt; &lt;SPAN class=""&gt;the&lt;/SPAN&gt; &lt;SPAN class=""&gt;preview&lt;/SPAN&gt; &lt;SPAN class=""&gt;commands.\n&lt;/SPAN&gt;","&lt;SPAN class=""&gt;requestPayload&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;\n&lt;/SPAN&gt;"},"&lt;SPAN class=""&gt;ciscoDnaEventLink&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:null&lt;/SPAN&gt;,"&lt;SPAN class=""&gt;note&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:null&lt;/SPAN&gt;,"&lt;SPAN class=""&gt;tntId&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;630db6e989269c11640abd49&lt;/SPAN&gt;","&lt;SPAN class=""&gt;context&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:null&lt;/SPAN&gt;,"&lt;SPAN class=""&gt;userId&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;system&lt;/SPAN&gt;","&lt;SPAN class=""&gt;i18n&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:null&lt;/SPAN&gt;,"&lt;SPAN class=""&gt;eventHierarchy&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;{"&lt;SPAN class=""&gt;hierarchy&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;20fd8163-4ca8-424b-a5a9-1e4018372abb&lt;/SPAN&gt;","&lt;SPAN class=""&gt;hierarchyDelimiter&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;.&lt;/SPAN&gt;"},"&lt;SPAN class=""&gt;message&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:null&lt;/SPAN&gt;,"&lt;SPAN class=""&gt;messageParams&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:null&lt;/SPAN&gt;,"&lt;SPAN class=""&gt;additionalDetails&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;{"&lt;SPAN class=""&gt;eventMetadata&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;{"&lt;SPAN class=""&gt;auditLogMetadata&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;{"&lt;SPAN class=""&gt;type&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;CLI&lt;/SPAN&gt;","&lt;SPAN class=""&gt;version&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;1.0.0&lt;/SPAN&gt;"}}},"&lt;SPAN class=""&gt;parentInstanceId&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;9dde297d-845e-40d0-aeb0-a11e141f95b5&lt;/SPAN&gt;","&lt;SPAN class=""&gt;network&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;{"&lt;SPAN class=""&gt;siteId&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"","&lt;SPAN class=""&gt;deviceId&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;10.7.140.2&lt;/SPAN&gt;"},"&lt;SPAN class=""&gt;isSimulated&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:false&lt;/SPAN&gt;,"&lt;SPAN class=""&gt;startTime&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:1729606845055&lt;/SPAN&gt;,"&lt;SPAN class=""&gt;dnacIP&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;10.5.0.200&lt;/SPAN&gt;","&lt;SPAN class=""&gt;tenantId&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt;"&lt;SPAN class=""&gt;SYS0&lt;/SPAN&gt;"}&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;host =&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;A class="" title="10.5.0.200" href="https://prd-p-miz4u.splunkcloud.com/en-US/app/search/search?earliest=%40d&amp;amp;latest=now&amp;amp;q=search%20index%3D%22main%22%20host%3D%2210.5.0.200%22&amp;amp;sid=1729632158.17439&amp;amp;display.page.search.mode=verbose&amp;amp;dispatch.sample_ratio=1&amp;amp;workload_pool=#" target="_blank" rel="noopener"&gt;10.5.0.200&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;sourcetype =&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;A class="" title="syslog" href="https://prd-p-miz4u.splunkcloud.com/en-US/app/search/search?earliest=%40d&amp;amp;latest=now&amp;amp;q=search%20index%3D%22main%22%20host%3D%2210.5.0.200%22&amp;amp;sid=1729632158.17439&amp;amp;display.page.search.mode=verbose&amp;amp;dispatch.sample_ratio=1&amp;amp;workload_pool=#" target="_blank" rel="noopener"&gt;syslog&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;how do I extract : seperated fields?&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Oct 2024 21:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702540#M238196</guid>
      <dc:creator>afeng</dc:creator>
      <dc:date>2024-10-22T21:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: extract fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702550#M238199</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273404"&gt;@afeng&lt;/a&gt;&amp;nbsp;You want to extract at for the already ingested/existing logs at Splunk indexer(search time)&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;for the new logs yet to be ingested to splunk (are you using any addons, TA's.. are you using UF and/or HF?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 01:25:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702550#M238199</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2024-10-23T01:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: extract fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702559#M238205</link>
      <description>&lt;P&gt;I want to extract the 'description' field. it can be for the new messages&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 03:50:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702559#M238205</guid>
      <dc:creator>afeng</dc:creator>
      <dc:date>2024-10-23T03:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: extract fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702561#M238206</link>
      <description>&lt;P&gt;extract the new messages is fine. tried 'Extract New Fields', not easy to work&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 05:12:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702561#M238206</guid>
      <dc:creator>afeng</dc:creator>
      <dc:date>2024-10-23T05:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: extract fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702662#M238235</link>
      <description>&lt;P&gt;(Note: When giving sample data, use the code box.) &amp;nbsp;Your log mixes plain text with structured JSON. &amp;nbsp;So, the first task is to extract the JSON piece, then extract from JSON using &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Spath" target="_blank" rel="noopener"&gt;spath&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "DNAC (?&amp;lt;json_msg&amp;gt;{.+})"
| spath input=json_msg&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;description from your sample data will contain this value&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;description&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Executing command terminal width 0 config t Failed to fetch the preview commands.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Here is an emulation of your sample data. &amp;nbsp;Play with it and compare with real data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw = "Oct 22 14:20:45 10.5.0.200 DNAC {\"version\":\"1.0.0\",\"instanceId\":\"20fd8163-4ca8-424b-a5a9-1e4018372abb\",\"eventId\":\"AUDIT_LOG_EVENT\",\"namespace\":\"AUDIT_LOG\",\"name\":\"AUDIT_LOG\",\"description\":\"Executing command terminal width 0\\nconfig t\\nFailed to fetch the preview commands.\\n\",\"type\":\"AUDIT_LOG\",\"category\":\"INFO\",\"domain\":\"Audit\",\"subDomain\":\"\",\"severity\":1,\"source\":\"NA\",\"timestamp\":1729606845043,\"details\":{\"requestPayloadDescriptor\":\"terminal width 0\\nconfig t\\nFailed to fetch the preview commands.\\n\",\"requestPayload\":\"\\n\"},\"ciscoDnaEventLink\":null,\"note\":null,\"tntId\":\"630db6e989269c11640abd49\",\"context\":null,\"userId\":\"system\",\"i18n\":null,\"eventHierarchy\":{\"hierarchy\":\"20fd8163-4ca8-424b-a5a9-1e4018372abb\",\"hierarchyDelimiter\":\".\"},\"message\":null,\"messageParams\":null,\"additionalDetails\":{\"eventMetadata\":{\"auditLogMetadata\":{\"type\":\"CLI\",\"version\":\"1.0.0\"}}},\"parentInstanceId\":\"9dde297d-845e-40d0-aeb0-a11e141f95b5\",\"network\":{\"siteId\":\"\",\"deviceId\":\"10.7.140.2\"},\"isSimulated\":false,\"startTime\":1729606845055,\"dnacIP\":\"10.5.0.200\",\"tenantId\":\"SYS0\"}"
``` data emulation above ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 05:58:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-fields/m-p/702662#M238235</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-10-24T05:58:59Z</dc:date>
    </item>
  </channel>
</rss>

