grafana中prometheus的查询语句


在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=~".*"}

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM