<?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: How to exclude JSON entries from the indexing? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-JSON-entries-from-the-indexing/m-p/328309#M60931</link>
    <description>&lt;P&gt;You basically need to setup routing of specific events (events that contain @level as INFO) to nullQueue (drop from being indexed). The reference configuration could be found here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.2/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;So, in your case (all setting are done in your central Splunk server)&lt;/P&gt;

&lt;P&gt;1) In props.conf, set the TRANSFORMS-null attribute:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YourSourceTypeHere]
TRANSFORMS-null= drop_info_jsons
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2) Create a corresponding stanza in transforms.conf. Set DEST_KEY to "queue" and FORMAT to "nullQueue":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[drop_info_jsons]
REGEX = \"\@level\"\:\s*\"INFO\"
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;3) Restart Splunk Enterprise.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Mar 2018 19:23:21 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2018-03-02T19:23:21Z</dc:date>
    <item>
      <title>How to exclude JSON entries from the indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-JSON-entries-from-the-indexing/m-p/328308#M60930</link>
      <description>&lt;P&gt;Hello dear splunketeers !&lt;/P&gt;

&lt;P&gt;I am seeking some advice.&lt;/P&gt;

&lt;P&gt;The splunk architecture I currently manage is fairly simple :&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;one central &lt;STRONG&gt;splunk server&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;a few hundreds of &lt;STRONG&gt;universal splunk forwarder&lt;/STRONG&gt; agents &lt;/LI&gt;
&lt;LI&gt;each agent is monitoring &lt;STRONG&gt;JSON&lt;/STRONG&gt; log files from our applications and sending them to our central splunk server&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Everything is working fine, but I am trying to &lt;STRONG&gt;reduce the amount of data being indexed&lt;/STRONG&gt; on our central splunk server&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;e.g&lt;/STRONG&gt; :&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;here's a log sample that is sent by the universal forwarder&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
  "@timestamp": "2018-03-02T17:15:14.756+00:00",
  "@level": "INFO",
  "@message": "foobar"
}
{
  "@timestamp": "2018-03-02T17:15:15.800+00:00",
  "@level": "ERROR",
  "@message": "damnit !"
}
{
  "@timestamp": "2018-03-02T17:15:16.136+00:00",
  "@level": "INFO",
  "@message": "foobar"
}
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;here's the final log that I would like to see indexed on the central server&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
  "@timestamp": "2018-03-02T17:15:15.800+00:00",
  "@level": "ERROR",
  "@message": "damnit !"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So basically, I would like to get rid of all the JSON entries which level is set to "INFO"&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Does anyone how to perform this ( simple ? ) filtering?&lt;/P&gt;

&lt;P&gt;Thanks beforehand for any answer&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 17:46:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-JSON-entries-from-the-indexing/m-p/328308#M60930</guid>
      <dc:creator>craymore</dc:creator>
      <dc:date>2018-03-02T17:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude JSON entries from the indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-JSON-entries-from-the-indexing/m-p/328309#M60931</link>
      <description>&lt;P&gt;You basically need to setup routing of specific events (events that contain @level as INFO) to nullQueue (drop from being indexed). The reference configuration could be found here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.2/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;So, in your case (all setting are done in your central Splunk server)&lt;/P&gt;

&lt;P&gt;1) In props.conf, set the TRANSFORMS-null attribute:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YourSourceTypeHere]
TRANSFORMS-null= drop_info_jsons
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2) Create a corresponding stanza in transforms.conf. Set DEST_KEY to "queue" and FORMAT to "nullQueue":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[drop_info_jsons]
REGEX = \"\@level\"\:\s*\"INFO\"
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;3) Restart Splunk Enterprise.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 19:23:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-JSON-entries-from-the-indexing/m-p/328309#M60931</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-03-02T19:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude JSON entries from the indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-JSON-entries-from-the-indexing/m-p/328310#M60932</link>
      <description>&lt;P&gt;I implemented the aformentionned settings in order to a have a redirect to the nullQueue for some entries and indeed it works as intended.&lt;/P&gt;

&lt;P&gt;Thank you for advice !&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 09:20:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-JSON-entries-from-the-indexing/m-p/328310#M60932</guid>
      <dc:creator>craymore</dc:creator>
      <dc:date>2018-03-05T09:20:03Z</dc:date>
    </item>
  </channel>
</rss>

