luci-app-statistics: conntrack: add percent usage graph
The existing graph shows a conntrack entry usage value but doesn't show a conntrack table size figure so you don't know if you're close to filling the table. Add a percent usage graph to show conntrack table percent used. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
This commit is contained in:
parent
663134cd2d
commit
7b52ff85a7
1 changed files with 22 additions and 1 deletions
|
@ -6,7 +6,7 @@ return L.Class.extend({
|
||||||
title: _('Conntrack'),
|
title: _('Conntrack'),
|
||||||
|
|
||||||
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
|
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
|
||||||
return {
|
var entries = {
|
||||||
title: "%H: Conntrack entries",
|
title: "%H: Conntrack entries",
|
||||||
vlabel: "Count",
|
vlabel: "Count",
|
||||||
number_format: "%5.0lf",
|
number_format: "%5.0lf",
|
||||||
|
@ -26,5 +26,26 @@ return L.Class.extend({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var percent = {
|
||||||
|
title: "%H: Conntrack usage",
|
||||||
|
vlabel: "Percent",
|
||||||
|
number_format: "%5.1lf%%",
|
||||||
|
y_min: "0",
|
||||||
|
alt_autoscale_max: true,
|
||||||
|
data: {
|
||||||
|
instances: {
|
||||||
|
percent: [ "used" ]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
percent_used: {
|
||||||
|
color: "00ff00",
|
||||||
|
title: "Used"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return [ entries, percent ];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue