1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
'use strict';
'require baseclass';
'require form';
return baseclass.extend({
title: _('Chrony Plugin Configuration'),
description: _('The chrony plugin will monitor chrony NTP server statistics'),
addFormOptions(s) {
let o;
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
o = s.option(form.Value, 'Host', _('Host running chrony'),
_('Possibly bug in collectd. Only 127.0.0.1 and localhost work'));
o.default = '127.0.0.1';
o.datatype = 'or(hostname,ipaddr("nomask"))';
o.depends('enable', '1');
o = s.option(form.Value, 'Port', _('Port for chronyd'));
o.default = '323';
o.datatype = 'port';
o.depends('enable', '1');
o = s.option(form.Value, 'Timeout', _('Timeout for polling chrony'), _('Seconds'));
o.default = '2';
o.datatype = 'range(0, 255)';
o.depends('enable', '1');
},
configSummary(section) {
return _('Chrony monitoring enabled');
}
});
|