Add disk graph for app disk usage

This commit is contained in:
Johannes Zellner
2022-08-05 16:15:48 +02:00
parent d1e48b11a8
commit af7d106a99
3 changed files with 7 additions and 2 deletions

View File

@@ -874,13 +874,15 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
}
var memoryQuery = 'summarize(sum(collectd.localhost.table-' + appId + '-memory.gauge-rss, collectd.localhost.table-' + appId + '-memory.gauge-swap), "' + timeBucketSize + 'min", "avg")';
var diskQuery = 'summarize(collectd.localhost.du-' + appId + '.capacity-usage, "' + timeBucketSize + 'min", "avg")';
Client.graphs([ memoryQuery ], '-' + timePeriod + 'min', { appId: appId }, function (error, result) {
Client.graphs([ memoryQuery, diskQuery ], '-' + timePeriod + 'min', { appId: appId }, function (error, result) {
if (error) return console.error(error);
var currentMemoryLimit = $scope.app.memoryLimit || $scope.app.manifest.memoryLimit || (256 * 1024 * 1024);
fillGraph('#graphsMemoryChart', result[0], 'Memory', 'memoryChart', currentMemoryLimit / 1024 / 1024);
fillGraph('#graphsDiskChart', result[1], 'Disk', 'diskChart', 1024 / 1024);
});
}
};