且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Grafana查询字符串中使用请求参数值

更新时间:2023-11-07 21:27:52

我能够找到答案:

首先使用名称节点创建模板变量,并设置type = constant

First create template variable with name node and set type = constant

使用 Url http://servername:3000/dashboard/db/dashboard?refresh=10s&var-node=hanoi

在查询中:使用where子句,如下所示:

In Query: use where clause as shown below:

WHERE "system_id" =~ /^$node$/