本文将为您介绍如何配置、使用模板变量。
操作步骤
配置模板变量
1. 登录 腾讯云可观测平台 ,选择左侧导航栏的 Dashboard。
2. 找到您需要查看的 Dashboard,单击对应的面板名称。
3. 在面板区单击上方的![](https://qcloudimg.tencent-cloud.cn/image/document/544cea511cff8f9c71412d23757e0152.png)
,在弹出的下拉框中选择模板变量。
![](https://qcloudimg.tencent-cloud.cn/image/document/544cea511cff8f9c71412d23757e0152.png)
4. 新建模板变量。单击顶部导航栏的新建,按照提示填写信息后单击确定即可。
云产品
![](https://qcloudimg.tencent-cloud.cn/image/document/fec067d9ab7a38f9eee5c0c7f203c445.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/fec067d9ab7a38f9eee5c0c7f203c445.png)
Prometheus
![](https://qcloudimg.tencent-cloud.cn/image/document/21502015bd6b00a734655fd03032b248.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/21502015bd6b00a734655fd03032b248.png)
编辑、删除模板变量
在模板变量列表中您可以进行模板变量的删除和编辑。
![](https://qcloudimg.tencent-cloud.cn/image/document/dbff683c061f28e5e6e886e365cc0c5f.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/dbff683c061f28e5e6e886e365cc0c5f.png)
使用模板变量
1. 登录 腾讯云可观测平台。
2. 在左侧导航栏中单击 Dashboard,进入 Dashboard 列表页。
3. 找到您需要查看模板变量的 Dashboard,单击对应的面板名称。
4. 创建模板变量后可作为 Dashboard 和监控图表的快速选择器。
在创建或编辑监控图表筛选列中选择模板变量和对应的模板。
![](https://qcloudimg.tencent-cloud.cn/image/document/9e032a8b1a8281a874f53ab0e2e3e260.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/9e032a8b1a8281a874f53ab0e2e3e260.png)
成功绑定模板变量后,该图表即可在 Dashboard 中使用实例筛选器一键筛选实例,如下图:
已绑定模板变量的图表可与实例筛选器联动,一键筛选实例,任意查看该产品类型下的实例监控数据。
![](https://qcloudimg.tencent-cloud.cn/image/document/c73fc0397c02bbcb9d0512145bd53bf8.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/c73fc0397c02bbcb9d0512145bd53bf8.png)