<?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 count loglines without corresponding second loglines? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324938#M159912</link>
    <description>&lt;P&gt;Before I forget to mention, I have to process at least 2.000.000 objects a day. So I will have 2M "start processing" and I have to find how many of those do not have an "end processing" in de logfile.&lt;/P&gt;

&lt;P&gt;I Have 1 logfile.&lt;BR /&gt;
when starting processing the object I write a log entry  "2017-04-04 13:00:59 : ID=14; Start processing&lt;BR /&gt;
When complete work on the object I write a log entry "2017-04-04 13:01:00 ; ID=14: End processing.&lt;/P&gt;

&lt;P&gt;If something failes, the "end processing" line will not be generated. &lt;/P&gt;

&lt;P&gt;File might look like:&lt;BR /&gt;
2017-04-04 13:00:59 : ID=14; Start processing&lt;BR /&gt;
2017-04-04 13:00:59 : ID=15; Start processing&lt;BR /&gt;
2017-04-04 13:01:00 ; ID=14: End processing&lt;BR /&gt;
2017-04-04 13:01:15 : ID=16; Start processing&lt;BR /&gt;
2017-04-04 13:01:20 ; ID=16: End processing&lt;/P&gt;

&lt;P&gt;processing ID 15 failed, so not line is being generated. That is what I have to find with SPLUNK.&lt;BR /&gt;
Ofcourse, I will generated an error in the logfile but I have to prove that all start processing have an end processing. It is functional requirement. &lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2017 13:31:17 GMT</pubDate>
    <dc:creator>avanaschen</dc:creator>
    <dc:date>2017-07-25T13:31:17Z</dc:date>
    <item>
      <title>how to count loglines without corresponding second loglines?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324936#M159910</link>
      <description>&lt;P&gt;I generate logline when starting processing 1 object and another logline when ready. &lt;BR /&gt;
How to find logline1 without a logline2 with SPLUNK? &lt;/P&gt;

&lt;P&gt;I have to generate a list of objects, for which I have a logline when starting processing the object, but for which I do not have a logline generated after processing the object.&lt;/P&gt;

&lt;P&gt;Can this be done with SPLUNK and how much performance will this cost?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Albert&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 12:43:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324936#M159910</guid>
      <dc:creator>avanaschen</dc:creator>
      <dc:date>2017-07-25T12:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to count loglines without corresponding second loglines?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324937#M159911</link>
      <description>&lt;P&gt;Can you share some sample events?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:02:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324937#M159911</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-07-25T13:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to count loglines without corresponding second loglines?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324938#M159912</link>
      <description>&lt;P&gt;Before I forget to mention, I have to process at least 2.000.000 objects a day. So I will have 2M "start processing" and I have to find how many of those do not have an "end processing" in de logfile.&lt;/P&gt;

&lt;P&gt;I Have 1 logfile.&lt;BR /&gt;
when starting processing the object I write a log entry  "2017-04-04 13:00:59 : ID=14; Start processing&lt;BR /&gt;
When complete work on the object I write a log entry "2017-04-04 13:01:00 ; ID=14: End processing.&lt;/P&gt;

&lt;P&gt;If something failes, the "end processing" line will not be generated. &lt;/P&gt;

&lt;P&gt;File might look like:&lt;BR /&gt;
2017-04-04 13:00:59 : ID=14; Start processing&lt;BR /&gt;
2017-04-04 13:00:59 : ID=15; Start processing&lt;BR /&gt;
2017-04-04 13:01:00 ; ID=14: End processing&lt;BR /&gt;
2017-04-04 13:01:15 : ID=16; Start processing&lt;BR /&gt;
2017-04-04 13:01:20 ; ID=16: End processing&lt;/P&gt;

&lt;P&gt;processing ID 15 failed, so not line is being generated. That is what I have to find with SPLUNK.&lt;BR /&gt;
Ofcourse, I will generated an error in the logfile but I have to prove that all start processing have an end processing. It is functional requirement. &lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:31:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324938#M159912</guid>
      <dc:creator>avanaschen</dc:creator>
      <dc:date>2017-07-25T13:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to count loglines without corresponding second loglines?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324939#M159913</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Base Search Here
| streamstats count(eval(searchmatch("StringThatMatchesOnlyYourStartEventHereInSPL"))) AS sessionID
| eventstats count(eval(searchmatch("StringThatMatchesOnlyYourStopEventHereInSPL"))) AS numStopEvents
| search numStopEvents!=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This shows sequences of events that have either 0 or more than 1 Stop Events.&lt;BR /&gt;
You can replace &lt;CODE&gt;searchmatch&lt;/CODE&gt; calls with another function that might be easier for you such as &lt;CODE&gt;match&lt;/CODE&gt; (if you are good with &lt;CODE&gt;RegEx&lt;/CODE&gt;) or &lt;CODE&gt;like&lt;/CODE&gt; (if you are good with &lt;CODE&gt;SQL&lt;/CODE&gt;).&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 15:15:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324939#M159913</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-25T15:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to count loglines without corresponding second loglines?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324940#M159914</link>
      <description>&lt;P&gt;Try this ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo "ID=*" "processing" ("Start" OR "End") 
| rex "ID=(?&amp;lt;IDNo&amp;gt;\d+)\s+(?&amp;lt;TypeRec&amp;gt;Start|End) processing"
| stats min(_time) as _time values(TypeRec) as TypeRec by IDNo
| where mvcount(TypeRec)&amp;lt;2
| where TypeRec="Start"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Jul 2017 21:15:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-loglines-without-corresponding-second-loglines/m-p/324940#M159914</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-07-25T21:15:55Z</dc:date>
    </item>
  </channel>
</rss>

