<?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: Splunk Query to find all the occurrences of a Boolean key value pair in logs over a period of time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/597898#M208197</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; If I remember correctly, simple stats count over a single field takes into account mvfields.&lt;/P&gt;</description>
    <pubDate>Mon, 16 May 2022 06:12:15 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2022-05-16T06:12:15Z</dc:date>
    <item>
      <title>How to write splunk Query to find all the occurrences of a Boolean key value pair in logs over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/597889#M208191</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Given below is a snippet of splunk event. My requirement is to find all the occurrences of&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;"isOutstanding": true&lt;/STRONG&gt;&lt;SPAN&gt;. Here the point to note is that one event may/may not have multiple occurrences. Need to find the total count from multiple events over a period of time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;{
  \"school\": {
    \"schoolId\": \"1\",
    \"schoolName\": \"SchoolX\",
    \"schoolType\": \"private\",
    \"students\": [
      {
        \"id\": \"1\",
        \"isOutstanding\": true,
        
      },
      {
        \"id\": \"2\",
        \"isOutstanding\": false,
        
      },
      {
        \"id\": \"3\",
        \"isOutstanding\": false,
        
      }
    ]
  }
}&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;The below Splunk query&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;index=myIndex "isOutstanding":true&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;gives the count of events having&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;"isOutstanding": true&lt;/STRONG&gt;&lt;SPAN&gt;. But it doesn't consider the count of multiple occurrences in one event. How can I get the count of all the occourences in an event? TIA&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 15:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/597889#M208191</guid>
      <dc:creator>RemyaT</dc:creator>
      <dc:date>2022-05-16T15:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to find all the occurrences of a Boolean key value pair in logs over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/597891#M208192</link>
      <description>&lt;P&gt;Use rex to extract the 'isOutstanding' texts and mvcount to count them.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=0 "(?&amp;lt;isOutstanding&amp;gt;isOutstanding)"
| eval count = mvcount(isOutstanding)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 16 May 2022 00:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/597891#M208192</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-05-16T00:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to find all the occurrences of a Boolean key value pair in logs over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/597892#M208193</link>
      <description>&lt;P&gt;Depending on whether your actual event has the backslashes, try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=0 "(?&amp;lt;isOutstanding&amp;gt;isOutstanding\\\\\":\s+true)"
| eval count = mvcount(isOutstanding)
| stats sum(count) as total&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 16 May 2022 04:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/597892#M208193</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-16T04:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to find all the occurrences of a Boolean key value pair in logs over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/597898#M208197</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; If I remember correctly, simple stats count over a single field takes into account mvfields.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 06:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/597898#M208197</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-16T06:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to find all the occurrences of a Boolean key value pair in logs over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/598399#M208375</link>
      <description>&lt;P&gt;This was helpful but didn't exactly serve my requirement. Has to change a little bit for the final working query&lt;/P&gt;&lt;PRE&gt;| rex max_match=0 "(?&amp;lt;isOutstanding&amp;gt;isOutstanding\\\\\":true)"
|  stats count(isOutstanding) as total&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 02:41:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-splunk-Query-to-find-all-the-occurrences-of-a/m-p/598399#M208375</guid>
      <dc:creator>RemyaT</dc:creator>
      <dc:date>2022-05-19T02:41:28Z</dc:date>
    </item>
  </channel>
</rss>

