diff options
Diffstat (limited to 'cfg')
-rw-r--r-- | cfg/jarmon-winston.js | 146 |
1 files changed, 96 insertions, 50 deletions
diff --git a/cfg/jarmon-winston.js b/cfg/jarmon-winston.js index 8d05999..ff9fcb6 100644 --- a/cfg/jarmon-winston.js +++ b/cfg/jarmon-winston.js @@ -8,61 +8,81 @@ define(['jarmon'], function(jarmon) { var srv = 'https://winston.parabola.nu/collectd/winston.parabola.nu/' var tabRecipes = [ - ['wOverview', ['wload', 'wmemory', 'winterface-inet']], - //['wOverview', [/*'cpu', */'wmemory'/*, 'swap-use'*/]], - //['wIface', ['winterface-inet', /*'interface-lvpn',*/ 'winterface-lo']], - //['wOther', ['wload', /*'swap-use', 'swap-io', 'users', 'entropy', 'uptime'*/]], + ['Overview', ['load', 'memory', 'swap-use', 'df-vda3', 'df-vda4']], + + ['CPU', ['load', 'cpu-0', 'cpu-1', 'cpu-2', 'cpu-3', 'cpu-4', 'cpu-5', 'cpu-6', 'cpu-7']], + ['Disk', ['df-vda3', 'df-vda4']], + ['Memory', ['memory', 'swap-use', 'swap-io']], + ['Net', ['interface-eth0', 'interface-lo', 'interface-lvpn']], + + ['Other', ['entropy', 'uptime', 'users']], ]; - var chartRecipes = { - /* - 'cpu': { - title: 'CPU Usage', + var cpu = function(title, baseUrl) { + return { + title: title, data: [ - [srv+'cpu-0/cpu-steal.rrd', 0, 'Steal', 'jiffy'], - [srv+'cpu-0/cpu-interrupt.rrd', 0, 'IRQ', 'jiffy'], - [srv+'cpu-0/cpu-softirq.rrd', 0, 'SoftIRQ', 'jiffy'], - [srv+'cpu-0/cpu-system.rrd', 0, 'System', 'jiffy'], - [srv+'cpu-0/cpu-wait.rrd', 0, 'IO', 'jiffy'], - [srv+'cpu-0/cpu-user.rrd', 0, 'User', 'jiffy'], - //[srv+'cpu-0/cpu-nice.rrd', 0, 'Nice', 'jiffy'], - [srv+'cpu-0/cpu-idle.rrd', 0, 'Idle', 'jiffy'], + [baseUrl+'cpu-steal.rrd', 0, 'Steal', 'jiffy'], + [baseUrl+'cpu-interrupt.rrd', 0, 'IRQ', 'jiffy'], + [baseUrl+'cpu-softirq.rrd', 0, 'SoftIRQ', 'jiffy'], + [baseUrl+'cpu-system.rrd', 0, 'System', 'jiffy'], + [baseUrl+'cpu-wait.rrd', 0, 'IO', 'jiffy'], + [baseUrl+'cpu-user.rrd', 0, 'User', 'jiffy'], + //[baseUrl+'cpu-nice.rrd', 0, 'Nice', 'jiffy'], + [baseUrl+'cpu-idle.rrd', 0, 'Idle', 'jiffy'], ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, jarmon.Chart.STACKED_OPTIONS, {yaxis: {min: 0, max: 110}}) + }; + }; + + var chartRecipes = { + 'cpu-0': cpu("CPU-0 Usage", srv+'cpu-0/'), + 'cpu-1': cpu("CPU-1 Usage", srv+'cpu-1/'), + 'cpu-2': cpu("CPU-2 Usage", srv+'cpu-2/'), + 'cpu-3': cpu("CPU-3 Usage", srv+'cpu-3/'), + 'cpu-4': cpu("CPU-4 Usage", srv+'cpu-4/'), + 'cpu-5': cpu("CPU-5 Usage", srv+'cpu-5/'), + 'cpu-6': cpu("CPU-6 Usage", srv+'cpu-6/'), + 'cpu-7': cpu("CPU-7 Usage", srv+'cpu-7/'), + + 'df-vda3': { + title: "df /dev/vda3", + data: [ + [srv+'df-vda3/df_complex-reserved.rrd', 0, 'Reserved', 'B'], + [srv+'df-vda3/df_complex-used.rrd', 0, 'Used', 'B'], + [srv+'df-vda3/df_complex-free.rrd', 0, 'Free', 'B'], + ], + options: jQuery.extend(true, {}, + jarmon.Chart.BASE_OPTIONS, + jarmon.Chart.STACKED_OPTIONS) }, - */ - 'wmemory': { - title: 'Memory', + 'df-vda4': { + title: "df /dev/vda4", data: [ - [srv+'memory/memory-used.rrd', 0, 'Used', 'B'], - [srv+'memory/memory-slab_unrecl.rrd', 0, 'Slab', 'B'], - [srv+'memory/memory-slab_recl.rrd', 0, 'Slab (Recl)', 'B'], - [srv+'memory/memory-cached.rrd', 0, 'Cached', 'B'], - [srv+'memory/memory-buffered.rrd', 0, 'Buffered', 'B'], - [srv+'memory/memory-free.rrd', 0, 'Free', 'B'] + [srv+'df-vda4/df_complex-reserved.rrd', 0, 'Reserved', 'B'], + [srv+'df-vda4/df_complex-used.rrd', 0, 'Used', 'B'], + [srv+'df-vda4/df_complex-free.rrd', 0, 'Free', 'B'], ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, jarmon.Chart.STACKED_OPTIONS) }, - 'wload': { - title: 'Load Average', + 'entropy': { + title: 'Entropy', data: [ - [srv+'load/load.rrd', 'shortterm', 'Short Term (1m)', ''], - [srv+'load/load.rrd', 'midterm', 'Medium Term (5m)', ''], - [srv+'load/load.rrd', 'longterm', 'Long Term (15m)', ''] + [srv+'entropy/entropy.rrd', 0, 'Entropy', 'b'] ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, - {yaxis: {min: 0}}) + {series: {lines: {fill: 0.5}}}) }, - 'winterface-inet': { + 'interface-eth0': { title: 'eth0 Throughput', data: [ [srv+'interface-eth0/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }], @@ -71,7 +91,7 @@ define(['jarmon'], function(jarmon) { options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) }, - 'winterface-lo': { + 'interface-lo': { title: 'lo Throughput', data: [ [srv+'interface-lo/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }], @@ -80,35 +100,40 @@ define(['jarmon'], function(jarmon) { options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) }, - /* - 'entropy': { - title: 'Entropy', + 'interface-lvpn': { + title: 'lvpn Throughput', data: [ - [srv+'entropy/entropy.rrd', 0, 'Entropy', 'b'] + [srv+'interface-lvpn/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }], + [srv+'interface-lvpn/if_octets.rrd', 'rx', 'Receive', 'bit/s', function (v) { return v*8; }] ], - options: jQuery.extend(true, {}, - jarmon.Chart.BASE_OPTIONS, - {series: {lines: {fill: 0.5}}}) + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) }, - 'users': { - title: 'Users', + 'load': { + title: 'Load Average', data: [ - [srv+'users/users.rrd', 0, 'Users', 'users'] + [srv+'load/load.rrd', 'shortterm', 'Short Term (1m)', ''], + [srv+'load/load.rrd', 'midterm', 'Medium Term (5m)', ''], + [srv+'load/load.rrd', 'longterm', 'Long Term (15m)', ''] ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, - {series: {lines: {fill: 0.5}}}) + {yaxis: {min: 0}}) }, - 'uptime': { - title: 'Uptime', + 'memory': { + title: 'Memory', data: [ - [srv+'uptime/uptime.rrd', 0, 'Uptime', 'days', function(v) { return v/(60*60*24); }] + [srv+'memory/memory-used.rrd', 0, 'Used', 'B'], + [srv+'memory/memory-slab_unrecl.rrd', 0, 'Slab', 'B'], + [srv+'memory/memory-slab_recl.rrd', 0, 'Slab (Recl)', 'B'], + [srv+'memory/memory-cached.rrd', 0, 'Cached', 'B'], + [srv+'memory/memory-buffered.rrd', 0, 'Buffered', 'B'], + [srv+'memory/memory-free.rrd', 0, 'Free', 'B'] ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, - {series: {lines: {fill: 0.5}}}) + jarmon.Chart.STACKED_OPTIONS) }, 'swap-use': { @@ -130,8 +155,29 @@ define(['jarmon'], function(jarmon) { [srv+'swap/swap_io-out.rrd', 0, 'Out', 'page'] ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) - } - */ + }, + + // TODO: systemd + + 'uptime': { + title: 'Uptime', + data: [ + [srv+'uptime/uptime.rrd', 0, 'Uptime', 'days', function(v) { return v/(60*60*24); }] + ], + options: jQuery.extend(true, {}, + jarmon.Chart.BASE_OPTIONS, + {series: {lines: {fill: 0.5}}}) + }, + + 'users': { + title: 'Users', + data: [ + [srv+'users/users.rrd', 0, 'Users', 'users'] + ], + options: jQuery.extend(true, {}, + jarmon.Chart.BASE_OPTIONS, + {series: {lines: {fill: 0.5}}}) + }, }; return { |