Module: check_mk
Branch: master
Commit: 4ae395fe0c0d9cb0bef2f406c0546d78ae56965f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ae395fe0c0d9c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 12 16:02:11 2013 +0100
Fixed problem with invalid check items for oracle_tablespaces
---
checks/oracle_tablespaces | 7 +++++--
web/plugins/wato/check_parameters.py | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/checks/oracle_tablespaces b/checks/oracle_tablespaces
index 1ecca0d..04e943d 100644
--- a/checks/oracle_tablespaces
+++ b/checks/oracle_tablespaces
@@ -142,7 +142,11 @@ def get_tablespace_levels_in_bytes(size_bytes, params):
def check_oracle_tablespaces(item, params, info):
- sid, tbsname = item.split('.')
+ try:
+ sid, tbsname = item.split('.')
+ except ValueError:
+ return (3, 'UNKNOWN - Invalid check item given (must be
<SID>.<tablespace>)')
+
ts_status = None
num_files = 0
num_avail = 0
@@ -199,7 +203,6 @@ def check_oracle_tablespaces(item, params, info):
if ts_status == None:
return (3, "UNKNOWN - Tablespace not found")
-
infotext = " - %s, size %s, used %s" % \
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 1868e5d..f646e6c 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1463,6 +1463,7 @@ checkgroups.append((
TextAscii(
title = _("Explicit tablespaces"),
help = _("Here you can set explicit tablespaces by defining them via SID and
the tablespace name, separated by a dot, for example
<b>pengt.TEMP</b>"),
+ regex = '.+\..+',
allow_empty = False),
None))