Module: check_mk
Branch: master
Commit: 4f2f88b61df403fc288def028b73f10eff81a88d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4f2f88b61df403…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 11 16:15:27 2013 +0100
FIX Fixed logwatch permission check when using liveproxy
When using the liveproxy daemon and logwatch together, the
permission check for non administrative users always failed.
As a result normal users could not access logfiles, which
they should be allowed to see.
---
.werks/206 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/livestatus.py | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/206 b/.werks/206
new file mode 100644
index 0000000..337f305
--- /dev/null
+++ b/.werks/206
@@ -0,0 +1,11 @@
+Title: Fixed logwatch permission check when using liveproxy
+Level: 1
+Component: multisite
+Version: 1.2.3i7
+Date: 1384182853
+Class: fix
+
+When using the liveproxy daemon and logwatch together, the
+permission check for non administrative users always failed.
+As a result normal users could not access logfiles, which
+they should be allowed to see.
diff --git a/ChangeLog b/ChangeLog
index b7cdd8e..734c5d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@
* 0049 FIX: Fixed check-mk-automation call on each new created apache thread...
* 0203 FIX: Changed sidebar reload interval to be more random...
* 0204 FIX: Reduced I/O on logins with access time recording or failed login counts...
+ * 0206 FIX: Fixed logwatch permission check when using liveproxy...
WATO:
* 0053 New rule for configuring the display_name of a service...
diff --git a/web/htdocs/livestatus.py b/web/htdocs/livestatus.py
index 8c5ba3b..f0de1c4 100644
--- a/web/htdocs/livestatus.py
+++ b/web/htdocs/livestatus.py
@@ -672,7 +672,7 @@ class MultiSiteConnection(Helpers):
# Return connection to localhost (UNIX), if available
def local_connection(self):
for sitename, site, connection in self.connections:
- if site["socket"].startswith("unix:"):
+ if site["socket"].startswith("unix:") and "liveproxy" not in site["socket"]:
return connection
raise MKLivestatusConfigError("No livestatus connection to local host")
Module: check_mk
Branch: master
Commit: 3ed9eda63fbba1f6b4f181b764954acf989897f4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3ed9eda63fbba1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 11 09:28:02 2013 +0100
FIX Reduced I/O on logins with access time recording or failed login counts
In previous versions, these optional features were loading the whole user
configuration just to read / change one attribute of one user, which is kept
in a single file. This mechanism has been recoded to only use this single
custom attribute file. Should reduce I/O in large installations during
multisite processing.
---
.werks/204 | 12 +++++++++++
ChangeLog | 1 +
web/htdocs/userdb.py | 55 +++++++++++++++++++++++++-------------------------
3 files changed, 40 insertions(+), 28 deletions(-)
diff --git a/.werks/204 b/.werks/204
new file mode 100644
index 0000000..fbc2294
--- /dev/null
+++ b/.werks/204
@@ -0,0 +1,12 @@
+Title: Reduced I/O on logins with access time recording or failed login counts
+Level: 1
+Component: multisite
+Version: 1.2.3i7
+Date: 1384158368
+Class: fix
+
+In previous versions, these optional features were loading the whole user
+configuration just to read / change one attribute of one user, which is kept
+in a single file. This mechanism has been recoded to only use this single
+custom attribute file. Should reduce I/O in large installations during
+multisite processing.
diff --git a/ChangeLog b/ChangeLog
index 22dfc1f..6df9d74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
* 0046 FIX: Allowing "-" chars in var names again...
* 0049 FIX: Fixed check-mk-automation call on each new created apache thread...
* 0203 FIX: Changed sidebar reload interval to be more random...
+ * 0204 FIX: Reduced I/O on logins with access time recording or failed login counts...
WATO:
* 0053 New rule for configuring the display_name of a service...
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index dab736f..794e64a 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -124,25 +124,14 @@ def user_locked(username):
def update_user_access_time():
if not config.save_user_access_times:
return
-
- users = load_users(lock = True)
- users[html.user]['last_seen'] = time.time()
- save_users(users)
+ save_custom_attr(html.user, 'last_seen', repr(time.time()))
def on_succeeded_login(username):
- users = load_users(lock = True)
- changed = False
+ num_failed = load_custom_attr(username, 'num_failed', saveint)
+ if num_failed != None and num_failed != 0:
+ save_custom_attr(username, 'num_failed', '0')
- if users[username].get('num_failed', 0) != 0:
- users[username]["num_failed"] = 0
- changed = True
-
- if config.save_user_access_times:
- users[username]['last_seen'] = time.time()
- changed = True
-
- if changed:
- save_users(users)
+ update_user_access_time()
def on_failed_login(username):
users = load_users(lock = True)
@@ -303,12 +292,14 @@ def load_users(lock = False):
id = d
# read special values from own files
- for val, conv_func in [ ('num_failed', saveint), ('last_seen', savefloat) ]:
- if id in result:
- try:
- result[id][val] = conv_func(file(dir + d + '/' + val + '.mk').read().strip())
- except IOError:
- pass
+ if id in result:
+ num_failed = load_custom_attr(d, 'num_failed', saveint)
+ if num_failed != None:
+ result[id]['num_failed'] = num_failed
+
+ last_seen = load_custom_attr(d, 'last_seen', savefloat)
+ if last_seen != None:
+ result[id]['last_seen'] = last_seen
# read automation secrets and add them to existing
# users or create new users automatically
@@ -327,6 +318,17 @@ def load_users(lock = False):
return result
+def load_custom_attr(userid, key, conv_func, default = None):
+ basedir = defaults.var_dir + "/web/" + userid
+ try:
+ return conv_func(file(basedir + '/' + key + '.mk').read().strip())
+ except IOError:
+ return default
+
+def save_custom_attr(userid, key, val):
+ basedir = defaults.var_dir + "/web/" + userid
+ create_user_file('%s/%s.mk' % (basedir, key), 'w').write('%s\n' % val)
+
def get_online_user_ids():
online_threshold = time.time() - config.user_online_maxage
users = []
@@ -422,17 +424,14 @@ def save_users(profiles):
os.remove(auth_file)
# Write out the users serial
- serial_file = user_dir + '/serial.mk'
- create_user_file(serial_file, 'w').write('%d\n' % user.get('serial', 0))
+ save_custom_attr(id, 'serial', str(user.get('serial', 0)))
# Write out the users number of failed login
- failed_file = user_dir + '/num_failed.mk'
- create_user_file(failed_file, 'w').write('%d\n' % user.get('num_failed', 0))
+ save_custom_attr(id, 'num_failed', str(user.get('num_failed', 0)))
# Write out the last seent time
if 'last_seen' in user:
- last_seen_file = user_dir + '/last_seen.mk'
- create_user_file(last_seen_file, 'w').write(repr(user['last_seen']) + '\n')
+ save_custom_attr(id, 'last_seen', repr(user['last_seen']))
# Remove settings directories of non-existant users.
# Beware: we removed this since it leads to violent destructions
Module: check_mk
Branch: master
Commit: 1973e8ad61b8c7e8eb1b30ad4b3e2b86c44a5a9b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1973e8ad61b8c7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 11 08:39:01 2013 +0100
FIX Changed sidebar reload interval to be more random
The sidebar is refreshed every 30 seconds. In the past, the
sidebar has been refreshed at the 0th and 30th second of a
minute. With many users, there occured load peaks during
sidebar refresh. This changes the reload to be more random.
---
.werks/203 | 11 +++++++++++
ChangeLog | 1 +
2 files changed, 12 insertions(+)
diff --git a/.werks/203 b/.werks/203
new file mode 100644
index 0000000..bc06b38
--- /dev/null
+++ b/.werks/203
@@ -0,0 +1,11 @@
+Title: Changed sidebar reload interval to be more random
+Level: 1
+Component: multisite
+Version: 1.2.3i7
+Date: 1384155428
+Class: fix
+
+The sidebar is refreshed every 30 seconds. In the past, the
+sidebar has been refreshed at the 0th and 30th second of a
+minute. With many users, there occured load peaks during
+sidebar refresh. This changes the reload to be more random.
diff --git a/ChangeLog b/ChangeLog
index aefd5d7..22dfc1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,7 @@
* 0045 FIX: LDAP: Fixed error when synchronizing non nested groups to roles
* 0046 FIX: Allowing "-" chars in var names again...
* 0049 FIX: Fixed check-mk-automation call on each new created apache thread...
+ * 0203 FIX: Changed sidebar reload interval to be more random...
WATO:
* 0053 New rule for configuring the display_name of a service...
Module: check_mk
Branch: master
Commit: d19d616b50afd4972947496b790fd5c4e6863217
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d19d616b50afd4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 8 14:39:10 2013 +0100
FIX Fixed check-mk-automation call on each new created apache thread
Especially for large installation, with a lot of active users, this
could really lead into performance problems
---
.werks/49 | 9 +++++++++
ChangeLog | 3 ++-
web/plugins/wato/check_mk_configuration.py | 4 ++--
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.werks/49 b/.werks/49
new file mode 100644
index 0000000..d06b2f0
--- /dev/null
+++ b/.werks/49
@@ -0,0 +1,9 @@
+Title: Fixed check-mk-automation call on each new created apache thread
+Level: 1
+Component: multisite
+Version: 1.2.3i7
+Date: 1383917888
+Class: fix
+
+Especially for large installation, with a lot of active users, this
+could really lead into performance problems
diff --git a/ChangeLog b/ChangeLog
index 83964bd..6c7c4a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,10 +18,11 @@
* 0044 FIX: LDAP: Fixed error with empty groups during non nested group sync...
* 0045 FIX: LDAP: Fixed error when synchronizing non nested groups to roles
* 0046 FIX: Allowing "-" chars in var names again...
+ * 0049 FIX: Fixed check-mk-automation call on each new created apache thread...
WATO:
* 0053 New rule for configuring the display_name of a service...
- * 0048 FIX: Fixed locking issue on host diagnose page...
+ * 0048 FIX: Fixed locking issue on host diagnose page
Reporting & Availability:
* 0051 Option for showing timeline directly in availability table...
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index f769830..819720a 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1493,7 +1493,7 @@ def get_snmp_checktypes():
types = [ (cn, (c['title'] != cn and '%s: ' % cn or '') + c['title'])
for (cn, c) in checks.items() if c['snmp'] ]
types.sort()
- return types
+ return [ (None, _('All SNMP Checks')) ] + types
register_rule(group,
"snmp_check_interval",
@@ -1505,7 +1505,7 @@ register_rule(group,
elements = [
DropdownChoice(
title = _("Checktype"),
- choices = [ (None, _('All SNMP Checks')) ] + get_snmp_checktypes(),
+ choices = get_snmp_checktypes,
),
Integer(
title = _("Do check every"),
Module: check_mk
Branch: master
Commit: 5b067aab1669f74568f714cd2a72acc251c9160f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5b067aab1669f7…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Fri Nov 8 22:34:13 2013 +0100
FIX veeam_jobs: check behaviour improved when backup is in progress
---
.werks/66 | 8 ++++++++
ChangeLog | 1 +
checkman/veeam_jobs | 3 ++-
checks/veeam_jobs | 6 ++++--
4 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/.werks/66 b/.werks/66
new file mode 100644
index 0000000..842f528
--- /dev/null
+++ b/.werks/66
@@ -0,0 +1,8 @@
+Title: veeam_jobs: check behaviour improved when backup is in progress
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1383946426
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 733fee5..439e2c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
* 0091 apc_ats_output: new check for output measurements on APC ATS devices
* 0024 FIX: cisco_wlc: removed configuration parameter ap_model
* 0065 FIX: veeam_client: check behaviour improved when backup is in progress
+ * 0066 FIX: veeam_jobs: check behaviour improved when backup is in progress
Multisite:
* 0001 New filters for selecting several host/service-groups at once...
diff --git a/checkman/veeam_jobs b/checkman/veeam_jobs
index e9121e3..fe1dbe2 100644
--- a/checkman/veeam_jobs
+++ b/checkman/veeam_jobs
@@ -10,7 +10,8 @@ description:
comment section of the two Veeam agent plugin scripts on how to install
the scripts.
- This check is {OK} if the result of the backup is {Success}.
+ This check is {OK} if the result of the backup is {Success} or the state
+ of the backup is {Working}..
It is {CRIT} if the result of the backup is {Failed}. It is
{UNKNOWN} in all other cases.
diff --git a/checks/veeam_jobs b/checks/veeam_jobs
index 491cef9..a64fcd9 100644
--- a/checks/veeam_jobs
+++ b/checks/veeam_jobs
@@ -24,17 +24,19 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-state = { "Success": 0, "Failed": 2, "Warning":1, "InProgress":0, "Pending":0 }
def inventory_veeam_jobs(info):
return [ (x[0], None) for x in info ]
-
def check_veeam_jobs(item, params, info):
for line in info:
if line[0] == item:
if line[3] == "Success":
state = 0
+ elif line[2] =="Working":
+ state = 0
+ line.pop(7)
+ line.pop(6)
elif line[3] == "Failed":
state = 2
else: