Module: check_mk
Branch: master
Commit: 622e4d749719f8c4116fd222b9e4ed06795b5404
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=622e4d749719f8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 9 09:09:32 2012 +0100
windows - mk_oracle tablespace: Added missing sid column
---
ChangeLog | 1 +
agents/windows/plugins/mk_oracle.bat | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7101495..513acbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
* hpux_if: make configurable via WATO
* if.include: fix handling of NIC with index 0
* hpux_lunstats: new check for disk IO on HP-UX
+ * windows - mk_oracle tablespace: Added missing sid column
Multisite:
* Added several missing localization stringsw
diff --git a/agents/windows/plugins/mk_oracle.bat b/agents/windows/plugins/mk_oracle.bat
index da8340d..1f3971d 100644
--- a/agents/windows/plugins/mk_oracle.bat
+++ b/agents/windows/plugins/mk_oracle.bat
@@ -41,6 +41,8 @@ echo "set head off"
echo "select count(*) from v$loghist where first_time > sysdate - 1/24;"
) | sqlplus -S %AUTH%
+REM ; This is nearly the same query as in the linux agent. With the exception that the
+REM ; column th.instance is fetched as first column to get the SID
echo ^<^<^<oracle_tablespaces^>^>^>
(
echo set cmdsep on
@@ -52,5 +54,5 @@ echo "set feedback off"
echo "set head off"
echo "column instance format a10"
echo "column file_name format a100"
-echo "select f.file_name, f.tablespace_name, f.status, f.AUTOEXTENSIBLE, f.blocks,
f.maxblocks, f.USER_BLOCKS, f.INCREMENT_BY, f.ONLINE_STATUS, t.BLOCK_SIZE, t.status,
decode(sum(fs.blocks), NULL, 0, sum(fs.blocks)) free_blocks 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(+) group by f.file_name, f.tablespace_name, f.status,
f.autoextensible, f.blocks, f.maxblocks, f.user_blocks, f.increment_by, f.online_status,
t.block_size, t.status 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, 0 from dba_temp_files f, dba_tablespaces t where f.tablespace_name
= t.tablespace_name;"
+echo "select th.instance, f.file_name, f.tablespace_name, f.status,
f.AUTOEXTENSIBLE, f.blocks, f.maxblocks, f.USER_BLOCKS, f.INCREMENT_BY, f.ONLINE_STATUS,
t.BLOCK_SIZE, t.status, decode(sum(fs.blocks), NULL, 0, sum(fs.blocks)) free_blocks from
v$thread th, 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(+) group by th.instance,
f.file_name, f.tablespace_name, f.status, f.autoextensible, f.blocks, f.maxblocks,
f.user_blocks, f.increment_by, f.online_status, t.block_size, t.status UNION select
th.instance, 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, 0 from
v$thread th, dba_temp_files f, dba_tablespaces t where f.tablespace_name =
t.tablespace_name;"
) | sqlplus -S %AUTH%