5 return baseclass
.extend({
6 title
: _('Network Plugin Configuration'),
7 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.'),
9 addFormOptions: function(s
) {
12 o
= s
.option(form
.Flag
, 'enable', _('Enable this plugin'));
15 o
= s
.option(form
.Value
, 'TimeToLive', _('TTL for network packets'));
17 o
.datatype
= 'range(1, 255)';
18 o
.depends('enable', '1');
20 o
= s
.option(form
.Value
, 'MaxPacketSize', _('Maximum packet size'), _('Set the maximum size for datagrams sent over the network'));
21 o
.placeholder
= '1452';
22 o
.datatype
= 'range(1024, 65535)';
23 o
.depends('enable', '1');
25 o
= s
.option(form
.Flag
, 'Forward', _('Enable forwarding'), _('Forwarding between listen and server addresses'));
26 o
.depends('enable', '1');
28 o
= s
.option(form
.Flag
, 'ReportStats', _('Enable statistics'), _('Create statistics about the network plugin itself'));
29 o
.depends('enable', '1');
31 o
= s
.option(form
.SectionValue
, '__listeners', form
.TableSection
, 'collectd_network_listen');
32 o
.title
= _('Listener interfaces');
33 o
.description
= _('This section defines on which interfaces collectd will wait for incoming connections.');
34 o
.depends('enable', '1');
40 o
= ss
.option(form
.Value
, 'host', _('Listen host'));
41 o
.default = '0.0.0.0';
42 o
.datatype
= 'ipaddr("nomask")';
44 o
= ss
.option(form
.Value
, 'port', _('Listen port'));
49 o
= s
.option(form
.SectionValue
, '__servers', form
.TableSection
, 'collectd_network_server');
50 o
.title
= _('Server interfaces');
51 o
.description
= _('This section defines to which servers the locally collected data is sent to.');
52 o
.depends('enable', '1');
58 o
= ss
.option(form
.Value
, 'host', _('Server host'));
59 o
.default = '0.0.0.0';
60 o
.datatype
= 'ipaddr("nomask")';
62 o
= ss
.option(form
.Value
, 'port', _('Server port'));
68 configSummary: function(section
) {
69 return _('Network communication enabled');