Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to hide the "time" column in the table when use Grafana with influxes

When I use table visualisation in Grafana with InfluxDB, the table panel always shows the time column, but I do not want it. So how can I achieve this?

I have searched similar questions on StackOverflow, but could not find any answer. My query does not include time as shown below:

"SELECT sum("load") AS "load" FROM "cpu" WHERE $timeFilter GROUP BY "host"" 

But the table panel looks as follows including the time column:

enter image description here

like image 686
myd620 Avatar asked Sep 27 '19 10:09

myd620


People also ask

How do you use time range in Grafana?

You can select absolute time ranges (from 2021-12-02 00:00:00 to 2021-12-05 23:59:59) or relative time ranges (from 2 days ago until now), and changing a time range will automatically refresh all the panel queries with the new time range. (Check out our time range controls page for more specifics.)

What is $__ range in Grafana?

In Grafana there's a $__range variable that can be used instead of specifying a time range in a query. This variable to the date/time range picker in the upper right corner of the screen. An example of a query that uses this would be. avg_over_time(sla:gitlab:ratio{environment="gprd", stage="main"}[$__range])

How do I merge two queries in Grafana?

You can use a Transformation. Go to the tab Transform , select Add field from calculation , and chose Mode : Binary operation . Then you can select your two query results, choose + as operator, give an alias and choose to hide the inital fields if you want.


1 Answers

This answer is for Grafana version 7.0.3 and later (previous versions 7.0.1 and 7.0.2 had related bugs which were fixed).

You can do this by adding the "Organize fields" transformation. Click "Transform" tab -> Click "Select" button on "Organize fields" row -> Click the "eye" icon on "Time" row.

like image 90
Jackson Avatar answered Sep 24 '22 08:09

Jackson