在grafana中prometheus作为数据源时,变量和查询语句如何编写

grafana中定义变量
例1
Query:  netdata_apps_cpu_system_percentage_average
Regex:  /.*,group="(.*)",host/


table表格中的查询语句
100-netdata_system_cpu_percentage_average{dimension="idle", group="$group", instance=~"$env-.*"}

 

例二
Query:  go_memstats_gc_cpu_fraction
Regex:  /instance="(.*):(9100|9090)",job="*"/

table表格中的查询语句
node_memory_Active_bytes{instance=~"$instance:(9100|9009)",job=~".*"}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-10-16
  • 2021-12-01
  • 2022-12-23
  • 2021-04-06
  • 2021-05-10
猜你喜欢
  • 2021-08-31
  • 2022-12-23
  • 2021-07-06
  • 2021-10-01
  • 2021-12-12
  • 2022-12-23
相关资源
相似解决方案