summaryrefslogtreecommitdiff
path: root/cfg/jarmon-mav.js
diff options
context:
space:
mode:
Diffstat (limited to 'cfg/jarmon-mav.js')
-rw-r--r--cfg/jarmon-mav.js83
1 files changed, 83 insertions, 0 deletions
diff --git a/cfg/jarmon-mav.js b/cfg/jarmon-mav.js
new file mode 100644
index 0000000..d028753
--- /dev/null
+++ b/cfg/jarmon-mav.js
@@ -0,0 +1,83 @@
+define(['jarmon'], function(jarmon) {
+ var srv = 'https://mav.lukeshu.com/collectd/mav.lukeshu.com/'
+
+ var tabRecipes = [
+ ['Overview', ['load', 'memory']],
+
+ ['CPU', ['load', 'cpu-0']],
+ ['Net', ['interface-ens3', 'interface-lo', 'interface-lvpn']],
+ ];
+
+ var cpu = function(title, baseUrl) {
+ return {
+ title: title,
+ data: [
+ [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 netIface = function(title, baseUrl) {
+ return {
+ title: title,
+ data: [
+ [baseUrl+'if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }],
+ [baseUrl+'if_octets.rrd', 'rx', 'Receive', 'bit/s', function (v) { return v*8; }]
+ ],
+ options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS)
+ };
+ };
+
+ var chartRecipes = {
+ 'cpu-0': cpu("CPU-0 Usage", srv+'cpu-0/'),
+
+ 'interface-ens3': netIface('ens3 Throughput', srv+'interface-ens3/'),
+ 'interface-lo': netIface('lo Throughput', srv+'interface-lo/'),
+ 'interface-lvpn': netIface('lvpn Throughput', srv+'interface-lvpn/'),
+
+ 'load': {
+ title: 'Load Average',
+ 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)', '']
+ ],
+ options: jQuery.extend(true, {},
+ jarmon.Chart.BASE_OPTIONS,
+ {yaxis: {min: 0}})
+ },
+
+ 'memory': {
+ title: 'Memory',
+ 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']
+ ],
+ options: jQuery.extend(true, {},
+ jarmon.Chart.BASE_OPTIONS,
+ jarmon.Chart.STACKED_OPTIONS)
+ },
+
+ };
+
+ return {
+ name: 'mav',
+ chartRecipes,
+ tabRecipes
+ };
+});