<?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: Determine number of searches per day (non-scheduled). in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113164#M29741</link>
    <description>&lt;P&gt;This search also includes scheduled searches which is good but not what I am looking for.  Based on your search I came up with this which seems more what I was looking for:&lt;/P&gt;

&lt;P&gt;index=_audit action="search" search="*" savedsearch_name="" (user!="splunk-system-user" user!="rest*") | eval Date=strftime(_time,"%Y-%m-%d") | timechart span=1d count&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:40:53 GMT</pubDate>
    <dc:creator>rmorlen</dc:creator>
    <dc:date>2020-09-28T15:40:53Z</dc:date>
    <item>
      <title>Determine number of searches per day (non-scheduled).</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113161#M29738</link>
      <description>&lt;P&gt;How do I determine the number of non-scheduled searches that are run per day.  We are running pooled searchheads.  Running Splunk 5.0.5.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2014 18:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113161#M29738</guid>
      <dc:creator>rmorlen</dc:creator>
      <dc:date>2014-01-14T18:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Determine number of searches per day (non-scheduled).</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113162#M29739</link>
      <description>&lt;P&gt;This should give you what you need&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit action="search" search="*" NOT user="splunk-system-user" | eval Date=strftime(_time,"%Y-%m-%d") | stats count by Date
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jan 2014 20:26:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113162#M29739</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-14T20:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Determine number of searches per day (non-scheduled).</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113163#M29740</link>
      <description>&lt;P&gt;I tried the search and it does work.  I need to review the results because the counts seem really, really high.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2014 20:30:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113163#M29740</guid>
      <dc:creator>rmorlen</dc:creator>
      <dc:date>2014-01-14T20:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Determine number of searches per day (non-scheduled).</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113164#M29741</link>
      <description>&lt;P&gt;This search also includes scheduled searches which is good but not what I am looking for.  Based on your search I came up with this which seems more what I was looking for:&lt;/P&gt;

&lt;P&gt;index=_audit action="search" search="*" savedsearch_name="" (user!="splunk-system-user" user!="rest*") | eval Date=strftime(_time,"%Y-%m-%d") | timechart span=1d count&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:40:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113164#M29741</guid>
      <dc:creator>rmorlen</dc:creator>
      <dc:date>2020-09-28T15:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Determine number of searches per day (non-scheduled).</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113165#M29742</link>
      <description>&lt;P&gt;Slight modification to somesoni2's answer, excluding searches which are incidental to the Splunk web interface usage (typeahead and history), and also removing the seemingly unnecessary eval of the date (timechart does this for you):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit action="search" search="*" NOT user="splunk-system-user" savedsearch_name="" NOT search="\'|history*" NOT search="\'typeahead*" | timechart count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Jan 2014 13:05:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113165#M29742</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2014-01-30T13:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Determine number of searches per day (non-scheduled).</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113166#M29743</link>
      <description>&lt;P&gt;If you are collecting process-level information for Splunk processes using the &lt;A href="http://www.splunk.com/goto/sos"&gt;S.o.S app&lt;/A&gt;'s &lt;CODE&gt;ps_sos.sh&lt;/CODE&gt; scripted input, you can break down your daily search workload between scheduled and ad-hoc searches like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`set_sos_index` sourcetype=ps host=&amp;lt;indexer or search-head host&amp;gt;
| multikv
| `get_splunk_process_type`
| search type="searches"
| rex field=ARGS "_--user=(?&amp;lt;search_user&amp;gt;.*?)_--"
| rex field=ARGS "--id=(?&amp;lt;sid&amp;gt;.*?)_--"
| rex field=sid "remote_(?&amp;lt;search_head&amp;gt;[^_]*?)_"
| eval is_remote=if(like(sid,"%remote%"),"remote","local")
| eval is_scheduled=if(like(sid,"%scheduler_%"),"scheduled","ad-hoc")
| eval is_realtime=if(like(sid,"%rt_%"),"real-time","historical")
| eval is_subsearch=if(like(sid,"%subsearch_%"),"subsearch","generic")
| eval search_type=is_remote.", ".is_scheduled.", ".is_realtime
| timechart span=1d dc(sid) AS "Search count" by is_scheduled
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that you'l need to run this search from within the context of the S.o.S app for the macros it uses to be available. You will also need for the &lt;CODE&gt;ps_sos.sh&lt;/CODE&gt; scripted input to have been running for several days on the instance that you are targeting the search against.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2014 02:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Determine-number-of-searches-per-day-non-scheduled/m-p/113166#M29743</guid>
      <dc:creator>hexx</dc:creator>
      <dc:date>2014-02-05T02:18:14Z</dc:date>
    </item>
  </channel>
</rss>

