Module: check_mk
Branch: master
Commit: 530369c4e70c3b31a8496a0c01cd1d989f5ef026
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=530369c4e70c3b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 21 10:42:03 2016 +0100
#2912 FIX mk_oracle mk_oracle.aix: Fixed handling of DBs which names end with
"_[NUMBER]"
The agent plugin did not compute the ORACLE_SID_SHORT correctly in case of databases
named like this:
DB Instance Name = TESTDBDB
Instance RAC Knoten 1: TESTDB_1DB
Instance RAC Knoten 2: TESTDB_2
---
.werks/2912 | 14 ++++++++++++++
ChangeLog | 1 +
agents/plugins/mk_oracle | 2 +-
agents/plugins/mk_oracle.aix | 2 +-
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/.werks/2912 b/.werks/2912
new file mode 100644
index 0000000..9469c3a
--- /dev/null
+++ b/.werks/2912
@@ -0,0 +1,14 @@
+Title: mk_oracle mk_oracle.aix: Fixed handling of DBs which names end with
"_[NUMBER]"
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453369163
+Class: fix
+
+The agent plugin did not compute the ORACLE_SID_SHORT correctly in case of databases
+named like this:
+
+DB Instance Name = TESTDBDB
+Instance RAC Knoten 1: TESTDB_1DB
+Instance RAC Knoten 2: TESTDB_2
diff --git a/ChangeLog b/ChangeLog
index 5900b4a..664549d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -198,6 +198,7 @@
* 2909 FIX: postfix_mailq: Fixed crash when postfix mailq size can not be read
* 2910 FIX: heartbeat_crm: Fixed crash in case of "number of resources"
paramters have been configured
* 2911 FIX: mysql.innodb_io: Fixed crash in case averaging is set to 0 minutes
+ * 2912 FIX: mk_oracle mk_oracle.aix: Fixed handling of DBs which names end with
"_[NUMBER]"...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/agents/plugins/mk_oracle b/agents/plugins/mk_oracle
index 3adfdcb..bb94092 100755
--- a/agents/plugins/mk_oracle
+++ b/agents/plugins/mk_oracle
@@ -711,7 +711,7 @@ function set_oraenv () {
ORACLE_HOME=$(cat ${ORATAB} | grep "^"${ORACLE_SID}":" | cut
-d":" -f2)
if [ -z $ORACLE_HOME ] ; then
# cut last number from SID for Oracle RAC to find entry in oratab
- ORACLE_SID_SHORT=$(echo $ORACLE_SID | sed "s/[0-9]$//")
+ ORACLE_SID_SHORT=$(echo $ORACLE_SID | sed "s/_[0-9]$//")
ORACLE_HOME=$(cat ${ORATAB} | grep
"^"${ORACLE_SID_SHORT}":" | cut -d":" -f2)
fi
fi
diff --git a/agents/plugins/mk_oracle.aix b/agents/plugins/mk_oracle.aix
index fb1a1f6..a863072 100755
--- a/agents/plugins/mk_oracle.aix
+++ b/agents/plugins/mk_oracle.aix
@@ -697,7 +697,7 @@ function set_oraenv () {
ORACLE_HOME=$(cat ${ORATAB} | grep "^"${ORACLE_SID}":" | cut
-d":" -f2)
if [ -z $ORACLE_HOME ] ; then
# cut last number from SID for Oracle RAC to find entry in oratab
- ORACLE_SID_SHORT=$(echo $ORACLE_SID | sed "s/[0-9]$//")
+ ORACLE_SID_SHORT=$(echo $ORACLE_SID | sed "s/_[0-9]$//")
ORACLE_HOME=$(cat ${ORATAB} | grep "^"${ORACLE_SID_SHORT}":"
| cut -d":" -f2)
fi