<?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 Extract fields from RFC5424 syslog with nested json field in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-RFC5424-syslog-with-nested-json-field/m-p/747567#M118776</link>
    <description>&lt;P&gt;Hello, I put this regex on SHC inline extraction :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"&amp;lt;(?&amp;lt;pri&amp;gt;\d+)&amp;gt;1\s(?&amp;lt;timestamp&amp;gt;\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?[+-]\d{2}:\d{2})\s(?&amp;lt;hostname&amp;gt;[^\s]+)\s(?&amp;lt;appname&amp;gt;[^\s]+)\s(?&amp;lt;procid&amp;gt;[^\s]+)\s(?&amp;lt;msgid&amp;gt;[^\s]+)\s(?&amp;lt;structured_data&amp;gt;\S+)\s(?&amp;lt;json_msg&amp;gt;\{.*\})"&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;however json_msg needs&lt;EM&gt; | spath input=json_msg&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Is it possible to auto extract fields contained in json_msg to avoid adding &lt;EM&gt;| spath input=json_msg&lt;/EM&gt; at search time?&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jun 2025 14:45:30 GMT</pubDate>
    <dc:creator>splunkreal</dc:creator>
    <dc:date>2025-06-05T14:45:30Z</dc:date>
    <item>
      <title>Extract fields from RFC5424 syslog with nested json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-RFC5424-syslog-with-nested-json-field/m-p/747567#M118776</link>
      <description>&lt;P&gt;Hello, I put this regex on SHC inline extraction :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"&amp;lt;(?&amp;lt;pri&amp;gt;\d+)&amp;gt;1\s(?&amp;lt;timestamp&amp;gt;\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?[+-]\d{2}:\d{2})\s(?&amp;lt;hostname&amp;gt;[^\s]+)\s(?&amp;lt;appname&amp;gt;[^\s]+)\s(?&amp;lt;procid&amp;gt;[^\s]+)\s(?&amp;lt;msgid&amp;gt;[^\s]+)\s(?&amp;lt;structured_data&amp;gt;\S+)\s(?&amp;lt;json_msg&amp;gt;\{.*\})"&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;however json_msg needs&lt;EM&gt; | spath input=json_msg&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Is it possible to auto extract fields contained in json_msg to avoid adding &lt;EM&gt;| spath input=json_msg&lt;/EM&gt; at search time?&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 14:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-RFC5424-syslog-with-nested-json-field/m-p/747567#M118776</guid>
      <dc:creator>splunkreal</dc:creator>
      <dc:date>2025-06-05T14:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from RFC5424 syslog with nested json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-RFC5424-syslog-with-nested-json-field/m-p/748187#M118897</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/171872"&gt;@splunkreal&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If you're using rex to extract the fields at search time, there's no way that Splunk will auto extract the fields that are part of your json_msg field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, you can write the regex and have the fields extracted at search time using the field extraction from Settings -&amp;gt; Fields -&amp;gt; Field Extraction and define it under the sourcetype. So that everytime you run index based search, the fields json_msg will be extracted automatically and then you can use | spath json_msg to extract the subsequent fields.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Alternatively, from the source if you are able to convert the whole string into JSON format, the nested json fields will be extracted automatically.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Tejas.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;If the above solution helps, an upvote is appreciated..!!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 06:43:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-RFC5424-syslog-with-nested-json-field/m-p/748187#M118897</guid>
      <dc:creator>tej57</dc:creator>
      <dc:date>2025-06-18T06:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from RFC5424 syslog with nested json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-RFC5424-syslog-with-nested-json-field/m-p/748200#M118904</link>
      <description>&lt;P&gt;Not at this time. Splunk can auto-extract values only if the whole _raw message consists of the structured data blob. There is an open idea on ideas.splunk.com -&amp;nbsp;&lt;A href="https://ideas.splunk.com/ideas/EID-I-208" target="_blank"&gt;https://ideas.splunk.com/ideas/EID-I-208&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It is marked as future prospect but of course voting on this issue might provide some additional push.&lt;/P&gt;&lt;P&gt;The alternative would be to cut the remainder of the event so that only the json part is left but this way you're losing some data.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 08:41:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-RFC5424-syslog-with-nested-json-field/m-p/748200#M118904</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-06-18T08:41:24Z</dc:date>
    </item>
  </channel>
</rss>

