Module: check_mk
Branch: master
Commit: 9ef082aec46880bbcf03677c32cd65537b8800cf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ef082aec46880…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Fri Nov 18 07:49:33 2011 +0100
Add new bug entry
---
.bugs/320 | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/.bugs/320 b/.bugs/320
new file mode 100644
index 0000000..6b48542
--- /dev/null
+++ b/.bugs/320
@@ -0,0 +1,22 @@
+Title: Multisite Fehler 'module' object has no attribute 'wato_enabled'
+Component: multisite
+Benefit: 7
+State: open
+Cost: 3
+Date: 2011-11-18 07:46:27
+Targetversion: 1.1.12
+Class: bug
+
+Multisite GUI dashboards has error affecting most views
+Has been reported a few times and I could verify it.
+Internal error:: 'module' object has no attribute 'wato_enabled'
+Traceback (most recent call last):
+ File "/omd/sites/watotest/share/check_mk/web/htdocs/index.py", line 237, in handler
+ handler()
+ File "/omd/sites/watotest/share/check_mk/web/htdocs/views.py", line 1041, in page_view
+ show_view(view, True, True, True)
+ File "/omd/sites/watotest/share/check_mk/web/htdocs/views.py", line 1150, in show_view
+ if fn == "filename" and not config.wato_enabled:
+AttributeError: 'module' object has no attribute 'wato_enabled'
+
+WATO still works, but most views are affected.
Module: check_mk
Branch: master
Commit: 4ad5d66dcbe369935605bbaf2e933757569dad1d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ad5d66dcbe369…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Thu Sep 29 18:47:05 2011 +0200
nfs export check
---
agents/plugins/nfsexports | 18 ++++++++++++++++++
checks/nfsexports | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 0 deletions(-)
diff --git a/agents/plugins/nfsexports b/agents/plugins/nfsexports
new file mode 100755
index 0000000..185de07
--- /dev/null
+++ b/agents/plugins/nfsexports
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# this check will only run if we have a working nfs environment or SHOULD have one.
+# not tested for nfs3
+
+# verify if there are exports defined in your local /etc/exports
+if [ -r /etc/exports ]; then
+ EXPORTS=$(grep -v -e ^# -e ^$ /etc/exports)
+fi
+pgrep portmap 1>/dev/null && pgrep rpc.mountd 1>/dev/null && DAEMONS="ok"
+
+# any exports or have running daemons? then look for registered exports
+if [[ $EXPORTS ]]; then
+ echo "<<<nfsexports>>>"
+ if [[ $DAEMONS ]]; then
+ waitmax 3 showmount --no-headers -e
+ fi
+fi
diff --git a/checks/nfsexports b/checks/nfsexports
new file mode 100644
index 0000000..8013fc3
--- /dev/null
+++ b/checks/nfsexports
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+
+
+# This check verifies a given NFS export is registered with mountd.
+# Optionally we can add tracking of allowed clients and filesystem ID.
+
+# Agent info
+# [['/mirrored/data/recording', '172.0.0.0/255.0.0.0']]
+
+
+
+
+def inventory_nfsexports(checkname, info):
+ # reminder to self: inventorize the exported fs, and maybe even the fs id.
+ # but do not inventorize the allowed clients unless i'm really sure that
+ # it's not bugged for "features" like multiple different option exports of
+ # same FS.
+ inventory = []
+ for line in info:
+ # will not inventorize unless there is SOME export at inventory time.
+ if line[0].startswith("/"):
+ inventory.append((line[0], None))
+
+ return inventory
+
+
+def check_nfsexports(item, _no_params, info):
+ # if the agent returned an empty list then it found entries in /etc/exports
+ # but apparently no daemons were running.
+ if len(info) == 0:
+ return (2, "CRITICAL - exports defined but no exports found in export list. Daemons might not be working")
+
+ # otherwise lets see if our export exists.
+ for line in info:
+ exported_path = line[0]
+ if exported_path == item:
+ return (0, "OK - export is active")
+ return (2, "CRITICAL - export not found in export list")
+
+# return (3, "UNKNOWN - invalid data returned from Agent")
+
+
+
+
+check_info['nfsexports'] = (check_nfsexports, "NFS export %s", 0, inventory_nfsexports)