]> git.99rst.org Git - openwrt-luci.git/blob
35951dffba59998498e866d2c5c693330369cd21
[openwrt-luci.git] /
1 /* Licensed to the public under the Apache License 2.0. */
2
3 'use strict';
4 'require baseclass';
5
6 return baseclass.extend({
7 title: _('Conntrack'),
8
9 rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
10 var entries = {
11 title: "%H: Conntrack entries",
12 vlabel: "Count",
13 number_format: "%5.0lf",
14 data: {
15 /* collectd 5.5+: specify "" to exclude "max" instance */
16 instances: {
17 conntrack: [ "" ]
18 },
19 sources: {
20 conntrack: [ "value" ]
21 },
22 options: {
23 conntrack: {
24 color: "0000ff",
25 title: "Tracked connections"
26 }
27 }
28 }
29 };
30
31 var percent = {
32 title: "%H: Conntrack usage",
33 vlabel: "Percent",
34 number_format: "%5.1lf%%",
35 y_min: "0",
36 y_max: "2",
37 alt_autoscale_max: true,
38 data: {
39 instances: {
40 percent: [ "used" ]
41 },
42 options: {
43 percent_used: {
44 color: "00ff00",
45 title: "Used"
46 }
47 }
48 }
49 };
50
51 return [ entries, percent ];
52 }
53 });
git clone https://git.99rst.org/PROJECT