chronograf icon indicating copy to clipboard operation
chronograf copied to clipboard

Query support for limit or last() without time frame in chronograf UI.

Open chetu opened this issue 9 years ago • 2 comments

SELECT last("chkdown") AS "last_chkdown" FROM "influxdb"."autogen"."haproxy" WHERE time > now() - 15m GROUP BY time(10s), "pxname"

To: 

SELECT last("chkdown") AS "last_chkdown" FROM "influxdb"."autogen"."haproxy" WHERE time > now() - 15m GROUP BY  "pxname"

Or 

SELECT chkdown  FROM "influxdb"."autogen"."haproxy" WHERE time > now() - 15m GROUP BY  "pxname" limit 1

chetu avatar Feb 10 '17 13:02 chetu

Hi @chetu, I can see how this is quite valuable. We'll think up some UI around how to do this. @121watts @alexpaxton with the new data explorer is it possible to turn off the group by time?

goller avatar Feb 10 '17 15:02 goller

@chetu thanks for writing in! @goller in the query builder all functions require a pairing with a group by time. The thinking was that a line graph visualization doesn't particularly make sense with one point.

However, I can see why that could be useful. As a workaround, you could write that query in the InfluxQL portion of the query builder. If you click the + next to your query tab, it will give you the option to type any InfluxQL you'd like.

121watts avatar Feb 10 '17 16:02 121watts