Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module("luci.statistics.rrdtool.definitions.exec", package.seeall)
- function item()
- return luci.i18n.translate("Exec")
- end
- -- function rrdargs(graph, host, plugin, plugin_instance, dtype)
- function rrdargs(graph, plugin, plugin_instance, dtype)
- -- For $HOSTNAME/exec-foo-bar/temperature_baz-quux.rrd, plugin will be
- -- "exec" and plugin_instance will be "foo-bar". I guess graph will be
- -- "baz-quux"? We may also be ignoring a fourth argument, dtype.
- if "dsldr" == plugin_instance then
- return {
- title = "%H: DSL-Datarate",
- vlabel = "dsldr",
- number_format = "%8.0lf",
- autoscale_max = true,
- data = {
- types = { "gauge" },
- options = {
- gauge_downdr = {
- color = "00ff00",
- title = "Down DataRate",
- overlay = true,
- noarea = false,
- total = false,
- flip = true
- },
- gauge_updr = {
- color = "0000ff",
- title = "Up DataRate",
- overlay = true,
- noarea = false,
- total = false,
- flip = false
- },
- gauge_downadr = {
- color = "B0FF00",
- title = "Down ATTNDR",
- overlay = true,
- noarea = true,
- total = false,
- flip = true
- },
- gauge_upadr = {
- color = "FF00FF",
- title = "Up ATTNDR",
- overlay = true,
- noarea = true,
- total = false
- }
- }
- }
- }
- end
- if "dslsnr" == plugin_instance then
- return {
- title = "%H: DSL-SNR",
- vlabel = "dslsnr",
- number_format = "%8.0lf",
- autoscale_max = true,
- data = {
- types = { "gauge" },
- sources = { gauge = { "down", "up" } },
- options = {
- gauge__down = { color = "00ff00", title = "Down SNR", overlay = true, noarea = false, total = false, flip = true },
- gauge__up = { color = "0000ff", title = "Up SNR", overlay = true, noarea = false, total = false }
- }
- }
- }
- end
- if "dslerr" == plugin_instance then
- return {
- title = "%H: DSL-Errors",
- vlabel = "dslerr",
- number_format = "%8.0lf",
- autoscale_max = true,
- data = {
- types = { "gauge" },
- options = {
- gauge_loss = { color = "00FF00", title = "LOSS", overlay = true, noarea = true, total = false },
- gauge_uas = { color = "0000FF", title = "UAS", overlay = true, noarea = true, total = false },
- gauge_f_loss = { color = "FF8000", title = "Far LOSS", overlay = true, noarea = true, total = false, flip = true },
- gauge_f_uas = { color = "FF00FF", title = "Far UAS", overlay = true, noarea = true, total = false, flip = true }
- }
- }
- }
- end
- if "dslcrc" == plugin_instance then
- return {
- title = "%H: DSL-CRC-Errors",
- vlabel = "dslcrc",
- number_format = "%8.0lf",
- autoscale_max = true,
- data = {
- types = { "gauge" },
- options = {
- gauge_crc = { color = "00FF00", title = "CRC", overlay = true, noarea = true, total = false },
- gauge_crcp = { color = "0000FF", title = "CRC-p", overlay = true, noarea = true, total = false },
- gauge_f_crc = { color = "FF8000", title = "Far CRC", overlay = true, noarea = true, total = false, flip = true },
- gauge_f_crcp = { color = "FF00FF", title = "Far CRC-p", overlay = true, noarea = true, total = false, flip = true }
- }
- }
- }
- end
- if "dslfec" == plugin_instance then
- return {
- title = "%H: DSL-FEC-Errors",
- vlabel = "dslfec",
- number_format = "%8.0lf",
- autoscale_max = true,
- data = {
- types = { "gauge" },
- options = {
- gauge_fec = { color = "00FF00", title = "FEC", overlay = true, noarea = true, total = false },
- gauge_f_fec = { color = "FF8000", title = "Far FEC", overlay = true, noarea = true, total = false, flip = true },
- }
- }
- }
- end
- if "dsles" == plugin_instance then
- return {
- title = "%H: DSL--Errored-Seconds",
- vlabel = "dsles",
- number_format = "%8.0lf",
- autoscale_max = true,
- data = {
- types = { "gauge" },
- options = {
- gauge_es = { color = "00FF00", title = "ES", overlay = true, noarea = true, total = false },
- gauge_ses = { color = "0000FF", title = "SES", overlay = true, noarea = true, total = false },
- gauge_f_es = { color = "FF8000", title = "Far ES", overlay = true, noarea = true, total = false, flip = true },
- gauge_f_ses = { color = "FF00FF", title = "Far SES", overlay = true, noarea = true, total = false, flip = true }
- }
- }
- }
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement