Thedatasourceused in the preceding code block refers to the core Grafana Prometheus data source plugin. Make sure your Grafana stack has this plugin installed and configured. Thequeryproperty is the same one that you would see in typical dashboard template variables when you view the dashboard J...
Tag values query:应该返回指定tags的值列表的数据源查询。在查询中使用$tag引用当前选中的标记。 Interval variables 使用区间类型创建一个变量,代表一个时间跨度(如1m,1h、1d)。还有一个特殊auto Option选项,将根据当前时间范围的变化。您可以指定多少个时间范围来划分,计算当时auto时间间隔。 这个变量的类型是有用的...
Tags query:返回数据源查询中tags的列表 Tag values query:应该返回指定tags的值列表的数据源查询。在查询中使用$tag引用当前选中的标记。 Interval variables 使用区间类型创建一个变量,代表一个时间跨度(如1m,1h、1d)。还有一个特殊auto Option选项,将根据当前时间范围的变化。您可以指定多少个时间范围来划分,计算当...
在Variables页面,单击New。 按照如下参数配置模板变量,然后单击Add。 参数 说明 Name 变量名称,例如hostname。该名称是您配置中使用的变量,此处为hostname,则查询条件中需写成$hostname。 Type 选择Custom。 Label 输入域名。 Custom Options 配置为*,example.com,example.org,example.net,表示可以查看所有域名的访问情...
You can use other variables inside the query. This example is used to define a variable named$host: {"find": "terms", "field": "hostname", "query": "source:$source"} This uses another variable named$sourceinside the query definition. Whenever you change the value of the$sourcevariable...
Prometheus Template Variables 你可以使用变量来代替硬编码的细节,如 server、app 和 pod_name 在 metric 查询中。Grafana 在仪表盘顶部的下拉选择框中列出这些变量,帮助你改变仪表盘中显示的数据。Grafana 将这类变量称为模板变量。 Query Variables 使用Query类型的变量来查询 Prometheus 的指标 (metrics)、标签 (lab...
For example, if you have server names or region names that do not change, you can create them as custom variables rather than query variables. Because they do not change, you might use them in chained variables rather than other query variables. That would reduce the number of queries Grafa...
Formats variables with multiple values into a pipe-separated string. servers = ['test1.','test2'] String to interpolate:'${servers:pipe}'Interpolation result:'test1.|test2' Raw Turns off data source–specific formatting, such as single quotes in an SQL query. ...
for example, nodename setCustom Variables,name asnodename add the parametervar-nodename=“test”,such as Use Url http://servername:3000/dashboard/db/dashboard?refresh=10s&var-nodename=“test” 复制代码 1. 2. In Query: use where clause as shown below: ...
我们可以从这里看到一些信息,这个variables 就是筛选按钮了,这里可以筛选出我们的 lab 下面定义的 instance 然后仪表盘也可以直接修改一下 点一下右上角的APPLY,主页也有了 【4.6】Linux推荐模板 9276 【4.7】显示not date 不显示图的原因分析 【4.6】中的仪表盘中有几个没有数据 ...