<?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: Filter Client IP from IIS 7.5 Logs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267753#M51322</link>
    <description>&lt;P&gt;Thanks so much.  So if I wanted to drop a specific IP addresses from field "c_ip", I would specify this in transforms.conf?  How could I specific multiple IP addresses not on the same subnet?&lt;/P&gt;

&lt;P&gt;[filter_ip]&lt;BR /&gt;
REGEX =  c_ip=192.168.1.254 &lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:17:34 GMT</pubDate>
    <dc:creator>rmsit</dc:creator>
    <dc:date>2020-09-29T09:17:34Z</dc:date>
    <item>
      <title>Filter Client IP from IIS 7.5 Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267751#M51320</link>
      <description>&lt;P&gt;Hello, all. &lt;/P&gt;

&lt;P&gt;I would like to filter out a specific client IP address from my IIS logs.  What would be the best approach, have the UF or indexer perform the filtering and how do I go about doing that?  Configuration for indexer below.  Thanks!  - James&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Props.conf&lt;/STRONG&gt;&lt;BR /&gt;
[iis]&lt;BR /&gt;
pulldown_type = true &lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 32&lt;BR /&gt;
SHOULD_LINEMERGE = False&lt;BR /&gt;
CHECK_FOR_HEADER = False&lt;BR /&gt;
TZ = GMT&lt;BR /&gt;
REPORT-iisw3cfields = iisw3cfields&lt;BR /&gt;
TRANSFORMS-removecomments = removecomments&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;H1&gt;IIS W3C Log field extractions (Identical in IIS 6 and 7)&lt;/H1&gt;

&lt;H1&gt;These assume that you have enabled all available fields to be logged&lt;/H1&gt;

&lt;P&gt;[iisw3cfields]&lt;BR /&gt;
DELIMS = " "&lt;BR /&gt;
FIELDS = date,time,s_sitename,s_computername,s_ip,cs_method,cs_uri_stem,cs_uri_query,s_port,cs_username,c_ip,cs_version,cs(User_Agent),cs(Cookie),cs(Referer),cs_host,sc_status,sc_substatus,sc_win32_status,sc_bytes,cs_bytes,time_taken&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:14:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267751#M51320</guid>
      <dc:creator>rmsit</dc:creator>
      <dc:date>2020-09-29T09:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Client IP from IIS 7.5 Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267752#M51321</link>
      <description>&lt;P&gt;It is generally best to filter at the indexer, because you want to keep the forwarder as lightweight as possible (since it is usually running on a production server). But you can't filter on a universal forwarder anyway - it doesn't do parsing. All of the filtering settings must go on the indexer, as filtering happens during parsing time.&lt;/P&gt;

&lt;P&gt;Add to props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRANSFORMS-filter1 = filter_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Add to transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[filter_ip]
REGEX = 192\.168\.1\.172
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could make the regular expression more specific; in my example, it is looking for an IP address that appears anywhere in the event.&lt;/P&gt;

&lt;P&gt;BTW, I notice that you have &lt;CODE&gt;TRANSFORMS-removecomments = removecomments&lt;/CODE&gt; in your props.conf, but no corresponding stanza in transforms.conf...&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2016 18:07:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267752#M51321</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-04-01T18:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Client IP from IIS 7.5 Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267753#M51322</link>
      <description>&lt;P&gt;Thanks so much.  So if I wanted to drop a specific IP addresses from field "c_ip", I would specify this in transforms.conf?  How could I specific multiple IP addresses not on the same subnet?&lt;/P&gt;

&lt;P&gt;[filter_ip]&lt;BR /&gt;
REGEX =  c_ip=192.168.1.254 &lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:17:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267753#M51322</guid>
      <dc:creator>rmsit</dc:creator>
      <dc:date>2020-09-29T09:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Client IP from IIS 7.5 Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267754#M51323</link>
      <description>&lt;P&gt;I may have answered by own question.  I will see if this works.  Thanks again.&lt;/P&gt;

&lt;P&gt;REGEX = c_ip=("192.80.134.59|192.67.213.194|192.67.213.166")&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2016 20:04:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267754#M51323</guid>
      <dc:creator>rmsit</dc:creator>
      <dc:date>2016-04-01T20:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Client IP from IIS 7.5 Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267755#M51324</link>
      <description>&lt;P&gt;You should &lt;EM&gt;not&lt;/EM&gt; include the field name &lt;CODE&gt;c_ip&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;At this point in the parsing process, Splunkcan't use the field names. So it should be&lt;/P&gt;

&lt;P&gt;REGEX = 192.80.134.59|192.67.213.194|192.67.213.166&lt;/P&gt;

&lt;P&gt;Or maybe there is a way... but it won't be using the regex that you showed. I'll look it up...&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2016 20:37:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267755#M51324</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-04-01T20:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Client IP from IIS 7.5 Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267756#M51325</link>
      <description>&lt;P&gt;@lguinn Did you by chance have a chance to look this up and determine how to filter by field names?&lt;/P&gt;

&lt;P&gt;I am trying to do the same, but not having any luck.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 16:48:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Client-IP-from-IIS-7-5-Logs/m-p/267756#M51325</guid>
      <dc:creator>montgomeryam</dc:creator>
      <dc:date>2016-09-30T16:48:36Z</dc:date>
    </item>
  </channel>
</rss>

