Get the correct df data from graphite
This commit is contained in:
@@ -121,16 +121,17 @@ angular.module('Application').controller('GraphsController', ['$scope', '$locati
|
||||
|
||||
$scope.disks = result.disks;
|
||||
|
||||
// /dev/sda1 -> sda1
|
||||
// /dev/mapper/foo -> mapper_foo (see #348)
|
||||
var appDataDiskName = result.appsDataDisk.slice(result.appsDataDisk.indexOf('/', 1) + 1);
|
||||
appDataDiskName = appDataDiskName.replace(/\//g, '_');
|
||||
|
||||
// lazy fetch graphite data
|
||||
$scope.disks.forEach(function (disk) {
|
||||
// /dev/sda1 -> sda1
|
||||
// /dev/mapper/foo -> mapper_foo (see #348)
|
||||
var diskName = disk.filesystem.slice(disk.filesystem.indexOf('/', 1) + 1);
|
||||
diskName = diskName.replace(/\//g, '_');
|
||||
|
||||
Client.graphs([
|
||||
'absolute(collectd.localhost.df-' + appDataDiskName + '.df_complex-free)',
|
||||
'absolute(collectd.localhost.df-' + appDataDiskName + '.df_complex-reserved)',
|
||||
'absolute(collectd.localhost.df-' + appDataDiskName + '.df_complex-used)'
|
||||
'absolute(collectd.localhost.df-' + diskName + '.df_complex-free)',
|
||||
'absolute(collectd.localhost.df-' + diskName + '.df_complex-reserved)',
|
||||
'absolute(collectd.localhost.df-' + diskName + '.df_complex-used)'
|
||||
], '-1min', function (error, data) {
|
||||
if (error) return console.log(error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user