summaryrefslogtreecommitdiffstats
path: root/plugins-scripts
diff options
context:
space:
mode:
authorJan Wagner <waja@cyconet.org>2013-10-01 12:59:35 (GMT)
committerJan Wagner <waja@cyconet.org>2014-07-20 20:30:21 (GMT)
commitd8b81e9ef3947a36e2647f4e54a63e3b259b103b (patch)
tree8e78ec643476324f0ab7f9baf692653ad1afe7b9 /plugins-scripts
parent50cad9ae5d958f045fcea927b41b52d24ff59b91 (diff)
downloadmonitoring-plugins-d8b81e9ef3947a36e2647f4e54a63e3b259b103b.tar.gz
check_oracle: --tns bad string matching
check_oracle in the 1.4.15 release doesn't correctly parse the output gotten from at least Oracle 11 (with german locales). I guess it's probably more. Also it completely needlessly uses sed where basic bash string parsing actually does more than suffice (and does not run into possible problems with locales like sed ;)). -- Just turning attached patch of github issue #1015 into a push request. (Closes #1015 and #1191)
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-xplugins-scripts/check_oracle.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
index ceac95d..1873a3c 100755
--- a/plugins-scripts/check_oracle.sh
+++ b/plugins-scripts/check_oracle.sh
@@ -137,7 +137,7 @@ case "$cmd" in
137 tnschk=` tnsping $2` 137 tnschk=` tnsping $2`
138 tnschk2=` echo $tnschk | grep -c OK` 138 tnschk2=` echo $tnschk | grep -c OK`
139 if [ ${tnschk2} -eq 1 ] ; then 139 if [ ${tnschk2} -eq 1 ] ; then
140 tnschk3=` echo $tnschk | sed -e 's/.*(//' -e 's/).*//'` 140 tnschk3=${tnschk##*(}; tnschk3=${tnschk3%)*}
141 echo "OK - reply time ${tnschk3} from $2" 141 echo "OK - reply time ${tnschk3} from $2"
142 exit $STATE_OK 142 exit $STATE_OK
143 else 143 else