Module: check_mk
Branch: master
Commit: 1b56dd316654076e4d74a3d7d78e36feb6fc9be2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1b56dd31665407…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 17 14:02:36 2013 +0100
Fixed wrong infos in doku
---
.bugs/881 | 7 +++++--
checkman/fileinfo.groups | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/.bugs/881 b/.bugs/881
index 8f79cc3..46d324c 100644
--- a/.bugs/881
+++ b/.bugs/881
@@ -1,9 +1,9 @@
Title: Manpage of fileinfo outdated
Component: docu
-State: open
+Class: bug
+State: done
Date: 2012-11-22 12:21:55
Targetversion: 1.2.2
-Class: bug
The man page of fileinfo is not uptodate: The linux agent now
supports fileinfo. Also the configuration of that should be
@@ -11,3 +11,6 @@ described here.
The man page of fileinfo.groups: do we really have regular expressions?
It does not seem to work...
+
+2013-01-17 14:02:22: changed state open -> done
+Has just been fixed.
diff --git a/checkman/fileinfo.groups b/checkman/fileinfo.groups
index edf48bb..8fcbc12 100644
--- a/checkman/fileinfo.groups
+++ b/checkman/fileinfo.groups
@@ -1,5 +1,5 @@
title: Check age, size and count of a group of files
-agents: windows
+agents: windows, linux
author: Bastian Kuhn <bk(a)mathias-kettner.de>
license: GPL
distribution: check_mk
@@ -23,7 +23,7 @@ item:
examples:
fileinfo_groups = [
- ([("Auth_group",r"/var/log/auth.*")], ALL_HOSTS),
+ ([("Auth_group",r"/var/log/auth*")], ALL_HOSTS),
([("Message_group", r"/var/log/messages*")], ['test2'], ALL_HOSTS),
]
Module: check_mk
Branch: master
Commit: a677423faf897e15f79179e800d684c8138af098
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a677423faf897e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 17 13:59:51 2013 +0100
Added linux related infos to fileinfo manpage
---
checkman/fileinfo | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/checkman/fileinfo b/checkman/fileinfo
index 2b8ed98..506362d 100644
--- a/checkman/fileinfo
+++ b/checkman/fileinfo
@@ -1,5 +1,5 @@
title: Check age and size of files
-agents: windows
+agents: windows, linux
author: Mathias Kettner <mk(a)mathias-kettner.de>
license: GPL
distribution: check_mk
@@ -15,14 +15,20 @@ description:
as the agent needs to know the information about
which files need to be sent.
- Currently only the Windows agent supports this type
- of check. Configuration is done in {check_mk.ini} in
- the section {[fileinfo]}. Put one or more entries
- of the format {path = C:\Some Dir\*.log} into this
+ Currently the linux and windows agents supports this type
+ of check.
+
+ For windows, the configuration is done in {check_mk.ini} in
+ the section {[fileinfo]}. Put one or more entries of the
+ format {path = C:\Some Dir\*.log} into this
section. The agent will send all files that match
the pattern. Wildcards are only allowed in the
filename part, not in the directory path.
+ For linux, the configuration is done via {fileinfo.cfg} located
+ in the {$MK_CONFDIR} (usually {/etc/check_mk/fileinfo.cfg}).
+ To add files to the check, simply add one path pattern per line.
+
item:
The complete path name of the file as sent by
the agent (this is case sensitive even when monitoring
Module: check_mk
Branch: master
Commit: 1aee94e80c947bf3ab0fd5c4f43d6900bd2fb985
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1aee94e80c947b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 17 13:08:43 2013 +0100
FIX: LDAP: Fixed encoding problem of ldap retrieved usernames
---
ChangeLog | 1 +
web/htdocs/userdb.py | 3 +++
web/plugins/userdb/ldap.py | 4 ++--
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e09e3fe..f009631 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
contactgroup sync plugin enabled
* FIX: LDAP: OpenLDAP - Changed default filter for users
* FIX: LDAP: OpenLDAP - Using uniqueMember instead of member when searching for groups of a user
+ * FIX: LDAP: Fixed encoding problem of ldap retrieved usernames
* LDAP: Role sync plugin validates the given group DNs with the group base dn now
* LDAP: Using roles defined in default user profile in role sync plugin processing
* LDAP: Improved error handling in case of misconfigurations
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 843994c..2699f6c 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -472,6 +472,9 @@ def hook_login(username, password):
# False -> failed
if result not in [ False, None ]:
username = result
+ if type(username) != str:
+ raise MKInternalError(_("The username returned by the %s "
+ "connector is not of type string (%r).") % (connector['id'], username))
# Check wether or not the user exists (and maybe create it)
create_non_existing_user(connector['id'], username)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index bc5469a..b812658 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -35,7 +35,7 @@ except:
pass
from lib import *
-g_ladp_user_cache = {}
+g_ldap_user_cache = {}
g_ldap_group_cache = {}
# File for storing the time of the last success event
@@ -571,7 +571,7 @@ def ldap_login(username, password):
# authentication which should be rebound again after trying this.
try:
ldap_bind(user_dn, password)
- result = username
+ result = username.encode('utf-8')
except:
result = False
Module: check_mk
Branch: master
Commit: b8c1e0365c03bc40967094b8c8290fd8dc331a72
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b8c1e0365c03bc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 17 12:24:08 2013 +0100
FIX: megaraid_bbu - Handle missing charge information (ignoring them)
---
ChangeLog | 1 +
checks/megaraid_bbu | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b00924e..e09e3fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
* Logwatch: unknown eventlog level ('u') from windows agent treated as warning
* FIX: logwatch_ec: Added state undefined as priority
* Add: mailman_lists - New check to gather statistics of mailman mailinglists
+ * FIX: megaraid_bbu - Handle missing charge information (ignoring them)
Multisite:
* FIX: Fixed rendering of dashboard globes in opera
diff --git a/checks/megaraid_bbu b/checks/megaraid_bbu
index be2f9b2..dda2c4c 100644
--- a/checks/megaraid_bbu
+++ b/checks/megaraid_bbu
@@ -79,8 +79,10 @@ def check_megaraid_bbu(item, _no_params, info):
broken = []
state = 0
# get current charge level
- charge = (", Charge is %s" % controller['Relative State of Charge'])
-
+ if 'Relative State of Charge' not in controller:
+ charge = ", No charge information were reported for this controller"
+ else:
+ charge = ", Charge is %s" % controller['Relative State of Charge']
# verify defined important parameters to current level
for varname, (refvalue, refstate) in megaraid_bbu_refvalues.items():
Module: check_mk
Branch: master
Commit: f4133ad90e954f3062294f1969d565cd4d828bab
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f4133ad90e954f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 17 12:11:07 2013 +0100
Updated bug entries #0823
---
.bugs/823 | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/823 b/.bugs/823
index 4e28cf2..5d23984 100644
--- a/.bugs/823
+++ b/.bugs/823
@@ -1,8 +1,11 @@
Title: Cloned ruleset apears always in Main Directory
Component: wato
-State: open
+Class: bug
+State: done
Date: 2013-01-11 16:11:04
Targetversion: 1.2.2
-Class: bug
If a rule is cloned, the new rule always is created in the Main Directory
+
+2013-01-17 12:11:02: changed state open -> done
+Has just been fixed.
Module: check_mk
Branch: master
Commit: 67d7cf697cc4440ac875ddcb3a4f9ec63149cf64
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=67d7cf697cc444…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 17 11:55:31 2013 +0100
Add: mailman_lists - New check to gather statistics of mailman mailinglists
---
.bugs/757 | 2 +-
ChangeLog | 1 +
agents/plugins/mailman_lists | 30 ++++++++++++++++++++++++++++++
checkman/mailman_lists | 16 ++++++++++++++++
checks/mailman_lists | 42 ++++++++++++++++++++++++++++++++++++++++++
5 files changed, 90 insertions(+), 1 deletions(-)
diff --git a/.bugs/757 b/.bugs/757
index d647c09..da907dd 100644
--- a/.bugs/757
+++ b/.bugs/757
@@ -2,7 +2,7 @@ Title: Compilation of livecheck with dietlibc broken on SLES11SP1/2
Component: livecheck
State: open
Date: 2012-05-25 10:28:46
-Targetversion: 1.2.2
+Targetversion: future
Class: nastiness
Generally we should enable compiling livecheck with dietlibc in
diff --git a/ChangeLog b/ChangeLog
index 3936fd7..40ed03c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
* Add: fileinfo is now supported by the solaris agent. Thanks to Daniel Roettgermann
* Logwatch: unknown eventlog level ('u') from windows agent treated as warning
* FIX: logwatch_ec: Added state undefined as priority
+ * Add: mailman_lists - New check to gather statistics of mailman mailinglists
Multisite:
* FIX: Fixed rendering of dashboard globes in opera
diff --git a/agents/plugins/mailman_lists b/agents/plugins/mailman_lists
new file mode 100755
index 0000000..9371082
--- /dev/null
+++ b/agents/plugins/mailman_lists
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+# encoding: utf-8
+# This Check_MK-Agent plugin gathers information about mailinglists hosted
+# by the local mailman instance.
+
+# Needed if you have located your mailman python modules not in default
+# python module paths
+import sys
+sys.path.append("/usr/local/mailman")
+
+# Set to True to filter out all "hidden" mailinglists
+only_advertised = True
+
+from Mailman import Utils, MailList
+
+# 1. list memberships
+print '<<<mailman_lists>>>'
+total_members = set([])
+for name in sorted(Utils.list_names()):
+ mlist = MailList.MailList(name, lock=0)
+ if only_advertised and not mlist.advertised:
+ continue
+
+ rmembers = mlist.getRegularMemberKeys()
+ dmembers = mlist.getDigestMemberKeys()
+ members = rmembers + dmembers
+ total_members.update(members)
+
+ print '%s %d' % (name, len(members))
+print 'TOTAL %d' % len(total_members)
diff --git a/checkman/mailman_lists b/checkman/mailman_lists
new file mode 100644
index 0000000..73252d3
--- /dev/null
+++ b/checkman/mailman_lists
@@ -0,0 +1,16 @@
+title: Monitor mailinglist statistics of Mailman
+agents: linux
+author: Lars Michelsen <lm(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ This check gathers statistics of Mailinglists hosted with Mailman.
+ Currently the check monitors only the number of subscribed members
+ but might be extended by other statistic information.
+
+ To make this check work, you have to install the mailman_lists
+ agent plugin on your the host running mailman.
+
+inventory:
+ Each mailinglist results in one service. The service is named by
+ the internal name of the mailinglist
diff --git a/checks/mailman_lists b/checks/mailman_lists
new file mode 100644
index 0000000..a3dee84
--- /dev/null
+++ b/checks/mailman_lists
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2012 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+def inventory_mailman_lists(info):
+ return [ (i[0], None) for i in info ]
+
+def check_mailman_lists(item, params, info):
+ for line in info:
+ name, num_members = line[0], saveint(line[1])
+ if name == item:
+ return (0, 'OK - %d members subcribed' % (num_members), [('count', num_members)])
+ return (3, 'UNKNOWN - List could not be found in agent output')
+
+check_info["mailman_lists"] = {
+ "check_function" : check_mailman_lists,
+ "inventory_function" : inventory_mailman_lists,
+ "service_description" : "Mailinglist %s",
+ "has_perfdata" : True,
+}
Module: check_mk
Branch: master
Commit: 63a9da631102ec9a2b9ed557cbaa1016b1ed4325
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=63a9da631102ec…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 17 09:49:56 2013 +0100
CPU load ruleset does now accept float values
---
ChangeLog | 1 +
web/plugins/wato/check_parameters.py | 14 +++++++++-----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b3ae1a8..8dc1047 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,6 +31,7 @@
* LDAP: Implemnted some kind of debug logging for LDAP communication
WATO:
+ * CPU load ruleset does now accept float values
* FIX: Fixed displaying of tag selections when creating a rule in the ruleeditor
1.2.1i4:
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 41326f4..d3080d5 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1132,13 +1132,15 @@ checkgroups.append((
checkgroups.append((
subgroup_os,
"memory",
- _("Main memory usage (Linux / UNIX)"),
+ _("Main memory usage (Linux / UNIX / Other Devices)"),
Alternative(
help = _("The levels for memory usage on Linux and UNIX systems take into account the "
"currently used memory (RAM or SWAP) by all processes and sets this in relation "
"to the total RAM of the system. This means that the memory usage can exceed 100%. "
"A usage of 200% means that the total size of all processes is twice as large as "
- "the main memory, so <b>at least</b> the half of it is currently swapped out."),
+ "the main memory, so <b>at least</b> the half of it is currently swapped out. "
+ "Besides Linux and UNIX systems, these parameters are also used for memory checks "
+ "of other devices, like Cisco and Fortigate devices."),
elements = [
Tuple(
title = _("Specify levels in percentage of total RAM"),
@@ -1180,10 +1182,12 @@ checkgroups.append((
"for one. The <u>load average</u> is the averaged CPU load over the last 1, "
"5 or 15 minutes. The following levels will be applied on the average "
"load. On Linux system the 15-minute average load is used when applying "
- "those levels."),
+ "those levels. The configured levels are multiplied with the number of "
+ "CPUs, so you should configure the levels based on the value you want to "
+ "be warned \"per CPU\"."),
elements = [
- Integer(title = _("Warning at a load of")),
- Integer(title = _("Critical at a load of"))]),
+ Float(title = _("Warning at a load of")),
+ Float(title = _("Critical at a load of"))]),
None, None))
checkgroups.append((