Merge pull request #3935 from tobiaswaldvogel/luci_app_statistics_add_syslog
luci-app-statistics: add syslog plugin
This commit is contained in:
commit
6e3e8c8d19
3 changed files with 48 additions and 0 deletions
|
@ -0,0 +1,34 @@
|
||||||
|
'use strict';
|
||||||
|
'require baseclass';
|
||||||
|
'require form';
|
||||||
|
|
||||||
|
return baseclass.extend({
|
||||||
|
title: _('Syslog Plugin Configuration'),
|
||||||
|
description: _('The SysLog plugin receives log messages from the daemon and dispatches them to syslog.'),
|
||||||
|
|
||||||
|
addFormOptions: function(s) {
|
||||||
|
var o;
|
||||||
|
|
||||||
|
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
|
||||||
|
|
||||||
|
o = s.option(form.ListValue, 'LogLevel', _('Log level'), _('Sets the syslog log-level.'));
|
||||||
|
o.value('err');
|
||||||
|
o.value('warning');
|
||||||
|
o.value('notice');
|
||||||
|
o.value('info');
|
||||||
|
o.value('debug');
|
||||||
|
o.rmempty=false;
|
||||||
|
o.default = 'warning';
|
||||||
|
|
||||||
|
o = s.option(form.ListValue, 'NotifyLevel', _('Notify level'), _('Controls which notifications should be sent to syslog.'));
|
||||||
|
o.value('FAILURE');
|
||||||
|
o.value('WARNING');
|
||||||
|
o.value('OKAY');
|
||||||
|
o.rmempty=false;
|
||||||
|
o.default = 'WARNING';
|
||||||
|
},
|
||||||
|
|
||||||
|
configSummary: function(section) {
|
||||||
|
return _('Syslog enabled');
|
||||||
|
}
|
||||||
|
});
|
|
@ -42,6 +42,11 @@ config statistics 'collectd_logfile'
|
||||||
config statistics 'collectd_network'
|
config statistics 'collectd_network'
|
||||||
option enable '0'
|
option enable '0'
|
||||||
|
|
||||||
|
config statistics 'collectd_syslog'
|
||||||
|
option enable '0'
|
||||||
|
option LogLevel 'warning'
|
||||||
|
option NotifyLevel 'WARNING'
|
||||||
|
|
||||||
config statistics 'collectd_unixsock'
|
config statistics 'collectd_unixsock'
|
||||||
option enable '0'
|
option enable '0'
|
||||||
option SocketFile '/var/run/collectd/query.sock'
|
option SocketFile '/var/run/collectd/query.sock'
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"title": "Syslog",
|
||||||
|
"category": "output",
|
||||||
|
"legend": [
|
||||||
|
["LogLevel","NotifyLevel"],
|
||||||
|
[],
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue