<?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: Indexed Extraction - all non-json events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-all-log-events-excluding-JSON-messages/m-p/515484#M87294</link>
    <description>&lt;P&gt;If you can produce a regular expression that defines a JSON event then you can use a transform to filter them out.&lt;/P&gt;&lt;P&gt;Put this in a tranforms.conf file&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[indexdata]
REGEX = .
DEST_KEY = queue
FORMAT = indexQueue

[filterjson]
REGEX = &amp;lt;your regex that detects JSON messages&amp;gt;
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;Then add this to the corresponding props.conf file:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mysourcetype]
TRANSFORMS-nojson = indexdata, filterjson&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 21 Aug 2020 15:01:05 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-08-21T15:01:05Z</dc:date>
    <item>
      <title>How to extract all log events excluding JSON messages?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-all-log-events-excluding-JSON-messages/m-p/515349#M87280</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to extract all the log events (normal lines) except JSON messages. There should be an easy way for this. Any hints, please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My log file is a mix something like below&lt;/P&gt;
&lt;P&gt;----------&lt;/P&gt;
&lt;P&gt;normal line&lt;/P&gt;
&lt;P&gt;normal line&lt;/P&gt;
&lt;P&gt;json events {&lt;/P&gt;
&lt;P&gt;{json messages}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;normal line&lt;/P&gt;
&lt;P&gt;etc&lt;/P&gt;
&lt;P&gt;etc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Naresh&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 21:58:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-all-log-events-excluding-JSON-messages/m-p/515349#M87280</guid>
      <dc:creator>nareshinsvu</dc:creator>
      <dc:date>2020-08-21T21:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Indexed Extraction - all non-json events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-all-log-events-excluding-JSON-messages/m-p/515484#M87294</link>
      <description>&lt;P&gt;If you can produce a regular expression that defines a JSON event then you can use a transform to filter them out.&lt;/P&gt;&lt;P&gt;Put this in a tranforms.conf file&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[indexdata]
REGEX = .
DEST_KEY = queue
FORMAT = indexQueue

[filterjson]
REGEX = &amp;lt;your regex that detects JSON messages&amp;gt;
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;Then add this to the corresponding props.conf file:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mysourcetype]
TRANSFORMS-nojson = indexdata, filterjson&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 21 Aug 2020 15:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-all-log-events-excluding-JSON-messages/m-p/515484#M87294</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-21T15:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Indexed Extraction - all non-json events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-all-log-events-excluding-JSON-messages/m-p/515677#M87314</link>
      <description>&lt;P data-unlink="true"&gt;Hi @&lt;SPAN class="UserName lia-user-name lia-user-rank-SplunkTrust lia-component-message-view-widget-author-username"&gt;&lt;SPAN class="login-bold"&gt;richgalloway&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling with regex actually.&amp;nbsp; My regex is only capturing partial json message (until the first "}")&lt;/P&gt;&lt;P&gt;I am trying to search all lines between "line starting with {" and "line starting with }". But ^ is not picking my search&lt;/P&gt;&lt;P&gt;So, I am stuck with this regex currently&amp;nbsp;&amp;nbsp; --&amp;nbsp;&amp;nbsp;&amp;nbsp; \{[\s\S]*?\}&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {},&lt;/P&gt;&lt;P&gt;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;}.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 03:25:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-all-log-events-excluding-JSON-messages/m-p/515677#M87314</guid>
      <dc:creator>nareshinsvu</dc:creator>
      <dc:date>2020-08-24T03:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Indexed Extraction - all non-json events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-all-log-events-excluding-JSON-messages/m-p/515720#M87323</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/156769"&gt;@nareshinsvu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regular expressions require a fairly strict definition. You haven't presented anything here.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 08:36:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-all-log-events-excluding-JSON-messages/m-p/515720#M87323</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-24T08:36:34Z</dc:date>
    </item>
  </channel>
</rss>

