Getting Data In

Invalid earliest_time error using the java SDK

sharninder
New Member

I'm trying to search using a time range and the query works fine from the UI but when I use curl from the command line, I get a FATAL_ERROR invalid earliest_time error.

curl -u admin:password -k https://localhost:8089/services/search/jobs -d search="search *" -d earliest_time="10/30/2014:0:0:0" -d latest_time="10/30/2014:24:0:0"

What's wrong with the time format?

Update: I did try querying time in the format specified in the _time field and that worked but then the documentation states that the time format I used earlier should also work. Is the documentation incorrect?

Tags (1)
0 Karma

sklass
Path Finder

In poking through the returned data - when it did work it looks like the format should be.

YYYY-MM-DDTHH:MM:SS

Example: 2015-05-02T07:30:00

You can also append your timezone at the end as well. Really this is way harder than it should be.

patng323
Explorer

The same problem happens in the splunk CLI tool.

0 Karma

sharninder
New Member

Can anyone provide an answer to this query?

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...