<?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 fill_summary_index.py error backfilling 5-minute CPU utilization summary index in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/fill-summary-index-py-error-backfilling-5-minute-CPU-utilization/m-p/85239#M859</link>
    <description>&lt;P&gt;Here is the search (name = CPU-Summery-WMI):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="WMI:CPUTime" earliest=-5m@m  | stats avg(PercentProcessorTime) AS proc avg(PercentUserTime) AS user by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It is scheduled to run every 5 minutes starting at 00-minute to the hour.&lt;/P&gt;

&lt;P&gt;To back fill the index summary, I try to run this command line:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;./splunk cmd python fill_summary_index.py -app search -name "CPU-Summary-WMI" -owner *mememe* -j 8 -et '08/01/2012:00:00:00' -lt '10/04/2012:21:20:00' -dedup true -auth admin:*changeme*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With that, I get the error shown below every time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;*** For saved search 'CPU-Summary-WMI' ***
Failed to get list of scheduled times for saved search 'CPU-Summary-WMI' (app = 'search', error = '[HTTP 400] Bad Request; [{'text': "In handler 'savedsearch': Cannot parse time argument 'earliest_time': '08/01/2012:00:00:00'", 'code': None, 'type': 'ERROR'}]'

No searches to run
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Searching for the error, the results I find seem to say that the problem may be caused by the "earliest=-5m@m" part in the search, which conflicts with the "-et" option on the command line.&lt;/P&gt;

&lt;P&gt;But both are needed for what I want to do.&lt;/P&gt;

&lt;P&gt;Any suggestion to how I may resolve this?&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2012 20:31:10 GMT</pubDate>
    <dc:creator>ww9rivers</dc:creator>
    <dc:date>2012-10-09T20:31:10Z</dc:date>
    <item>
      <title>fill_summary_index.py error backfilling 5-minute CPU utilization summary index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/fill-summary-index-py-error-backfilling-5-minute-CPU-utilization/m-p/85239#M859</link>
      <description>&lt;P&gt;Here is the search (name = CPU-Summery-WMI):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="WMI:CPUTime" earliest=-5m@m  | stats avg(PercentProcessorTime) AS proc avg(PercentUserTime) AS user by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It is scheduled to run every 5 minutes starting at 00-minute to the hour.&lt;/P&gt;

&lt;P&gt;To back fill the index summary, I try to run this command line:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;./splunk cmd python fill_summary_index.py -app search -name "CPU-Summary-WMI" -owner *mememe* -j 8 -et '08/01/2012:00:00:00' -lt '10/04/2012:21:20:00' -dedup true -auth admin:*changeme*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With that, I get the error shown below every time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;*** For saved search 'CPU-Summary-WMI' ***
Failed to get list of scheduled times for saved search 'CPU-Summary-WMI' (app = 'search', error = '[HTTP 400] Bad Request; [{'text': "In handler 'savedsearch': Cannot parse time argument 'earliest_time': '08/01/2012:00:00:00'", 'code': None, 'type': 'ERROR'}]'

No searches to run
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Searching for the error, the results I find seem to say that the problem may be caused by the "earliest=-5m@m" part in the search, which conflicts with the "-et" option on the command line.&lt;/P&gt;

&lt;P&gt;But both are needed for what I want to do.&lt;/P&gt;

&lt;P&gt;Any suggestion to how I may resolve this?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 20:31:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/fill-summary-index-py-error-backfilling-5-minute-CPU-utilization/m-p/85239#M859</guid>
      <dc:creator>ww9rivers</dc:creator>
      <dc:date>2012-10-09T20:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: fill_summary_index.py error backfilling 5-minute CPU utilization summary index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/fill-summary-index-py-error-backfilling-5-minute-CPU-utilization/m-p/85240#M860</link>
      <description>&lt;P&gt;According to the docs, -et must be a relative time string or an epoch time. So try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-et -60d@d -lt now
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Knowledge/Managesummaryindexgapsandoverlaps" target="test_blank"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Knowledge/Managesummaryindexgapsandoverlaps&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Oct 2012 00:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/fill-summary-index-py-error-backfilling-5-minute-CPU-utilization/m-p/85240#M860</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2012-10-10T00:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: fill_summary_index.py error backfilling 5-minute CPU utilization summary index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/fill-summary-index-py-error-backfilling-5-minute-CPU-utilization/m-p/85241#M861</link>
      <description>&lt;P&gt;You need to remove that earliest command from your search and put it into the scheduled search parameters. The savedsearches parameters are how you control the window of time that the search operates inside of.&lt;/P&gt;

&lt;P&gt;ie. something like this in your savedsearches.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[CPU-Summary-WMI]
action.email.inline = 0
action.summary_index = 1
action.summary_index._name = cpu_summary
alert.digest_mode = True
dispatch.earliest_time = -5m@m
dispatch.latest_time = now
disabled = 0
alert.suppress = 0
alert.track = 0
cron_schedule = */5 * * * *
enableSched = 1
realtime_schedule = 0
search = `CPU-Summary-WMI`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This way when your search runs it will spawn 12 searches per hour but the time provided to the search will be back 5 minutes into the past. The "now" time will be relative to the time provided by the backfill script.&lt;/P&gt;

&lt;P&gt;Then re-run the backfill script with something like "-e 1343779200 -l 1349385600"&lt;/P&gt;

&lt;P&gt;I use similar searches to populate summary indexes for data that arrived just under 2 days late. &lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2012 00:30:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/fill-summary-index-py-error-backfilling-5-minute-CPU-utilization/m-p/85241#M861</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2012-10-10T00:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: fill_summary_index.py error backfilling 5-minute CPU utilization summary index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/fill-summary-index-py-error-backfilling-5-minute-CPU-utilization/m-p/85242#M862</link>
      <description>&lt;P&gt;Since the "-et" and "-lt" fields need either a relative time ("-6d@d" or "-y"), or a Unix Epoc time ("Fri Jul 11 10:00:56 EDT 2014" == 1405087256), but I've found that I need to have the fill_summary_index.py script start and stop at specific times (i.e. "-et June 22, 2014 22:00:00").&lt;/P&gt;

&lt;P&gt;I could convert those times to epoc, then run the command on the command line, but I'm lazy and that's prone to error.  I use the Unix "date" command like this (in KSH):&lt;/P&gt;

&lt;P&gt;/splunk cmd python fill_summary_index.py ... -et $(date -d "June 22 2014 22:00" +%s) ...&lt;/P&gt;

&lt;P&gt;At 3AM this helps me avoid one more possible typo...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:02:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/fill-summary-index-py-error-backfilling-5-minute-CPU-utilization/m-p/85242#M862</guid>
      <dc:creator>dglinder</dc:creator>
      <dc:date>2020-09-28T17:02:44Z</dc:date>
    </item>
  </channel>
</rss>

