<?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 filter IIS logs with regular expression? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541579#M153339</link>
    <description>&lt;P&gt;When you say "filter out" do you mean you wish to use a regular expression to extract the sc-status and time-taken fields?&lt;/P&gt;&lt;P&gt;If so, try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;... | rex "(?:\S+\s){16}(?&amp;lt;status&amp;gt;\d+)\s(?:\S+\s){4}(?&amp;lt;time_taken&amp;gt;\d+)"&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 26 Feb 2021 20:32:39 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-02-26T20:32:39Z</dc:date>
    <item>
      <title>How to filter IIS logs with regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541565#M153333</link>
      <description>&lt;P&gt;i do like to filter out Status code and Time Taken and other as fields&lt;/P&gt;&lt;P&gt;#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken&lt;/P&gt;&lt;P&gt;2021-02-20 06:56:41 W3SVC1 XXX 100.x.x.x HEAD / - 9004 - 10.x.x.x HTTP/1.1 - - - &lt;A href="http://www.google.com:80" target="_blank" rel="noopener"&gt;www.google.com:80&lt;/A&gt; 403 14 0 181 70 46&lt;/P&gt;&lt;P&gt;here status code is 403 and time-taken 46&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 18:12:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541565#M153333</guid>
      <dc:creator>sachdeva_2007</dc:creator>
      <dc:date>2021-02-26T18:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter IIS logs with regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541579#M153339</link>
      <description>&lt;P&gt;When you say "filter out" do you mean you wish to use a regular expression to extract the sc-status and time-taken fields?&lt;/P&gt;&lt;P&gt;If so, try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;... | rex "(?:\S+\s){16}(?&amp;lt;status&amp;gt;\d+)\s(?:\S+\s){4}(?&amp;lt;time_taken&amp;gt;\d+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 Feb 2021 20:32:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541579#M153339</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-02-26T20:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter IIS logs with regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541727#M153381</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Got the header of fields of the logs as follow but what would the query to pull status code and order by Client wise.&lt;/P&gt;&lt;P&gt;also in the interesting fields status and time-taken not showing.&lt;/P&gt;&lt;P&gt;is this the site of "&lt;A href="https://www.debuggex.com/cheatsheet/regex/pcre" target="_blank" rel="noopener"&gt;https://www.debuggex.com/cheatsheet/regex/pcre&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 3/1/21&lt;BR /&gt;3:00:01.000 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&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;BR /&gt;host = XXXXX&lt;BR /&gt;source = E:\acbsapi\Logs\wlUat\IIS\Site_wlUat\W3SVC1\u_ex210301.log&lt;BR /&gt;sourcetype = XXX&lt;/P&gt;&lt;P&gt;2 3/1/21&lt;BR /&gt;3:00:01.000 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#Date: 2021-03-01 00:00:01&lt;BR /&gt;host = XXX&lt;BR /&gt;source = E:\acbsapi\Logs\wlUat\IIS\Site_wlUat\W3SVC1\u_ex210301.log&lt;BR /&gt;sourcetype =XXX&lt;/P&gt;&lt;P&gt;3 3/1/21&lt;BR /&gt;2:00:03.000 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&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;BR /&gt;host = XXX&lt;BR /&gt;source = E:\acbsapi\Logs\wlUat\IIS\Site_wlUat\W3SVC1\u_ex210301.log&lt;BR /&gt;sourcetype = XXX&lt;/P&gt;&lt;P&gt;4 3/1/21&lt;BR /&gt;2:00:03.000 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#Date: 2021-03-01 00:00:03&lt;BR /&gt;host = XXX&lt;BR /&gt;source = E:\acbsapi\Logs\wlUat\IIS\Site_wlUat\W3SVC1\u_ex210301.log&lt;BR /&gt;sourcetype = XXX&lt;/P&gt;&lt;P&gt;5 2/28/21&lt;BR /&gt;10:49:06.000 PM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2021-02-28 20:49:06 W3SVC1 XXX 100.72.153.196 GET /Portfolio/02/Loan/920029607/LoanTransaction absolutePosition=0&amp;amp;startDate=2021-02-26T00:00:00 9004 sa_esb_acbs_qa 100.72.210.0 HTTP/1.1 Apache-HttpClient/4.0.1+(java+1.5) - - acbs-api-uat-fhb.fisglobal.com 200 0 0 453 2159 143&lt;BR /&gt;host = XXX&lt;BR /&gt;source = E:\acbsapi\Logs\wlUat\IIS\Site_wlUat\W3SVC1\u_ex210228.log&lt;BR /&gt;sourcetype = XXX&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 10:11:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541727#M153381</guid>
      <dc:creator>sachdeva_2007</dc:creator>
      <dc:date>2021-03-01T10:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter IIS logs with regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541751#M153390</link>
      <description>&lt;P&gt;Saw the interesting fields with Status and time_taken. i was looking for query Client wise Hits and Average response time(time_taken)&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 13:50:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541751#M153390</guid>
      <dc:creator>sachdeva_2007</dc:creator>
      <dc:date>2021-03-01T13:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter IIS logs with regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541804#M153422</link>
      <description>&lt;P&gt;What have you tried so far?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 15:49:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541804#M153422</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-01T15:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter IIS logs with regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541815#M153429</link>
      <description>&lt;P&gt;use these fields extract&lt;/P&gt;&lt;P&gt;index=xx_api | rex "^(?P&amp;lt;Date&amp;gt;[^ ]+)(?:[^\-\n]*\-){5}\s+(?P&amp;lt;Host_Name&amp;gt;[^ ]+)\s+(?P&amp;lt;Status&amp;gt;\d+)\s+(\d+\s+)+(?P&amp;lt;Time_Taken&amp;gt;.+)" | search Status=200&lt;/P&gt;&lt;P&gt;how can pull the report with&lt;/P&gt;&lt;P&gt;-Total Hits,&amp;nbsp;&lt;/P&gt;&lt;P&gt;-avgerage(time-taken)&lt;/P&gt;&lt;DIV&gt;order by Client Wise&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Mar 2021 16:41:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/541815#M153429</guid>
      <dc:creator>sachdeva_2007</dc:creator>
      <dc:date>2021-03-01T16:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter IIS logs with regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/542175#M153575</link>
      <description>&lt;P&gt;Used below command and got the result but when i run second command not getting any result can you please suggest on this&lt;/P&gt;&lt;P&gt;* index=xxx sc_status=201&lt;/P&gt;&lt;P&gt;*index=xxx sc_status=201 AND sc_status=200&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any help highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 14:35:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/542175#M153575</guid>
      <dc:creator>sachdeva_2007</dc:creator>
      <dc:date>2021-03-03T14:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter IIS logs with regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/542188#M153579</link>
      <description>&lt;P&gt;The second query fails because it is not possible for the sc_status field to be both 200 and 201 at the same time.&amp;nbsp; Perhaps you want&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;index=xxx (sc_status=201 OR sc_status=200)&lt;/FONT&gt;?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 15:35:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/542188#M153579</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-03T15:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter IIS logs with regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/542189#M153580</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=xx_api 
| rex "^(?P&amp;lt;Date&amp;gt;[^ ]+)(?:[^\-\n]*\-){5}\s+(?P&amp;lt;Host_Name&amp;gt;[^ ]+)\s+(?P&amp;lt;Status&amp;gt;\d+)\s+(\d+\s+)+(?P&amp;lt;Time_Taken&amp;gt;.+)" 
| search Status=200
| stats count as "Total Hits", avg(Time_Taken) as Avg_Time_Taken by Host_Name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 15:40:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-IIS-logs-with-regular-expression/m-p/542189#M153580</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-03T15:40:11Z</dc:date>
    </item>
  </channel>
</rss>

