<?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 edit my search to find the total count for three different actions? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196503#M56714</link>
    <description>&lt;P&gt;I should have tested his RegEx.  This works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;documentcloud\.rs\.services\.(?&amp;lt;service&amp;gt;[^\.]+)\.(?&amp;lt;document_action&amp;gt;[^\(]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have updated my answer.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jul 2015 18:50:38 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-07-09T18:50:38Z</dc:date>
    <item>
      <title>How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196497#M56708</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I wanted to know how I would go about getting the total count for each document action over the past 30 days. The document actions are as follows:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;BROWSE DOCUMENTS&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 16:39:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196497#M56708</guid>
      <dc:creator>splunkman341</dc:creator>
      <dc:date>2015-07-07T16:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196498#M56709</link>
      <description>&lt;P&gt;@splunkman341, If you simply looking for a regex that will extract document action the following will work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| rex field=_raw "EmployeeDocumentServicesImpl\.(?&amp;lt;document_action&amp;gt;[^\(]+)" | stats count by document_action
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Updated to include service as extracted group.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| rex field=_raw "rs\.services\.(?&amp;lt;service&amp;gt;[^\.]+)\.(?&amp;lt;document_action&amp;gt;[^\(]+)" | stats count by document_action
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Both work on all samples provided and match in under 25 steps.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 16:48:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196498#M56709</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2015-07-07T16:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196499#M56710</link>
      <description>&lt;P&gt;EmployeeDocumentServicesImp.getDocument() is one of the three actions&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 17:03:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196499#M56710</guid>
      <dc:creator>splunkman341</dc:creator>
      <dc:date>2015-07-07T17:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196500#M56711</link>
      <description>&lt;P&gt;As @bmacias84 implied, you put it together like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=doccloud_main sourcetype=doccloud_sb | rex "documentcloud\.rs\.services\.(?&amp;lt;service&amp;gt;[^\.]+)\.(?&amp;lt;document_action&amp;gt;[^\(]+)" | stats count by document_action
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jul 2015 15:08:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196500#M56711</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-09T15:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196501#M56712</link>
      <description>&lt;P&gt;I tried to put it together with the document actions as mentioned, and the search did not work. I get the error mesage &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'rex' command: Encountered the following error while compiling the regex '(?&amp;lt;service&amp;gt;EmployeeDocumentServicesImpl\.(?&amp;lt;document_action&amp;gt;listDocuments()|getDocumentPDF()|getDocument()[^\(]+)': Regex: missing )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The code i tried to execute is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=doccloud_main sourcetype=doccloud_sb | rex "(?&amp;lt;service&amp;gt;EmployeeDocumentServicesImpl\.(?&amp;lt;document_action&amp;gt;listDocuments()|getDocumentPDF()|getDocument()[^\(]+)" | stats count by document_action
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jul 2015 17:45:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196501#M56712</guid>
      <dc:creator>splunkman341</dc:creator>
      <dc:date>2015-07-09T17:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196502#M56713</link>
      <description>&lt;P&gt;@splunkman341,  Your regex is invalid.  ( and ) are part of the regex syntax used for group you have to escape them.  I recommend that you visit &lt;A href="http://www.regular-expressions.info"&gt;http://www.regular-expressions.info&lt;/A&gt;. If you would like service checkout my update regex statement.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 18:05:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196502#M56713</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2015-07-09T18:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196503#M56714</link>
      <description>&lt;P&gt;I should have tested his RegEx.  This works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;documentcloud\.rs\.services\.(?&amp;lt;service&amp;gt;[^\.]+)\.(?&amp;lt;document_action&amp;gt;[^\(]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have updated my answer.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 18:50:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196503#M56714</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-09T18:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196504#M56715</link>
      <description>&lt;P&gt;EXCELLENT!!!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 19:10:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196504#M56715</guid>
      <dc:creator>splunkman341</dc:creator>
      <dc:date>2015-07-09T19:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196505#M56716</link>
      <description>&lt;P&gt;I was kind of wondering if I could tweak this further(graphically) so it displays each of the actions mentioned above on a day-to-day basis. For example, it would show a count of how many documents added, updated, downloaded, view, e.t.c daily. &lt;/P&gt;

&lt;P&gt;Is that possible?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 19:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196505#M56716</guid>
      <dc:creator>splunkman341</dc:creator>
      <dc:date>2015-07-09T19:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196506#M56717</link>
      <description>&lt;P&gt;Yes, like this:&lt;/P&gt;

&lt;P&gt;index=doccloud_main sourcetype=doccloud_sb | rex "documentcloud.rs.services.(?[^.]+).(?[^(]+)" | timechart span=1d count by document_action&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:38:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196506#M56717</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-09-29T06:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196507#M56718</link>
      <description>&lt;P&gt;I get one giant bar of null when executing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=doccloud_main sourcetype=doccloud_sb | rex "documentcloud\.rs\.services\.(?&amp;lt;service&amp;gt;[^\.]+)\.(?&amp;lt;document_action&amp;gt;[^\(]+)" | timechart span=1d count by document_action
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I think it just added everything into one bar&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 19:20:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196507#M56718</guid>
      <dc:creator>splunkman341</dc:creator>
      <dc:date>2015-07-09T19:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196508#M56719</link>
      <description>&lt;P&gt;Did you run your search for more than 1 day?  I told it to bucket by days.  If you would like to run a shorter search and bucket by hours, switch &lt;CODE&gt;span=1d&lt;/CODE&gt; to &lt;CODE&gt;span=1h&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 19:26:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196508#M56719</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-09T19:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196509#M56720</link>
      <description>&lt;P&gt;I tried for one day and for 30 days and get the same result.  I want the total count of each action on a day to day basis for the past 30 days.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 19:56:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196509#M56720</guid>
      <dc:creator>splunkman341</dc:creator>
      <dc:date>2015-07-09T19:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196510#M56721</link>
      <description>&lt;P&gt;The problem is probably your scale; one of the values ( &lt;CODE&gt;null&lt;/CODE&gt; ?) is so large that it drowns out the other bars.  Change the Y-axis format from "linear" to "log" and you should see all the bars.  If it is &lt;CODE&gt;null&lt;/CODE&gt; that is killing you, you can strip it out like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=doccloud_main sourcetype=doccloud_sb | rex "documentcloud\.rs\.services\.(?&amp;lt;service&amp;gt;[^\.]+)\.(?&amp;lt;document_action&amp;gt;[^\(]+)" | where isnotnull(document_action) | timechart span=1d count by document_action
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jul 2015 20:20:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196510#M56721</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-09T20:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to find the total count for three different actions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196511#M56722</link>
      <description>&lt;P&gt;WORKS BETTER THAN A DREAM!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 20:52:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-find-the-total-count-for-three/m-p/196511#M56722</guid>
      <dc:creator>splunkman341</dc:creator>
      <dc:date>2015-07-09T20:52:03Z</dc:date>
    </item>
  </channel>
</rss>

