Module: check_mk
Branch: master
Commit: c25a8a6b4b4eb850259ae98b88cc57084872b228
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c25a8a6b4b4eb8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon May 7 11:16:37 2012 +0200
Fixed declaration of BI aggregations since weekends changes
---
web/htdocs/config.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index 462c20f..89b9de4 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -78,6 +78,12 @@ class FOREACH_HOST: pass
class FOREACH_SERVICE: pass
class REMAINING: pass
+# Has to be declared here once since the functions can be assigned in
+# bi.py and also in multisite.mk. "Double" declarations are no problem
+# here since this is a dict (List objects have problems with duplicate
+# definitions).
+aggregation_functions = {}
+
# .----------------------------------------------------------------------.
# | _____ _ _ |
@@ -533,7 +539,6 @@ def load_default_values(into):
#
into["aggregation_rules"] = {}
into["aggregations"] = []
- into["aggregation_functions"] = {}
# __ ___ _____ ___
# \ \ / / \|_ _/ _ \
Module: check_mk
Branch: master
Commit: af1f6fff3f2dc2de7465a0fb0254c6789d543fe0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=af1f6fff3f2dc2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon May 7 10:58:20 2012 +0200
FIX: Logwatch handles logs with only OK lines in it correctly in logfile list views
---
ChangeLog | 1 +
web/htdocs/logwatch.py | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 697321a..0b5956b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@
Multisite:
* FIX: fixed filter of recent event views (4 hours didn't catch)
* FIX: convert more buttons to new graphical style
+ * FIX: Logwatch handles logs with only OK lines in it correctly in logfile list views
Mobile GUI:
* FIX: commands can be executed again
diff --git a/web/htdocs/logwatch.py b/web/htdocs/logwatch.py
index b72b8fc..a3dce57 100644
--- a/web/htdocs/logwatch.py
+++ b/web/htdocs/logwatch.py
@@ -257,7 +257,7 @@ def get_worst_log(logs):
for log in logs:
for line in log['lines']:
- if line['level'] > worst_level:
+ if line['level'] >= worst_level:
worst_level = line['level']
worst_log = log
Module: check_mk
Branch: master
Commit: 18d955d419ad3badd80dfee812d77bb9e2d55566
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=18d955d419ad3b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 20:27:46 2012 +0200
Used tmp-file for POST data if too large for command line
---
ChangeLog | 2 +-
web/htdocs/wato.py | 17 +++++++++++++++--
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 964da72..3b270a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,7 @@
* FIX: better error message if not logged into site during
action that needs remote access
* FIX: send automation data via POST not GET. This fixes inventory
- on hosts with up to 2000 services
+ on hosts with more than 500 services.
Multisite:
* FIX: fixed filter of recent event views (4 hours didn't catch)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2f9511f..a6d167e 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6657,9 +6657,22 @@ def get_url(url, insecure, user=None, password=None, params = '', post_data = No
# -s: silent
# -S: show errors
# -w '%{http_code}': add the http status code to the end of the output
- command = 'curl -w "\n%%{http_code}" -s -S%s%s%s "%s" 2>&1' % (insecure, cred, params, url)
+ command = 'curl -w "\n%%{http_code}" -s -S%s%s%s "%s" 2>&1' % (
+ insecure, cred, params, url)
+ tmp_file = None
if post_data != None:
- command += ' --data-binary "%s"' % post_data
+ # Put POST data on command line as long as it is not
+ # longer than 50 KB (remember: Linux has an upper limit
+ # of 132 KB for command line plus environment
+ if len(post_data) < 50000:
+ command += ' --data-binary "%s"' % post_data
+ else:
+ import tempfile
+ tmp_file = tempfile.NamedTemporaryFile(dir = defaults.tmp_dir)
+ tmp_file.write(post_data)
+ tmp_file.flush()
+ command += ' --data-binary "@%s"' % tmp_file.name
+
response = os.popen(command).read().strip()
try:
status_code = int(response[-3:])
Module: check_mk
Branch: master
Commit: 326f1c94da055c40898cd5e9ae4651bc8c1a38bb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=326f1c94da055c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 20:27:27 2012 +0200
Updated bug entries #0672
---
.bugs/672 | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/672 b/.bugs/672
index c41ef77..e53c665 100644
--- a/.bugs/672
+++ b/.bugs/672
@@ -1,9 +1,9 @@
Title: Hosts with 4.000 services in replicated WATO fail
Component: wato
-State: open
+Class: bug
+State: done
Date: 2012-04-06 11:23:12
Targetversion: 1.2.0
-Class: bug
When a host has many services and you save a manual check
configuration for a host on a slave site, then the command
@@ -12,3 +12,6 @@ a useful error message.
Solution: put the post data into a tmp file (yurks) - optimally
only if it is too large.
+
+2012-05-06 20:27:23: changed state open -> done
+Works now (tested) with 10.000 services on one host.
Module: check_mk
Branch: master
Commit: f67c8f0b14c072634d4f9f79bdaa870df626b4e4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f67c8f0b14c072…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun May 6 19:53:35 2012 +0200
Updated bug entries #0672
---
.bugs/672 | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.bugs/672 b/.bugs/672
index 723cd0a..c41ef77 100644
--- a/.bugs/672
+++ b/.bugs/672
@@ -1,4 +1,4 @@
-Title: Hosts with many services in replicated WATO -> Request-URI Too Large
+Title: Hosts with 4.000 services in replicated WATO fail
Component: wato
State: open
Date: 2012-04-06 11:23:12
@@ -6,7 +6,9 @@ Targetversion: 1.2.0
Class: bug
When a host has many services and you save a manual check
-configuration for a host on a slave site, then the internal
-web services the remotely does inventory creates a too large
-URL. Either convert this to POST or send the list of
-services as a Python object as the body of the request.
+configuration for a host on a slave site, then the command
+line for curl is getting too large. This does not even output
+a useful error message.
+
+Solution: put the post data into a tmp file (yurks) - optimally
+only if it is too large.