4 return L
.Class
.extend({
5 title
: _('Network Plugin Configuration'),
6 description
: _('The network plugin provides network based communication between different collectd instances. Collectd can operate both in client and server mode. In client mode locally collected data is transferred to a collectd server instance, in server mode the local instance receives data from other hosts.'),
8 addFormOptions: function(s
) {
11 o
= s
.option(form
.Flag
, 'enable', _('Enable this plugin'));
14 o
= s
.option(form
.Value
, 'TimeToLive', _('TTL for network packets'));
16 o
.datatype
= 'range(1, 255)';
17 o
.depends('enable', '1');
19 o
= s
.option(form
.Value
, 'MaxPacketSize', _('Maximum packet size'), _('Set the maximum size for datagrams sent over the network'));
20 o
.placeholder
= '1452';
21 o
.datatype
= 'range(1024, 65535)';
22 o
.depends('enable', '1');
24 o
= s
.option(form
.Flag
, 'Forward', _('Enable forwarding'), _('Forwarding between listen and server addresses'));
25 o
.depends('enable', '1');
27 o
= s
.option(form
.Flag
, 'ReportStats', _('Enable statistics'), _('Create statistics about the network plugin itself'));
28 o
.depends('enable', '1');
30 o
= s
.option(form
.SectionValue
, '__listeners', form
.TableSection
, 'collectd_network_listen');
31 o
.title
= _('Listener interfaces');
32 o
.description
= _('This section defines on which interfaces collectd will wait for incoming connections.');
33 o
.depends('enable', '1');
39 o
= ss
.option(form
.Value
, 'host', _('Listen host'));
40 o
.default = '0.0.0.0';
41 o
.datatype
= 'ipaddr("nomask")';
43 o
= ss
.option(form
.Value
, 'port', _('Listen port'));
48 o
= s
.option(form
.SectionValue
, '__servers', form
.TableSection
, 'collectd_network_server');
49 o
.title
= _('Server interfaces');
50 o
.description
= _('This section defines to which servers the locally collected data is sent to.');
51 o
.depends('enable', '1');
57 o
= ss
.option(form
.Value
, 'host', _('Server host'));
58 o
.default = '0.0.0.0';
59 o
.datatype
= 'ipaddr("nomask")';
61 o
= ss
.option(form
.Value
, 'port', _('Server port'));
67 configSummary: function(section
) {
68 return _('Network communication enabled');