R&D/클라우드

grafana query example

sunshout 2017. 2. 15. 05:39

네트워크 트래픽

SELECT derivative(mean("bytes_recv"),1s)  FROM "net" WHERE "interface" = 'eth0' AND $timeFilter GROUP BY time(10s), "host"


디스크 사용량

SELECT mean("used_percent")  FROM "disk" WHERE "device" = 'xvdb' AND $timeFilter GROUP BY time(10s), "host"


Memory 사용량

SELECT mean("used_percent") FROM "mem" WHERE $timeFilter GROUP BY time(10s), "host"


CPU 사용량

SELECT 100-mean("usage_idle")  FROM "cpu" WHERE "cpu" = 'cpu-total' AND $timeFilter GROUP BY time(10s), "host"