From 86ef53f5f21a36b0ad3ecaae668edc78926805b3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 28 Dec 2016 22:50:47 -0700 Subject: mv jarmon-config.js config-jarmon.js --- config-jarmon.js | 156 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ index.html.gen | 2 +- jarmon-config.js | 155 ------------------------------------------------------ 3 files changed, 157 insertions(+), 156 deletions(-) create mode 100644 config-jarmon.js delete mode 100644 jarmon-config.js diff --git a/config-jarmon.js b/config-jarmon.js new file mode 100644 index 0000000..2159221 --- /dev/null +++ b/config-jarmon.js @@ -0,0 +1,156 @@ +/* Copyright (c) Richard Wall + * See LICENSE for details. + * + * Some example recipes for Collectd RRD data - you *will* need to modify this + * based on the RRD data available on your system. + */ + +$(function() { + + for (var i = 0; i < jarmon.timeRangeShortcuts.length; i++) { + if (jarmon.timeRangeShortcuts[i][0] === 'last day') { + jarmon.timeRangeShortcuts[i][2] = true; + } + } + + var proton = 'https://proton.parabola.nu/collectd/proton.parabola.nu/' + var winston = 'https://winston.parabola.nu/collectd/winston.parabola.nu/' + + var tabRecipes = [ + ['Overview', ['cpu', 'memory', 'swap-use']], + ['Iface', ['interface-inet', 'interface-lvpn', 'interface-lo']], + ['Other', ['load', 'swap-use', 'swap-io', 'users', 'entropy', 'uptime']] + ]; + + var chartRecipes = { + 'cpu': { + title: 'CPU Usage', + data: [ + [proton+'cpu-0/cpu-steal.rrd', 0, 'Steal', 'jiffy'], + [proton+'cpu-0/cpu-interrupt.rrd', 0, 'IRQ', 'jiffy'], + [proton+'cpu-0/cpu-softirq.rrd', 0, 'SoftIRQ', 'jiffy'], + [proton+'cpu-0/cpu-system.rrd', 0, 'System', 'jiffy'], + [proton+'cpu-0/cpu-wait.rrd', 0, 'IO', 'jiffy'], + [proton+'cpu-0/cpu-user.rrd', 0, 'User', 'jiffy'], + //[proton+'cpu-0/cpu-nice.rrd', 0, 'Nice', 'jiffy'], + [proton+'cpu-0/cpu-idle.rrd', 0, 'Idle', 'jiffy'], + ], + options: jQuery.extend(true, {}, + jarmon.Chart.BASE_OPTIONS, + jarmon.Chart.STACKED_OPTIONS, + {yaxis: {min: 0, max: 110}}) + }, + + 'memory': { + title: 'Memory', + data: [ + [proton+'memory/memory-used.rrd', 0, 'Used', 'B'], + [proton+'memory/memory-slab_unrecl.rrd', 0, 'Slab', 'B'], + [proton+'memory/memory-slab_recl.rrd', 0, 'Slab (Recl)', 'B'], + [proton+'memory/memory-cached.rrd', 0, 'Cached', 'B'], + [proton+'memory/memory-buffered.rrd', 0, 'Buffered', 'B'], + [proton+'memory/memory-free.rrd', 0, 'Free', 'B'] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, + jarmon.Chart.STACKED_OPTIONS) + }, + + 'load': { + title: 'Load Average', + data: [ + [proton+'load/load.rrd', 'shortterm', 'Short Term', ''], + [proton+'load/load.rrd', 'midterm', 'Medium Term', ''], + [proton+'load/load.rrd', 'longterm', 'Long Term', ''] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) + }, + + 'interface-inet': { + title: 'ens18 Throughput', + data: [ + [proton+'interface-ens18/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }], + [proton+'interface-ens18/if_octets.rrd', 'rx', 'Receive', 'bit/s', function (v) { return v*8; }] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) + }, + + 'interface-lvpn': { + title: 'lvpn Throughput', + data: [ + [proton+'interface-lvpn/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }], + [proton+'interface-lvpn/if_octets.rrd', 'rx', 'Receive', 'bit/s', function (v) { return v*8; }] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) + }, + + 'interface-lo': { + title: 'lo Throughput', + data: [ + [proton+'interface-lo/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }], + [proton+'interface-lo/if_octets.rrd', 'rx', 'Receive', 'bit/s', function (v) { return v*8; }] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) + }, + + 'entropy': { + title: 'Entropy', + data: [ + [proton+'entropy/entropy.rrd', 0, 'Entropy', 'b'] + ], + options: jQuery.extend(true, {}, + jarmon.Chart.BASE_OPTIONS, + {series: {lines: {fill: 0.5}}}) + }, + + 'users': { + title: 'Users', + data: [ + [proton+'users/users.rrd', 0, 'Users', 'users'] + ], + options: jQuery.extend(true, {}, + jarmon.Chart.BASE_OPTIONS, + {series: {lines: {fill: 0.5}}}) + }, + + 'uptime': { + title: 'Uptime', + data: [ + [proton+'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}}}) + }, + + 'swap-use': { + title: 'Swap Usage', + data: [ + [proton+'swap/swap-used.rrd', 0, 'Used', 'B'], + [proton+'swap/swap-cached.rrd', 0, 'Cached', 'B'], + [proton+'swap/swap-free.rrd', 0, 'Free', 'B'] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, + jarmon.Chart.STACKED_OPTIONS) + }, + + 'swap-io': { + title: 'Swap IO', + data: [ + /* In pages unless the Swap.ReportBytes option is set */ + [proton+'swap/swap_io-in.rrd', 0, 'In', 'page'], + [proton+'swap/swap_io-out.rrd', 0, 'Out', 'page'] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) + } + }; + + var chartTemplate = $('.chart-container').remove(); + + jarmon.buildTabbedChartUi( + chartTemplate, + chartRecipes, + $('.tabbed-chart-interface'), + tabRecipes, + $('.chartRangeControl') + ); +}); diff --git a/index.html.gen b/index.html.gen index 58be895..da0eae2 100755 --- a/index.html.gen +++ b/index.html.gen @@ -14,7 +14,7 @@ echo ' - + ' cat jarmon.html.part tls.html.part crtsh.html.part diff.html.part diff --git a/jarmon-config.js b/jarmon-config.js deleted file mode 100644 index bbf452a..0000000 --- a/jarmon-config.js +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (c) Richard Wall - * See LICENSE for details. - * - * Some example recipes for Collectd RRD data - you *will* need to modify this - * based on the RRD data available on your system. - */ - -$(function() { - - for (var i = 0; i < jarmon.timeRangeShortcuts.length; i++) { - if (jarmon.timeRangeShortcuts[i][0] === 'last day') { - jarmon.timeRangeShortcuts[i][2] = true; - } - } - - var proton = 'https://proton.parabola.nu/collectd/proton.parabola.nu/' - var winston = 'https://winston.parabola.nu/collectd/winston.parabola.nu/' - - var tabRecipes = [ - ['Overview', ['cpu', 'memory', 'swap-use']], - ['Iface', ['interface-inet', 'interface-lvpn', 'interface-lo']], - ['Other', ['load', 'swap-use', 'swap-io', 'users', 'entropy', 'uptime']] - ]; - - var chartRecipes = { - 'cpu': { - title: 'CPU Usage', - data: [ - [proton+'cpu-0/cpu-steal.rrd', 0, 'Steal', 'jiffy'], - [proton+'cpu-0/cpu-interrupt.rrd', 0, 'IRQ', 'jiffy'], - [proton+'cpu-0/cpu-softirq.rrd', 0, 'SoftIRQ', 'jiffy'], - [proton+'cpu-0/cpu-system.rrd', 0, 'System', 'jiffy'], - [proton+'cpu-0/cpu-wait.rrd', 0, 'IO', 'jiffy'], - [proton+'cpu-0/cpu-user.rrd', 0, 'User', 'jiffy'], - //[proton+'cpu-0/cpu-nice.rrd', 0, 'Nice', 'jiffy'], - [proton+'cpu-0/cpu-idle.rrd', 0, 'Idle', 'jiffy'], - ], - options: jQuery.extend(true, {}, - jarmon.Chart.BASE_OPTIONS, - jarmon.Chart.STACKED_OPTIONS, - {yaxis: {min: 0, max: 110}}) - }, - - 'memory': { - title: 'Memory', - data: [ - [proton+'memory/memory-used.rrd', 0, 'Used', 'B'], - [proton+'memory/memory-slab_unrecl.rrd', 0, 'Slab', 'B'], - [proton+'memory/memory-slab_recl.rrd', 0, 'Slab (Recl)', 'B'], - [proton+'memory/memory-cached.rrd', 0, 'Cached', 'B'], - [proton+'memory/memory-buffered.rrd', 0, 'Buffered', 'B'], - [proton+'memory/memory-free.rrd', 0, 'Free', 'B'] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, - jarmon.Chart.STACKED_OPTIONS) - }, - - 'load': { - title: 'Load Average', - data: [ - [proton+'load/load.rrd', 'shortterm', 'Short Term', ''], - [proton+'load/load.rrd', 'midterm', 'Medium Term', ''], - [proton+'load/load.rrd', 'longterm', 'Long Term', ''] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) - }, - - 'interface-inet': { - title: 'ens18 Throughput', - data: [ - [proton+'interface-ens18/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }], - [proton+'interface-ens18/if_octets.rrd', 'rx', 'Receive', 'bit/s', function (v) { return v*8; }] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) - }, - - 'interface-lvpn': { - title: 'lvpn Throughput', - data: [ - [proton+'interface-lvpn/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }], - [proton+'interface-lvpn/if_octets.rrd', 'rx', 'Receive', 'bit/s', function (v) { return v*8; }] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) - }, - - 'interface-lo': { - title: 'lo Throughput', - data: [ - [proton+'interface-lo/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }], - [proton+'interface-lo/if_octets.rrd', 'rx', 'Receive', 'bit/s', function (v) { return v*8; }] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) - }, - - 'entropy': { - title: 'Entropy', - data: [ - [proton+'entropy/entropy.rrd', 0, 'Entropy', 'b'] - ], - options: jQuery.extend(true, {}, - jarmon.Chart.BASE_OPTIONS, - {series: {lines: {fill: 0.5}}}) - }, - - 'users': { - title: 'Users', - data: [ - [proton+'users/users.rrd', 0, 'Users', 'users'] - ], - options: jQuery.extend(true, {}, - jarmon.Chart.BASE_OPTIONS, - {series: {lines: {fill: 0.5}}}) - }, - - 'uptime': { - title: 'Uptime', - data: [ - [proton+'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}}}) - }, - - 'swap-use': { - title: 'Swap Usage', - data: [ - [proton+'swap/swap-used.rrd', 0, 'Used', 'B'], - [proton+'swap/swap-cached.rrd', 0, 'Cached', 'B'], - [proton+'swap/swap-free.rrd', 0, 'Free', 'B'] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, - jarmon.Chart.STACKED_OPTIONS) - }, - - 'swap-io': { - title: 'Swap IO', - data: [ - [proton+'swap/swap_io-in.rrd', 0, 'In', 'B'], - [proton+'swap/swap_io-out.rrd', 0, 'Out', 'B'] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) - } - }; - - var chartTemplate = $('.chart-container').remove(); - - jarmon.buildTabbedChartUi( - chartTemplate, - chartRecipes, - $('.tabbed-chart-interface'), - tabRecipes, - $('.chartRangeControl') - ); -}); -- cgit v1.1-4-g5e80