Dre*_*rce 2 collectd grafana prometheus promql
promql 新手,我正在尝试绘制随时间变化的 cpu 使用情况图表,我发现以下示例获得了静态使用百分比,但如何将其转换为 grafana 的速率?
100 * (1 - sum(collectd_cpu_total{type="idle"}) by (exported_instance) / sum(collectd_cpu_total) by (exported_instance))
Run Code Online (Sandbox Code Playgroud)
既然你已经在使用Prometheus,为什么不使用Prometheus的node_exporter呢?https://www.robustperception.io/understanding-machine-cpu-usage
100 - (avg by (instance) (irate(node_cpu_seconds_total{job="node",mode="idle"}[5m])) * 100)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18396 次 |
| 最近记录: |