summaryrefslogtreecommitdiff
path: root/cfg/jarmon-winston.js
diff options
context:
space:
mode:
Diffstat (limited to 'cfg/jarmon-winston.js')
-rw-r--r--cfg/jarmon-winston.js58
1 files changed, 18 insertions, 40 deletions
diff --git a/cfg/jarmon-winston.js b/cfg/jarmon-winston.js
index 13f7c64..0d36940 100644
--- a/cfg/jarmon-winston.js
+++ b/cfg/jarmon-winston.js
@@ -1,19 +1,13 @@
-/* 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.
- */
define(['jarmon'], function(jarmon) {
var srv = 'https://winston.parabola.nu/collectd/winston.parabola.nu/'
var tabRecipes = [
['Overview', ['load', 'memory', 'swap-use', 'df-vda3', 'df-vda4', 'systemd-units', 'systemd-jobs', 'uptime']],
- ['CPU', ['load', 'cpu-0', 'cpu-1', 'cpu-2', 'cpu-3', 'cpu-4', 'cpu-5', 'cpu-6', 'cpu-7', 'uptime']],
+ ['CPU', ['load', 'cpu-0', 'cpu-1', 'uptime']],
['Disk', ['df-vda3', 'df-vda4', 'uptime']],
['Memory', ['memory', 'swap-use', 'swap-io', 'uptime']],
- ['Net', ['interface-eth0', 'interface-lo', 'interface-lvpn', 'uptime']],
+ ['Net', ['interface-eth0', 'interface-lo', 'interface-lvpn', 'interface-sit0', 'interface-tunnelipv6', 'uptime']],
['Other', ['entropy', 'uptime', 'users', 'uptime']],
];
@@ -38,15 +32,20 @@ define(['jarmon'], function(jarmon) {
};
};
+ 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/'),
'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",
@@ -82,32 +81,11 @@ define(['jarmon'], function(jarmon) {
{series: {lines: {fill: 0.5}}})
},
- 'interface-eth0': {
- title: 'eth0 Throughput',
- data: [
- [srv+'interface-eth0/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }],
- [srv+'interface-eth0/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: [
- [srv+'interface-lo/if_octets.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return -v*8; }],
- [srv+'interface-lo/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: [
- [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)
- },
+ 'interface-eth0': netIface('eth0 Throughput', srv+'interface-eth0/'),
+ 'interface-lo': netIface('lo Throughput', srv+'interface-lo/'),
+ 'interface-lvpn': netIface('lvpn Throughput', srv+'interface-lvpn/'),
+ 'interface-sit0': netIface('sit0 Throughput', srv+'interface-sit0/'),
+ 'interface-tunnelipv6': netIface('tunnelipv6 Throughput', srv+'interface-tunnelipv6/'),
'load': {
title: 'Load Average',