Module: check_mk
Branch: master
Commit: ba65bee8b25d68fca8b4d41a593fd4fbe6f5ebbf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ba65bee8b25d68…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 14 14:08:01 2012 +0100
Added manpage for plesk_domains check
---
checkman/plesk_domains | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/checkman/plesk_domains b/checkman/plesk_domains
new file mode 100644
index 0000000..1a37050
--- /dev/null
+++ b/checkman/plesk_domains
@@ -0,0 +1,22 @@
+title: Dumps out the domains configured in Plesk
+agents: linux
+author: Lars Michelsen <lm(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ Plesk is a commercial webhosting management software. It allows you to
+ manage multiple independent webspace instances including domains and
+ so on.
+
+ This check simply outputs all domains configured in a local plesk
+ installation. It raises a {WARNING} state when no domain is configured,
+ otherwise the plugin is always reporting an {OK} state.
+
+ To make this check work you need to install the agent plugin
+ {plesk_domains} on the host wich runs Plesk in the
+ directory {/usr/lib/check_mk_agent/plugins}.
+
+inventory:
+ One check per system is created if the {plesk_domains} agent plugin
+ is installed and working (it outputs the {<<<plesk_domains>>>} section).
+
Module: check_mk
Branch: master
Commit: eba2b3fbbefc84eb5808a227ec051b058a73e9bf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eba2b3fbbefc84…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 13 10:41:16 2012 +0100
ldap: Working around import problems with dist-packages modules in mod_python environments
---
web/plugins/userdb/ldap.py | 24 +++++++++---------------
1 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 8942f77..cc2841e 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -27,21 +27,15 @@
import config, defaults
import time
-# FIXME: For some reason mod_python is missing /usr/lib/python2.7/dist-packages
-# in sys.path. Therefor the ldap module can not be found. Need to fix this!
-#import sys ; sys.path.append('/usr/lib/python2.7/dist-packages')
-#
-# details: /usr/lib/python2.7/site.py
-#
-# My assumption is that there is a problem during compilation/execution of mod_python.
-# When starting python as site user, the correct sys.path is set, when printing sys.path
-# from mod_python code for debugging, it misses a lot of paths.
-#
-# mod_python:
-# ['/omd/sites/event/local/share/check_mk/web/htdocs', '/omd/sites/event/share/check_mk/web/htdocs', '/omd/versions/2012.10.25.mk/lib/python', '/omd/sites/event/lib/python', '/omd/sites/event/local/lib/python', '/usr/lib/python2.7/', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload']
-#
-# >>> sys.path
-# ['', '/usr/local/lib/python2.7/dist-packages/pip-1.1-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/xhtml2pdf-0.0.4-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/pyPdf-1.13-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/html5lib-0.95-py2.7.egg', '/usr/lib/python2.7/dist-packages/PIL', '/usr/local/lib/python2.7/dist-packages/pisa-3.0.33-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
+# For some reason mod_python is missing /usr/lib/python2.7/dist-packages
+# in sys.path. Therefor the ldap module can not be found at least on current
+# ubuntu and sles releases.
+# There seem to be some initialization problems with mod_pythan as the sys.path
+# is correct when excuting python from the command line as site user.
+# Try to workaround the problem now...
+import site, sys
+sys.path.extend(site.getsitepackages())
+
try:
# docs: http://www.python-ldap.org/doc/html/index.html
import ldap
Module: check_mk
Branch: master
Commit: df393444f26298ff224342e5c9b134eca3c3c188
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=df393444f26298…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 12 16:19:33 2012 +0100
Fixed syntax error
---
checks/mysql | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/checks/mysql b/checks/mysql
index 025a0c4..e4773c5 100644
--- a/checks/mysql
+++ b/checks/mysql
@@ -172,7 +172,7 @@ def inventory_mysql_connections(info):
def check_mysql_connections(item, params, info):
values = parse_mysql(info)
if 'Max_used_connections' not in values:
- return (3 'UNKNOWN - Connection information are missing')
+ return (3, 'UNKNOWN - Connection information are missing')
# The maximum number of connections that have been in use simultaneously
# since the server started.
Module: check_mk
Branch: master
Commit: 3b386fabe19908591dbac6362b5e5ba1fb22e92b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3b386fabe19908…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 12 14:02:53 2012 +0100
mysql_connections: Handling missing data correctly
---
checks/mysql | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/checks/mysql b/checks/mysql
index 4fe957b..025a0c4 100644
--- a/checks/mysql
+++ b/checks/mysql
@@ -171,6 +171,9 @@ def inventory_mysql_connections(info):
def check_mysql_connections(item, params, info):
values = parse_mysql(info)
+ if 'Max_used_connections' not in values:
+ return (3 'UNKNOWN - Connection information are missing')
+
# The maximum number of connections that have been in use simultaneously
# since the server started.
conn = float(values['Max_used_connections'])