Module: check_mk
Branch: master
Commit: 9c9ecbff3dc93627e449b0731aef1832db2c9d6f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9c9ecbff3dc936…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 19 20:34:07 2016 +0100
4143 FIX Fixed possible log spam "MKAuthException: Invalid credentials" in web.log
When having multiple independent sites on one system, a log flood (one entry
for each request) may happen when having cookies from both sites to var/log/web.log.
Change-Id: Ie6863b2f527952421b2db5fc767638ca5e3106ee
---
.werks/4143 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/login.py | 5 +++++
3 files changed, 16 insertions(+)
diff --git a/.werks/4143 b/.werks/4143
new file mode 100644
index 0000000..82b0d8d
--- /dev/null
+++ b/.werks/4143
@@ -0,0 +1,10 @@
+Title: Fixed possible log spam "MKAuthException: Invalid credentials" in web.log
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.4.0i4
+Date: 1482175956
+Class: fix
+
+When having multiple independent sites on one system, a log flood (one entry
+for each request) may happen when having cookies from both sites to var/log/web.log.
diff --git a/ChangeLog b/ChangeLog
index 44bf361..fc25104 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
Multisite:
* 4169 View action: Default values of sticky, notification and persistent options can now be configured via global settings....
+ * 4143 FIX: Fixed possible log spam "MKAuthException: Invalid credentials" in web.log...
WATO:
* 4142 New extended search dialog for rulesets and rules...
diff --git a/web/htdocs/login.py b/web/htdocs/login.py
index 70e86bd..3ba592c 100644
--- a/web/htdocs/login.py
+++ b/web/htdocs/login.py
@@ -313,6 +313,11 @@ def check_auth_by_cookie():
try:
set_auth_type("cookie")
return check_auth_cookie(cookie_name)
+ except MKAuthException:
+ # Suppress cookie validation errors from other sites cookies
+ if config.debug:
+ logger(LOG_ERR, 'Exception while checking cookie %s: %s' %
+ (cookie_name, traceback.format_exc()))
except Exception, e:
logger(LOG_ERR, 'Exception while checking cookie %s: %s' %
(cookie_name, traceback.format_exc()))
Module: check_mk
Branch: master
Commit: 1e246379fa59f294e0fcad2680d79e0a54e6de66
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1e246379fa59f2…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Dec 20 08:00:12 2016 +0100
Unbreak configuration files.
Change-Id: I277202d086847aea55f56d1d81400e7a1a2fb4e3
---
scripts/setup.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/setup.sh b/scripts/setup.sh
index 51dc654..61fa0c6 100755
--- a/scripts/setup.sh
+++ b/scripts/setup.sh
@@ -804,9 +804,9 @@ do
chgrp $wwwgroup $DESTDIR$confdir/conf.d/distributed_wato.mk &&
chmod 664 $DESTDIR$confdir/conf.d/distributed_wato.mk
fi &&
- echo -e "# Main configuration file of Check_MK\nWe highly recommend to use WATO to configure Check_MK these days." \
+ echo -e "# Main configuration file of Check_MK\n#We highly recommend to use WATO to configure Check_MK these days." \
> $DESTDIR$confdir/main.mk-$VERSION &&
- echo -e "# Main configuration file of the Check_MK GUI\nWe highly recommend to use WATO to configure Check_MK these days." \
+ echo -e "# Main configuration file of the Check_MK GUI\n#We highly recommend to use WATO to configure Check_MK these days." \
> $DESTDIR$confdir/multisite.mk-$VERSION &&
if [ -e $DESTDIR$confdir/check_mk.cfg -a ! -e $DESTDIR$confdir/main.mk ] ; then
mv -v $DESTDIR$confdir/check_mk.cfg $DESTDIR$confdir/main.mk
events are limited
Message-ID: <5857ed49.+d+F7LOul18Ijqaq%mk(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 4a38c21659247aeb8e1a6b81c21ce2ec233a7136
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4a38c21659247a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 19 15:23:00 2016 +0100
Fix wording in global EC settings: not "open" but "current" events are limited
Change-Id: I41a591fbf6e5e8bbc1b1a4ec259c28c009777e99
---
web/plugins/wato/mkeventd.py | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/web/plugins/wato/mkeventd.py b/web/plugins/wato/mkeventd.py
index b3b95b6..b111de1 100644
--- a/web/plugins/wato/mkeventd.py
+++ b/web/plugins/wato/mkeventd.py
@@ -2473,19 +2473,19 @@ if mkeventd_enabled:
register_configvar(groups["ec"],
"event_limit",
Dictionary(
- title = _("Limit amount of open events"),
+ title = _("Limit amount of current events"),
help = _("This option helps you to protect the Event Console from resoure "
- "problems which may occur in case of too many open events at the "
+ "problems which may occur in case of too many current events at the "
"same time."),
elements = [
("by_host", Dictionary(
title = _("Host limit"),
- help = _("You can limit the number of open events created by a single "
+ help = _("You can limit the number of current events created by a single "
"host here. This is meant to "
"prevent you from message storms created by one device.<br>"
"Once the limit is reached, the Event Console will block "
"all future incoming messages sent by this host until the "
- "number of open "
+ "number of current "
"events has been reduced to be below this limit. In the "
"moment the limit is reached, the Event Console will notify "
"the configured contacts of the host."),
@@ -2494,7 +2494,7 @@ if mkeventd_enabled:
title = _("Limit"),
minvalue = 1,
default_value = 1000,
- unit = _("open events"),
+ unit = _("current events"),
)),
("action", vs_ec_event_limit_actions("notify contacts of the host")),
],
@@ -2502,11 +2502,11 @@ if mkeventd_enabled:
)),
("by_rule", Dictionary(
title = _("Rule limit"),
- help = _("You can limit the number of open events created by a single "
+ help = _("You can limit the number of current events created by a single "
"rule here. This is meant to "
"prevent you from too generous rules creating a lot of events.<br>"
"Once the limit is reached, the Event Console will stop the rule "
- "creating new open events until the number of open "
+ "creating new current events until the number of current "
"events has been reduced to be below this limit. In the "
"moment the limit is reached, the Event Console will notify "
"the configured contacts of the rule or create a notification "
@@ -2516,19 +2516,19 @@ if mkeventd_enabled:
title = _("Limit"),
minvalue = 1,
default_value = 1000,
- unit = _("open events"),
+ unit = _("current events"),
)),
("action", vs_ec_event_limit_actions("notify contacts in rule or fallback contacts")),
],
optional_keys = [],
)),
("overall", Dictionary(
- title = _("Overall open events"),
- help = _("To protect you against a continously growing list of open "
+ title = _("Overall current events"),
+ help = _("To protect you against a continously growing list of current "
"events created by different hosts or rules, you can configure "
- "this overall limit of open events. All currently open events "
+ "this overall limit of current events. All currently current events "
"are counted and once the limit is reached, no further events "
- "will be opened which means that new incoming messages will be "
+ "will be currented which means that new incoming messages will be "
"dropped. In the moment the limit is reached, the Event Console "
"will create a notification with empty contact information."),
elements = [
@@ -2536,7 +2536,7 @@ if mkeventd_enabled:
title = _("Limit"),
minvalue = 1,
default_value = 10000,
- unit = _("open events"),
+ unit = _("current events"),
)),
("action", vs_ec_event_limit_actions("notify all fallback contacts")),
],