How to Query last 90 minutes records in elasticsearch sql query

Hi,

how to query and get last 90 minutes data using elasticsearch sql query.

now i am running below command please modified this one:

select index_stats.index, index_stats.primaries.indexing.index_total, index_stats.primaries.docs.count, timestamp from ".monitoring-es-6-2019.04.10" where index_stats.index like 'my_indices-2019.04.08' order by timestamp desc limit 10;

please help me

Thanks,
gnanendra

Hi @Gnanendra,

First of, please, format your query. It's less readable unformatted.
Also, for the index_stats.indexcomparison I don't think you need a LIKE statement, an equal one should do just fine.

SELECT index_stats.index, index_stats.primaries.indexing.index_total, index_stats.primaries.docs.count, timestamp FROM ".monitoring-es-6-2019.04.10" WHERE index_stats.index='my_indices-2019.04.08' AND timestamp < NOW() AND timestamp > NOW() - INTERVAL 30 MINUTE;

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.