<?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: Can Splunk do filtering based on the index name rather than source or sourcetype? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224613#M43961</link>
    <description>&lt;P&gt;It is not performing as expected. Here is what we are trying to accomplish. The log file is a csv and we need to filter out all the events / data that is under 1400 bytes which is found in field 31.&lt;/P&gt;

&lt;P&gt;Sample log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016/02/25 19:14:20,010401000240,TRAFFIC,start,1,2016/02/25 19:14:20,0.1.2.3,4.5.6.7,8.9.10.11,12.13.14.15,Outbound Services,,,dns,vsys1,TRUST,UNTRUST,ethernet1/18.80,ethernet1/17.1000,All Syslog Servers -Includes VZ,2016/02/25 19:14:20,133312,1,63869,53,60901,53,0x400000,udp,allow,96,96,0,1,2016/02/25 19:14:21,0,any,0,13810046794,0x0,255.255.0.0-255.255.255.255,US,0,1,0,n/a
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The current configuration is:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::///var/log/proxy/paloalto/palo.log]
TRANSFORMS-null = setnull,setnullindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = ^(?:[^,]*?,){31}(\d{1,3}|1[0-3]\d{2}|1400)
DEST_KEY = queue
FORMAT = nullQueue

[setnullindex]
SOURCE_KEY = _MetaData:Index
REGEX = plvpalo
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 29 Feb 2016 20:23:42 GMT</pubDate>
    <dc:creator>babcolee</dc:creator>
    <dc:date>2016-02-29T20:23:42Z</dc:date>
    <item>
      <title>Can Splunk do filtering based on the index name rather than source or sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224609#M43957</link>
      <description>&lt;P&gt;We have a condition where we need to filter out data based on the byte count in the log. We have collapsed the source and sourcetype names coming from different servers and we need to be specific based on the index name.&lt;/P&gt;

&lt;P&gt;Instead of:&lt;BR /&gt;
props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::///var/log/paloalto/palo.log]
TRANSFORMS-null = setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can we use for the props.conf configuration:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[index::plvpalo]
TRANSFORMS-null = setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::///var/log/paloalto/palo.log]
index = plvpalo
TRANSFORMS-null = setnull
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Feb 2016 16:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224609#M43957</guid>
      <dc:creator>babcolee</dc:creator>
      <dc:date>2016-02-29T16:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk do filtering based on the index name rather than source or sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224610#M43958</link>
      <description>&lt;P&gt;I would say No, you can filter logs based on Index name in the way you can use source/sourcetype/host to filter logs, but you can filter out data for a source/sourcetype/host based on the index name. Try something like this&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::///var/log/paloalto/palo.log]
TRANSFORMS-null = setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
SOURCE_KEY = _MetaData:Index
REGEX = plvpalo
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Feb 2016 16:48:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224610#M43958</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-29T16:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk do filtering based on the index name rather than source or sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224611#M43959</link>
      <description>&lt;P&gt;I am already using a REGEX statement in the transforms.conf file to filter out any less than 1400 bytes. Would the transforms.conf work as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
SOURCE_KEY = _MetaData:Index
REGEX = plvpalo
REGEX = ^(?:[^,]*?,){31}(\d{1,3}|1[0-3]\d{2}|1400),
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Feb 2016 17:46:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224611#M43959</guid>
      <dc:creator>babcolee</dc:creator>
      <dc:date>2016-02-29T17:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk do filtering based on the index name rather than source or sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224612#M43960</link>
      <description>&lt;P&gt;The above one will not work as the byte size was been check from &lt;CODE&gt;SOURCE_KEY=_raw&lt;/CODE&gt; (default) and index name will be checked from &lt;CODE&gt;SOURCE_KEY = _MetaData:Index&lt;/CODE&gt;. You can create two transforms.conf stanzas and call them both.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [source::///var/log/paloalto/palo.log]
 TRANSFORMS-null = setnull,setnullindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
..keep the current setting that you have...

 [setnullindex]
 SOURCE_KEY = _MetaData:Index
 REGEX = plvpalo
 DEST_KEY = queue
 FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Feb 2016 18:04:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224612#M43960</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-29T18:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk do filtering based on the index name rather than source or sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224613#M43961</link>
      <description>&lt;P&gt;It is not performing as expected. Here is what we are trying to accomplish. The log file is a csv and we need to filter out all the events / data that is under 1400 bytes which is found in field 31.&lt;/P&gt;

&lt;P&gt;Sample log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016/02/25 19:14:20,010401000240,TRAFFIC,start,1,2016/02/25 19:14:20,0.1.2.3,4.5.6.7,8.9.10.11,12.13.14.15,Outbound Services,,,dns,vsys1,TRUST,UNTRUST,ethernet1/18.80,ethernet1/17.1000,All Syslog Servers -Includes VZ,2016/02/25 19:14:20,133312,1,63869,53,60901,53,0x400000,udp,allow,96,96,0,1,2016/02/25 19:14:21,0,any,0,13810046794,0x0,255.255.0.0-255.255.255.255,US,0,1,0,n/a
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The current configuration is:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::///var/log/proxy/paloalto/palo.log]
TRANSFORMS-null = setnull,setnullindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = ^(?:[^,]*?,){31}(\d{1,3}|1[0-3]\d{2}|1400)
DEST_KEY = queue
FORMAT = nullQueue

[setnullindex]
SOURCE_KEY = _MetaData:Index
REGEX = plvpalo
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Feb 2016 20:23:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-do-filtering-based-on-the-index-name-rather-than/m-p/224613#M43961</guid>
      <dc:creator>babcolee</dc:creator>
      <dc:date>2016-02-29T20:23:42Z</dc:date>
    </item>
  </channel>
</rss>

