"interval":"", "legendFormat":"{{instance}} CPU使用率", "refId":"A" } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title":"$instance CPU使用率", "tooltip": { "shared":true, "sort": 0, "value_type":"individual" }, "type":"graph", ...
{"title":"CPU Usage","type":"graph","gridPos": {"h":8,"w":12,"x":0,"y":2},"targets": [ {"expr":"rate(node_cpu_seconds_total{mode!='idle', instance=~'$server'}[1m])","refId":"A","legendFormat":"{ {instance}}"} ],"thresholds": [ {"color":"red","value":80}...
"intervalFactor": 2, "legendFormat": "In", "refId": "A", "step": 60 }, { "expr": "irate(ifHCOutOctets{job='$Job',instance='$Device',ifName='$Interface'}[5m]) * 8", "intervalFactor": 2, "legendFormat": "Out", "refId": "B", "step": 60 } ], "thresholds": [], ...
$varname, 这是最直接的方式, 但是这种语法会有限制,就是不能在一个词的中间使用例如:apps.frontend.$varname.requests.count ${var_name}, 如果想要在表达式中间插入变量,请使用此语法,另外这种语法还有一些高级用法,${var_name:<format>},这种格式可以更好地控制 Grafana 如何插入值,具体的用法可以参考官方文...
返回到dashboards上,还需要对图表进行修改,所有的图表都按如下方法,选中一个图表,点击:Edit, 在语句栏添加{instance=~"$node",job=~"$job"},Legend format:{{instance}}{{job}},将所有图表都做更改,点击保存 此时zookeeper监控模板就可以根据条件将zookeeper按集群来拆分,方便我们查看监控图表...
"legendFormat": "主机名", "refId": "A" }, { "expr": "sum(time() - node_boot_time_seconds{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})by(instance)", "format": "table", "hide": false, "instant": true,
[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"expr":"(1 - avg(irate(node_cpu_seconds_total{mode='idle',nodename=~\"$nodename\",instance=~\"$instance\"}[5m])) by (instance)) * 100","interval":"","legendFormat":"{{instance}} CPU使用率","refId":"A"...
Choose where to display the legend. Bottom -Below the graph. Right -To the right of the graph. Width Control how wide the legend is when placed on the right side of the visualization. This option is only displayed if you set the legend placement toRight. ...
PlacementChoose where to display the legend.Bottomplaces the legend below the graph.Rightplaces the legend to the right of the graph. WidthControl how wide the legend is when placed on the right side of the visualization. This option is only displayed if you set the legend placement toRight....
"legendFormat": "Busy State 1w ago", "metric": "", "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22sum(rate(node_cpu%7Balias%3D%5C%22%24host%5C%22%7D%5B%24interval%5D))%20by%20(mode)%20*%20100%22%2C%22range_input%22%3A%223600s%22%2C%22...