<?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: Ignore unlike rows in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Ignore-unlike-rows/m-p/313540#M175398</link>
    <description>&lt;P&gt;Give this a try (to include on the rows which ends with an asterisk)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ti_is_st" sourcetype="xfer_log" | regex _raw="^.+\*$" | rex field=_raw "^(\S+\s+){8}\/(([^\s\/]+\/)+)(?&amp;lt;fileName&amp;gt;.+)(\s+\S+){8}$" |rex field=File_Status "(?&amp;lt;File_Status&amp;gt;(i|j|k|o|p|q))\s"|search "$field2$" "$field3$" | streamstats count as Row | table Row _time ip_address Service_Account fileName File_Size File_Status |replace o with "Download Successful" i with "Upload Successful" j with "Upload Errored" k with "Upload Aborted" p with "Download Errored" q with "Download Aborted" in File_Status
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 21 Feb 2017 19:38:05 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-02-21T19:38:05Z</dc:date>
    <item>
      <title>Ignore unlike rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ignore-unlike-rows/m-p/313539#M175397</link>
      <description>&lt;P&gt;I have a log that a software package provides which creates a standard record for each event.  &lt;/P&gt;

&lt;P&gt;The standard format is:&lt;/P&gt;

&lt;P&gt;Wed Oct 26 10:41:14 2016 0 10.40.112.27 437434 /dirlevel1/dirlevel2/dirlevel3/dirlevel4/chr26104109.txt b s o r aaa_aaaaaaa ssh 0 *&lt;/P&gt;

&lt;P&gt;We also have customer scripts that write to this log in a similar, but different format.  These entries are few and would like to ignore these records if possible.  The records that I would like to keep and report on always ends in an *.  All other records can be ignored.  Is it possible to ignore the record in the query statement or at at best, do a different query based on the last character o the record?&lt;/P&gt;

&lt;P&gt;Query is:&lt;/P&gt;

&lt;P&gt;index="ti_is_st"    sourcetype="xfer_log" | rex    field=_raw    "^(\S+\s+){8}\/(([^\s\/]+\/)+)(?&amp;lt;fileName&amp;gt;.+)(\s+\S+){8}$"    |rex field=File_Status    "(?&amp;lt;File_Status&amp;gt;(i|j|k|o|p|q))\s"|search    "&lt;EM&gt;$field2$&lt;/EM&gt;" "&lt;EM&gt;$field3$&lt;/EM&gt;" |    streamstats count as Row | table Row    _time ip_address Service_Account fileName File_Size File_Status     |replace o with "Download Successful"    i with "Upload Successful" j with    "Upload Errored" k with "Upload    Aborted"  p with "Download Errored" q    with "Download Aborted" in    File_Status &lt;/P&gt;

&lt;P&gt;Thanks, &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:57:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ignore-unlike-rows/m-p/313539#M175397</guid>
      <dc:creator>Mkaz</dc:creator>
      <dc:date>2020-09-29T12:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore unlike rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ignore-unlike-rows/m-p/313540#M175398</link>
      <description>&lt;P&gt;Give this a try (to include on the rows which ends with an asterisk)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ti_is_st" sourcetype="xfer_log" | regex _raw="^.+\*$" | rex field=_raw "^(\S+\s+){8}\/(([^\s\/]+\/)+)(?&amp;lt;fileName&amp;gt;.+)(\s+\S+){8}$" |rex field=File_Status "(?&amp;lt;File_Status&amp;gt;(i|j|k|o|p|q))\s"|search "$field2$" "$field3$" | streamstats count as Row | table Row _time ip_address Service_Account fileName File_Size File_Status |replace o with "Download Successful" i with "Upload Successful" j with "Upload Errored" k with "Upload Aborted" p with "Download Errored" q with "Download Aborted" in File_Status
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2017 19:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ignore-unlike-rows/m-p/313540#M175398</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-21T19:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore unlike rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ignore-unlike-rows/m-p/313541#M175399</link>
      <description>&lt;P&gt;Can you  see if following filter in the base search of your query helps?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"* \*"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2017 19:40:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ignore-unlike-rows/m-p/313541#M175399</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-02-21T19:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore unlike rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ignore-unlike-rows/m-p/313542#M175400</link>
      <description>&lt;P&gt;Works!  Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 19:52:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ignore-unlike-rows/m-p/313542#M175400</guid>
      <dc:creator>Mkaz</dc:creator>
      <dc:date>2017-02-21T19:52:58Z</dc:date>
    </item>
  </channel>
</rss>

