<?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 ignore a section of a log in a query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158379#M44618</link>
    <description>&lt;P&gt;I wont have the Start new Thread and Thread exiting messages on all day's , it occurs only on few days and for those days I want to ignore the "timing" values that comes between these 2 lines.  On some other day's logs there will only be "timing" messages without the "Start new Thread" and "exiting" lines and I need to use these data as well&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jul 2014 21:01:08 GMT</pubDate>
    <dc:creator>shah_nishay</dc:creator>
    <dc:date>2014-07-25T21:01:08Z</dc:date>
    <item>
      <title>How to ignore a section of a log in a query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158375#M44614</link>
      <description>&lt;P&gt;I am parsing a file and would like to skip a section of the same&lt;BR /&gt;
Below is the log :&lt;/P&gt;

&lt;P&gt;| INFO | 57023 | Starting new thread FileReplayThread1, java tid: 38 system tid: 57023&lt;BR /&gt;
| INFO | 57024 | Starting new thread FileReplayThread2, java tid: 38 system tid: 57024&lt;BR /&gt;
| INFO | 57023 | timing=23&lt;BR /&gt;
| INFO | 57024 | timing=24&lt;BR /&gt;
| INFO | 57023 | timing=28&lt;BR /&gt;
| INFO | 57024 | timing=28&lt;BR /&gt;
| WARN | 57023 | Thread FileReplayThread1 exiting&lt;BR /&gt;
| WARN | 57024 | Thread FileReplayThread2 exiting&lt;BR /&gt;
| INFO | 57021 | timing=2301&lt;BR /&gt;
| INFO | 57028 | Starting new thread FileReplayThread1, java tid: 38 system tid: 57023&lt;BR /&gt;
| INFO | 57029 | Starting new thread FileReplayThread2, java tid: 38 system tid: 57024&lt;BR /&gt;
| INFO | 57028 | timing=13&lt;BR /&gt;
| INFO | 57028 | timing=84&lt;BR /&gt;
| INFO | 57029 | timing=68&lt;BR /&gt;
| INFO | 57029 | timing=26&lt;BR /&gt;
| WARN | 57028 | Thread FileReplayThread1 exiting&lt;BR /&gt;
| WARN | 57029 | Thread FileReplayThread2 exiting&lt;BR /&gt;
| INFO | 57010 | timing=52&lt;BR /&gt;
| INFO | 57011 | timing=53&lt;BR /&gt;
| INFO | 57010 | timing=96&lt;/P&gt;

&lt;P&gt;I am interested in processing "timing" value from this log but do not need any timing that comes between "Starting new thread FileReplayThread1" and "Thread FileReplayThread2 exiting"&lt;BR /&gt;
For the above mentioned example , I am only interested in timing=2301,52,53 and 96&lt;/P&gt;

&lt;P&gt;How can I add this in the query ?&lt;/P&gt;

&lt;P&gt;I donot want to remove this all together from indexer as another report on the same server also uses these timings and will need all of these values.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 16:56:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158375#M44614</guid>
      <dc:creator>shah_nishay</dc:creator>
      <dc:date>2014-07-25T16:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore a section of a log in a query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158376#M44615</link>
      <description>&lt;P&gt;Assuming each line is an event and the field extraction is not done (if fields are already extracted, remove the rex portion from the search and use the corresponding field names), try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex "\|\s*(?&amp;lt;LogType&amp;gt;.*)\s*\|\s*(?&amp;lt;ThreadId&amp;gt;.*)\s*\|\s*(?&amp;lt;Message&amp;gt;.*)" | transaction ThreadId startswith="Starting new thread" endswith=" exiting" keeporphans=t | where linecount=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Jul 2014 17:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158376#M44615</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-25T17:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore a section of a log in a query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158377#M44616</link>
      <description>&lt;P&gt;Assuming your pairs of starting/exiting are complete within the time range you can do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  base search yielding the events you posted
| streamstats count(eval(searchmatch("Starting new thread FileReplayThread1"))) as startCount
              count(eval(searchmatch("Thread FileReplayThread2 exiting"))) as endCount
| where startCount==endCount AND isnotnull(timing)
| further processing goes here
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This keeps a running count of both messages and only keeps events with a timing field if the running counts are equal, ie each start has seen an end or vice versa.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 17:38:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158377#M44616</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-25T17:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore a section of a log in a query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158378#M44617</link>
      <description>&lt;P&gt;this doesnt work, it still pulls up all "timings" events&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 20:59:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158378#M44617</guid>
      <dc:creator>shah_nishay</dc:creator>
      <dc:date>2014-07-25T20:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore a section of a log in a query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158379#M44618</link>
      <description>&lt;P&gt;I wont have the Start new Thread and Thread exiting messages on all day's , it occurs only on few days and for those days I want to ignore the "timing" values that comes between these 2 lines.  On some other day's logs there will only be "timing" messages without the "Start new Thread" and "exiting" lines and I need to use these data as well&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 21:01:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158379#M44618</guid>
      <dc:creator>shah_nishay</dc:creator>
      <dc:date>2014-07-25T21:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore a section of a log in a query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158380#M44619</link>
      <description>&lt;P&gt;Have you tried this??&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 21:12:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158380#M44619</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-25T21:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore a section of a log in a query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158381#M44620</link>
      <description>&lt;P&gt;No start and exit messages won't be a problem. A start without an exit or an exit without a start might though.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 21:24:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-a-section-of-a-log-in-a-query/m-p/158381#M44620</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-25T21:24:28Z</dc:date>
    </item>
  </channel>
</rss>

