check_oracle_health --mode=sql doesn't work with a $ sign in sql statment
Rejoice999
rejoice999 at yahoo.com
Sat Oct 25 16:56:30 CEST 2008
Environment:
RHEL 4.7 x86
perl v5.8.5
perl-DBI-1.40-9
DBD-Oracle-1.19
Oracle client 9.2.0.4
Nagios 3.0.4
check_oracle_health-1.5
command line test works:
/usr/local/nagios/libexec/check_oracle_health --connect=test1 --user=nagios --password=nagios --mode=sql --name2="Sessions waiting for latch free" --name="select count(*) from v\$session_wait where event='latch free' "
OK - sessions waiting for latch free: 0 | 'sessions waiting for latch free'=0;1;5
Following config not work:
define command{
command_name check_oracle_health_latchfree-count
command_line $USER1$/check_oracle_health --connect=$ARG1$ --user=nagios --password=nagios --mode=sql --name2="Sessions waiting for latch free" --name="select count(*) from v\$session where event='latch free' "
}
define service{
use local-service ; Name of service template to use
host_name vm2
service_description Sessions waiting for latch free
check_command check_oracle_health_latchfree-count!test1
}
Sessions waiting for latch free
UNKNOWN 10-25-2008 21:48:58 0d 0h 44m 26s 4/4 UNKNOWN - got no valid response for select count(*) from v$session where event='latch free'$
I noticed a trailing "$" in the statement displayed on Nagios page.
Thanks.
---------------------------------
雅虎邮箱,您的终生邮箱!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20081025/e1c6b846/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list