Module: check_mk
Branch: master
Commit: e97d86fafa79a4c342b5c4cbe9970c3a4ff5de4a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e97d86fafa79a4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jun 3 09:55:13 2015 +0200
#2333 The Event Console log level can now be configured via GUI
The more verbose logging of the mkeventd, which could previously only
be enabled using the command line, can now be configured using the
Event Console Settings in the GUI.
---
.werks/2333 | 11 +++++++++++
ChangeLog | 3 +++
mkeventd/bin/mkeventd | 3 ++-
mkeventd/web/plugins/config/mkeventd.py | 1 +
mkeventd/web/plugins/wato/mkeventd.py | 16 ++++++++++++++++
5 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/.werks/2333 b/.werks/2333
new file mode 100644
index 0000000..99ecf17
--- /dev/null
+++ b/.werks/2333
@@ -0,0 +1,11 @@
+Title: The Event Console log level can now be configured via GUI
+Level: 1
+Component: ec
+Compatible: compat
+Version: 1.2.7i2
+Date: 1433318056
+Class: feature
+
+The more verbose logging of the mkeventd, which could previously only
+be enabled using the command line, can now be configured using the
+Event Console Settings in the GUI.
diff --git a/ChangeLog b/ChangeLog
index 8178937..b8dcb42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
* 2261 FIX: Fixed wrong pnp template cache path in non OMD environments...
* 2262 FIX: Fixed deletion of foreign views/dashboards...
+ Event Console:
+ * 2333 The Event Console log level can now be configured via GUI...
+
1.2.7i1:
Core & Setup:
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index e2b8a9f..1b099b2 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -201,7 +201,7 @@ def log(text):
sys.stderr.write("%s\n" % text)
def verbose(text):
- if opt_verbose:
+ if opt_verbose or g_config['log_level']:
log(text)
g_regex_cache = {}
@@ -3559,6 +3559,7 @@ def load_configuration():
"actions" : [],
"debug_rules" : False,
"rule_optimizer" : True,
+ "log_level" : 0,
"log_rulehits" : False,
"log_messages" : False,
"retention_interval" : 60,
diff --git a/mkeventd/web/plugins/config/mkeventd.py
b/mkeventd/web/plugins/config/mkeventd.py
index 24c4ecc..8bd2739 100644
--- a/mkeventd/web/plugins/config/mkeventd.py
+++ b/mkeventd/web/plugins/config/mkeventd.py
@@ -31,6 +31,7 @@ mkeventd_notify_facility = 16
mkeventd_notify_remotehost = None
mkeventd_connect_timeout = 10
debug_mkeventd_queries = False
+log_level = 0
log_rulehits = False
rule_optimizer = True
diff --git a/mkeventd/web/plugins/wato/mkeventd.py
b/mkeventd/web/plugins/wato/mkeventd.py
index 6cb2e8d..14203a2 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -2298,6 +2298,22 @@ if mkeventd_enabled:
)
register_configvar(group,
+ "log_level",
+ DropdownChoice(
+ choices = [
+ (0, _("Normal logging")),
+ (1, _("Verbose logging")),
+ ],
+ default_value = 0,
+ ),
+ title = _("Log level"),
+ help = _("You can configure the mkeventd to log more details about it's
actions. "
+ "These information are logged into the file
<tt>%s</tt>") %
+ site_neutral_path(defaults.log_dir +
"/mkeventd.log"),
+ domain = "mkeventd",
+ )
+
+ register_configvar(group,
"log_rulehits",
Checkbox(title = _("Log rule hits"),
label = _("Log hits for rules in log of mkeventd"),