Splunk Search

Splunk REST Query Returns No Data for stats

chrisboy68
Contributor

Hi,

Given the below search:

 

 

index="my_index" source="mysource"  _index_earliest=-1h 
|  rex field=_raw "\:\sPT(?P<respt>\d+\.\d+)" 
| fields response_time_ms respt| convert num(respt) as response_time_ms 
| eval response_time_ms = response_time_ms*1000  
| stats exactperc95(response_time_ms) as myPercent

 

 

Works fine in the UI, but when I try to execute through the API i get no data back and an obscure message.

 

 

 myPercent Specified field(s) missing from results: 'response_time_ms' myPercent 

 

 

 

Can't figure out what is going on, I have listed the field in "rf" with no luck. I do have search API working for other info, so I know credentials and my POST is accurate. Is there a limitation on stats?

Thanks

 

Chris

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...