Module: check_mk
Branch: master
Commit: 19cac2128d18ae1b11970e06a5578383d738ecbb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=19cac2128d18ae…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Dec 18 14:58:24 2018 +0100
6995 FIX oracle_undostat: Fixed crash if state in case of positive space error count is
set to OK
Change-Id: I23f294c42be34f8846d16ed194bab9282c63aa66
---
.werks/6995 | 10 ++++++++++
checks/oracle_undostat | 11 ++++-------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/.werks/6995 b/.werks/6995
new file mode 100644
index 0000000..7a41206
--- /dev/null
+++ b/.werks/6995
@@ -0,0 +1,10 @@
+Title: oracle_undostat: Fixed crash if state in case of positive space error count is set
to OK
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1545141404
+Class: fix
+
+
diff --git a/checks/oracle_undostat b/checks/oracle_undostat
index 1145737..8607747 100644
--- a/checks/oracle_undostat
+++ b/checks/oracle_undostat
@@ -57,13 +57,10 @@ def check_oracle_undostat(item, params, info):
else:
state = 0
- if nospaceerrcnt == 0:
- nospaceerrcntpic = ""
- else:
- if params.get('nospaceerrcnt_state'):
- state_errcnt = params.get('nospaceerrcnt_state')
- state = max(state, state_errcnt)
-
+ nospaceerrcntpic = ""
+ if nospaceerrcnt:
+ state_errcnt = params['nospaceerrcnt_state']
+ state = max(state, state_errcnt)
if state_errcnt == 1:
nospaceerrcntpic = "(!)"
elif state_errcnt == 2: