grafana-templating

How to filter grafana dashboard with greater than and less than operators?

£可爱£侵袭症+ 提交于 2021-01-28 01:44:41
问题 I'm working on a project where I'm using Grafana and InfluxdB. I was able to get all the required values to grafana. In my response I have a filed with value less than and greater than zero. I want to add a filter where user can select the type of operation. Any recommendation on how to crack this. So far I have tried.. I created a Variable (constant value 0, which i tried to use in my dashboard query with less than or greater than operator. As soon as I select my variable, the operator gets

How to use request parameter value in Grafana query string

ぃ、小莉子 提交于 2020-04-10 06:48:10
问题 I am using Grafana and my URL string is like: http://servername:3000/dashboard/db/dashboard?refresh=10s&node=hanoi How can i use the value of node i.e. "hanoi" in my Grafana Query string. SELECT count("value") FROM "autogen"."sensor" WHERE "system_id" = 'hanoi' AND $timeFilter GROUP BY time(1m) fill(null) Above 'hard coded' query for 'hanoi' is working fine, but i want to use node value passed as request parameter in my where clause of query string. I can see that refresh value i.e. 10s is

How to use request parameter value in Grafana query string

允我心安 提交于 2020-04-10 06:47:08
问题 I am using Grafana and my URL string is like: http://servername:3000/dashboard/db/dashboard?refresh=10s&node=hanoi How can i use the value of node i.e. "hanoi" in my Grafana Query string. SELECT count("value") FROM "autogen"."sensor" WHERE "system_id" = 'hanoi' AND $timeFilter GROUP BY time(1m) fill(null) Above 'hard coded' query for 'hanoi' is working fine, but i want to use node value passed as request parameter in my where clause of query string. I can see that refresh value i.e. 10s is

Grafana: global variables to access [from,to] values of the time range

蓝咒 提交于 2020-01-13 20:28:05
问题 I am doing some tests with a MySQL data-source and make use of the timefilter inside the SQL query: // my query goes here... WHERE $__timeFilter(time_start); which generates something like the following: WHERE time_start >= FROM_UNIXTIME(1505207821) AND time_start <= FROM_UNIXTIME(1505229421); Are there any variables that can give me access to the 2 timestamps that define the time range? For instance, at the example above: from = 1505207821 to = 1505229421 回答1: Yes, $__timeFrom() and $_

Grafana: global variables to access [from,to] values of the time range

心不动则不痛 提交于 2020-01-13 20:27:58
问题 I am doing some tests with a MySQL data-source and make use of the timefilter inside the SQL query: // my query goes here... WHERE $__timeFilter(time_start); which generates something like the following: WHERE time_start >= FROM_UNIXTIME(1505207821) AND time_start <= FROM_UNIXTIME(1505229421); Are there any variables that can give me access to the 2 timestamps that define the time range? For instance, at the example above: from = 1505207821 to = 1505229421 回答1: Yes, $__timeFrom() and $_

How can I place home dashboard as the top in list of dashboards in Grafana?

做~自己de王妃 提交于 2019-12-11 10:46:41
问题 I want to place the home dashboard at the top when the user clicks on the dashboard expandable list. I have a dashboard that is set as my home and called as "Home" but while navigating, it is a bad UX to see it at the bottom of the list. To explain with pictures: The following two pictures depict what I currently have: This is what I want: I tried looking into multiple options of placing dashboards at the top: starred, etc but none seemed relevant. I tried to compare what is the difference

How to use the selected period of time in a query?

旧时模样 提交于 2019-12-03 07:01:17
问题 I'm using Grafana with Prometheus and I'd like to build a query that depends on the selected period of time selected in the upper right corner of the screen. Is there any variable (or something like that) to use in the query field? In other words, If I select 24hs I'd like to use that data in the query. 回答1: There are two ways that I know: You can use the $__interval variable like this: increase(http_requests_total[$__interval]) There is a drawback that the $__interval variable's value is

How to use the selected period of time in a query?

女生的网名这么多〃 提交于 2019-12-02 19:36:49
I'm using Grafana with Prometheus and I'd like to build a query that depends on the selected period of time selected in the upper right corner of the screen. Is there any variable (or something like that) to use in the query field? In other words, If I select 24hs I'd like to use that data in the query. There are two ways that I know: You can use the $__interval variable like this: increase(http_requests_total[$__interval]) There is a drawback that the $__interval variable's value is adjusted by resolution of the graph, but this may also be helpful in some situations. This approach should fit