Skip to content

Instantly share code, notes, and snippets.

@wd
Created December 12, 2021 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wd/561a49465c15b55ae7cb6181cc6afc32 to your computer and use it in GitHub Desktop.
Save wd/561a49465c15b55ae7cb6181cc6afc32 to your computer and use it in GitHub Desktop.
Create exec graph for OpenWrt
'use strict';
'require baseclass';
return baseclass.extend({
title: _('Exec'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
// host: Tux
// plugin: exec
// plugin_instance: wireguard
// dtype: null
var wireguard_last_handshake_time = {
title: "%H: wireguard last handshake time",
vlabel: "seconds",
alt_autoscale_max: true,
data: {
types: ["gauge"],
options: {
gauge_last_handshake_wg0: {
color: "ff0000",
// noavg: true,
noarea: true,
// overlay: true,
// flip: true,
title: "wg0"
},
gauge_last_handshake_wg1: {
color: "0000ff",
// noavg: true,
noarea: true,
title: "wg1"
}
}
}
};
return wireguard_last_handshake_time;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment