diff options
author | Jan Wagner <waja@cyconet.org> | 2013-10-22 08:23:38 +0200 |
---|---|---|
committer | Jan Wagner <waja@cyconet.org> | 2013-10-22 08:23:38 +0200 |
commit | facb416ef8645858ae2b521f3c4051aea223360d (patch) | |
tree | 8d0600d4ea8803e767094f03d575c6987b5863a3 | |
parent | f6576c6db4eeb655f16a71286757e4a93792887d (diff) | |
download | monitoring-plugins-facb416ef8645858ae2b521f3c4051aea223360d.tar.gz |
check_oracle: --db +ASM bad string matching
check_oracle doesn't correctly check for pmon +ASM instance from at least Oracle 11 as the pmon proces was renamed from ora_pmon_.* to asm_pmon_.*.
--
Just turning attached patch of github issue #1207 into a push request.
(Closes #1207)
-rwxr-xr-x | plugins-scripts/check_oracle.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh index 2a8ab21d..b86ce1d2 100755 --- a/plugins-scripts/check_oracle.sh +++ b/plugins-scripts/check_oracle.sh | |||
@@ -164,6 +164,7 @@ case "$cmd" in | |||
164 | ;; | 164 | ;; |
165 | --db) | 165 | --db) |
166 | pmonchk=`ps -ef | grep -v grep | grep -c "ora_pmon_${2}$"` | 166 | pmonchk=`ps -ef | grep -v grep | grep -c "ora_pmon_${2}$"` |
167 | pmonchk=$(($pmonchk+`ps -ef | grep -v grep | grep -c "asm_pmon_${2}$"`)) | ||
167 | if [ ${pmonchk} -ge 1 ] ; then | 168 | if [ ${pmonchk} -ge 1 ] ; then |
168 | echo "${2} OK - ${pmonchk} PMON process(es) running" | 169 | echo "${2} OK - ${pmonchk} PMON process(es) running" |
169 | exit $STATE_OK | 170 | exit $STATE_OK |