9c54f5c9148fa0d24e57b2eab09cb1195173d9f4
[project/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 alt_autoscale_max: true,
37 data: {
38 instances: {
39 percent: [ "used" ]
40 },
41 options: {
42 percent_used: {
43 color: "00ff00",
44 title: "Used"
45 }
46 }
47 }
48 };
49
50 return [ entries, percent ];
51 }
52 });