Splunk Dev

Why am I getting error "Cannot parse time argument 'earliest_time': '2015-08-08'" trying to perform backfill on my summary index?

leonheart78
Explorer

I was trying to perform backfill on my summary index to fill the gaps in between. Below is the command which I have executed:

 ./splunk cmd python fill_summary_index.py -app search -name AutomatedSummary -index temp1 -et 2015-08-08 -lt 2015-08-08 -dedup true -auth admin:changeme,

*** For saved search 'AutomatedSummary' ***

Failed to get list of scheduled times for saved search 'AutomatedSummary' (app = 'search', error = '[HTTP 400] Bad Request; [{'text': "In handler 'savedsearch': Cannot parse time argument 'earliest_time': '2015-08-08'", 'code': None, 'type': 'ERROR'}]'

No searches to run

May I know what's wrong with this command? I'm trying to backfill from 8th Aug to current time.
Thank you.

Leon

0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

The safest way to do the backfill is to use the epoch timestamp (no format compatibility issue). So instead use something like this (assuming you want to consider data for whole day of 2015-08-08)

  ./splunk cmd python fill_summary_index.py -app search -name AutomatedSummary -index temp1 -et 1439006400 -lt 1439092800 -dedup true -auth admin:changeme

You can following site to convert your timestamp to epoch
http://www.epochconverter.com/

Additional***

You can also use this generic Splunk search to get the same. (may need adjustment on the format, relative time for latest time)

| gentimes start=-1 | eval Date="2015-08-08" | eval et=round(strptime(Date,"%Y-%m-%d")) | eval lt=round(relative_time(strptime(Date,"%Y-%m-%d"),"+1d")) | table et, lt

View solution in original post

0 Karma

somesoni2
SplunkTrust
SplunkTrust

The safest way to do the backfill is to use the epoch timestamp (no format compatibility issue). So instead use something like this (assuming you want to consider data for whole day of 2015-08-08)

  ./splunk cmd python fill_summary_index.py -app search -name AutomatedSummary -index temp1 -et 1439006400 -lt 1439092800 -dedup true -auth admin:changeme

You can following site to convert your timestamp to epoch
http://www.epochconverter.com/

Additional***

You can also use this generic Splunk search to get the same. (may need adjustment on the format, relative time for latest time)

| gentimes start=-1 | eval Date="2015-08-08" | eval et=round(strptime(Date,"%Y-%m-%d")) | eval lt=round(relative_time(strptime(Date,"%Y-%m-%d"),"+1d")) | table et, lt
0 Karma

leonheart78
Explorer

Thank you for your help. I have managed to run the backfill, however, in my summary index temp1, I'm not seeing the data. May I know what went wrong?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...