diff --git a/src/graphs.js b/src/graphs.js index 10086c970..c1ae6bbc2 100644 --- a/src/graphs.js +++ b/src/graphs.js @@ -43,6 +43,10 @@ async function getContainerStats(name, fromMinutes, noNullPoints) { `summarize(collectd.localhost.docker-stats-${name}.counter-blockio-write, "${timeBucketSize}min", "sum")`, `summarize(collectd.localhost.docker-stats-${name}.counter-network-read, "${timeBucketSize}min", "sum")`, `summarize(collectd.localhost.docker-stats-${name}.counter-network-write, "${timeBucketSize}min", "sum")`, + `summarize(collectd.localhost.docker-stats-${name}.gauge-blockio-read, "${fromMinutes}min", "max")`, + `summarize(collectd.localhost.docker-stats-${name}.gauge-blockio-write, "${fromMinutes}min", "max")`, + `summarize(collectd.localhost.docker-stats-${name}.gauge-network-read, "${fromMinutes}min", "max")`, + `summarize(collectd.localhost.docker-stats-${name}.gauge-network-write, "${fromMinutes}min", "max")`, ]; const results = []; @@ -70,6 +74,10 @@ async function getContainerStats(name, fromMinutes, noNullPoints) { blockWrite: results[3], networkRead: results[4], networkWrite: results[5], + blockReadTotal: results[6].datapoints[0] ? results[6].datapoints[0][0] : 0, + blockWriteTotal: results[7].datapoints[0] ? results[6].datapoints[0][0] : 0, + networkReadTotal: results[8].datapoints[0] ? results[6].datapoints[0][0] : 0, + networkWriteTotal: results[9].datapoints[0] ? results[6].datapoints[0][0] : 0, cpuCount: os.cpus().length }; }