<?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 How to get events based on a repeated log in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-events-based-on-a-repeated-log/m-p/452754#M78424</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a trace of events that we're logging as a JSON, correlated by an &lt;STRONG&gt;id&lt;/STRONG&gt; field An example:&lt;/P&gt;

&lt;P&gt;Event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "log": "{
        data of the current request
    }",
    "level": "INFO",
    "message": "message that it's repeated",
    "id": "an-uuid"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For the same ID, something like this can happen:&lt;/P&gt;

&lt;P&gt;Log 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "log": "{
        data of the current request
    }",
    "level": "INFO",
    "message": "message that it's repeated",
    "id": "an-uuid"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Log 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "log": "{
        data of the current request
    }",
    "level": "INFO",
    "message": "message that it's repeated",
    "id": "an-uuid"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Log 3:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "log": "{
        data of the current request
    }",
    "level": "INFO",
    "message": "message that it's repeated",
    "id": "an-uuid"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Log 4:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "log": "{
        data of the current request
    }",
    "level": "INFO",
    "message": "another message",
    "id": "another-uuid"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to get those events that got the message field with the text "message that it's repeated" three times in a row. The timing is spaced by roughly 20 seconds between each log that contains that message.The result I'm expecting is only getting their IDs. Nothing else&lt;/P&gt;

&lt;P&gt;That scenario represents a service call that we're retrying, but it's not happening in all the scenarios. I need to retrieve &lt;STRONG&gt;the id&lt;/STRONG&gt; of those events.&lt;/P&gt;

&lt;P&gt;I'm able to match the events that contains the message, but I didn't figure it out how to filter that dataset and I didn't find anything that help me with this so far.&lt;/P&gt;

&lt;P&gt;Could you shed some light on this?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 16 Aug 2019 19:50:57 GMT</pubDate>
    <dc:creator>alejandrom_e</dc:creator>
    <dc:date>2019-08-16T19:50:57Z</dc:date>
    <item>
      <title>How to get events based on a repeated log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-events-based-on-a-repeated-log/m-p/452754#M78424</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a trace of events that we're logging as a JSON, correlated by an &lt;STRONG&gt;id&lt;/STRONG&gt; field An example:&lt;/P&gt;

&lt;P&gt;Event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "log": "{
        data of the current request
    }",
    "level": "INFO",
    "message": "message that it's repeated",
    "id": "an-uuid"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For the same ID, something like this can happen:&lt;/P&gt;

&lt;P&gt;Log 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "log": "{
        data of the current request
    }",
    "level": "INFO",
    "message": "message that it's repeated",
    "id": "an-uuid"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Log 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "log": "{
        data of the current request
    }",
    "level": "INFO",
    "message": "message that it's repeated",
    "id": "an-uuid"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Log 3:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "log": "{
        data of the current request
    }",
    "level": "INFO",
    "message": "message that it's repeated",
    "id": "an-uuid"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Log 4:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "log": "{
        data of the current request
    }",
    "level": "INFO",
    "message": "another message",
    "id": "another-uuid"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to get those events that got the message field with the text "message that it's repeated" three times in a row. The timing is spaced by roughly 20 seconds between each log that contains that message.The result I'm expecting is only getting their IDs. Nothing else&lt;/P&gt;

&lt;P&gt;That scenario represents a service call that we're retrying, but it's not happening in all the scenarios. I need to retrieve &lt;STRONG&gt;the id&lt;/STRONG&gt; of those events.&lt;/P&gt;

&lt;P&gt;I'm able to match the events that contains the message, but I didn't figure it out how to filter that dataset and I didn't find anything that help me with this so far.&lt;/P&gt;

&lt;P&gt;Could you shed some light on this?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 19:50:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-events-based-on-a-repeated-log/m-p/452754#M78424</guid>
      <dc:creator>alejandrom_e</dc:creator>
      <dc:date>2019-08-16T19:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get events based on a repeated log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-events-based-on-a-repeated-log/m-p/452755#M78425</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | streamstats time_window=20 count(eval(message="message that it's repeated")) AS repeated_count BY id
| where repeated_count &amp;gt;= 3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Aug 2019 20:39:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-events-based-on-a-repeated-log/m-p/452755#M78425</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-08-16T20:39:39Z</dc:date>
    </item>
  </channel>
</rss>

