Module: check_mk
Branch: master
Commit: 969c43636340212c3e79d373ea135526abf993f7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=969c4363634021…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Mar 13 08:00:45 2017 +0100
4493 FIX mk_oracle.ps1: Now takes version into account which fixed wrong calculation of
tablespaces
Change-Id: I31478990fe997618ce7b61a88c7ea961c4172006
---
.werks/4493 | 11 +++++++++++
agents/windows/plugins/mk_oracle.ps1 | 7 +++++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/4493 b/.werks/4493
new file mode 100644
index 0000000..d8ffbe6
--- /dev/null
+++ b/.werks/4493
@@ -0,0 +1,11 @@
+Title: mk_oracle.ps1: Now takes version into account which fixed wrong calculation of
tablespaces
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1489388435
+
+
diff --git a/agents/windows/plugins/mk_oracle.ps1 b/agents/windows/plugins/mk_oracle.ps1
index 0188ab1..8a727a7 100644
--- a/agents/windows/plugins/mk_oracle.ps1
+++ b/agents/windows/plugins/mk_oracle.ps1
@@ -613,10 +613,12 @@ Function sql_tablespaces {
||'|'|| ONLINE_STATUS ||'|'|| BLOCK_SIZE
||'|'|| decode(tstatus,'READ ONLY', 'READONLY',
tstatus) || '|' || free_blocks
||'|'|| contents
+ ||'|'|| iversion
from v$database d , (
select f.file_name, f.tablespace_name, f.status fstatus,
f.AUTOEXTENSIBLE,
f.blocks, f.maxblocks, f.USER_BLOCKS, f.INCREMENT_BY,
- f.ONLINE_STATUS, t.BLOCK_SIZE, t.status tstatus,
nvl(sum(fs.blocks),0) free_blocks, t.contents
+ f.ONLINE_STATUS, t.BLOCK_SIZE, t.status tstatus,
nvl(sum(fs.blocks),0) free_blocks, t.contents,
+ (select version from v$instance) iversion
from dba_data_files f, dba_tablespaces t, dba_free_space fs
where f.tablespace_name = t.tablespace_name
and f.file_id = fs.file_id(+)
@@ -626,7 +628,8 @@ Function sql_tablespaces {
UNION
select f.file_name, f.tablespace_name, f.status, f.AUTOEXTENSIBLE,
f.blocks, f.maxblocks, f.USER_BLOCKS, f.INCREMENT_BY,
'TEMP',
- t.BLOCK_SIZE, t.status, sum(sh.blocks_free) free_blocks,
'TEMPORARY'
+ t.BLOCK_SIZE, t.status, sum(sh.blocks_free) free_blocks,
'TEMPORARY',
+ (select version from v$instance) version
from v$thread th, dba_temp_files f, dba_tablespaces t,
v$temp_space_header sh
WHERE f.tablespace_name = t.tablespace_name and f.file_id =
sh.file_id
GROUP BY th.instance, f.file_name, f.tablespace_name, f.status,