Friends,
I am using the following shell script to check oracle tables spaces.
http://pastie.org/255164 (note: I’m not sure why the pastie is showing “<<-EOF” and “EOF” twice on the here-document query…the actual shell script isn’t like that.)
Line 212, the sqlplus command, seems to be the problem. From the command line the TEMP_FILE is created and contains all of the tablespaces in it…and the script then reports back tablespaces that have reached the limits for WARNING and CRITICAL (or “OK” if all is well).
From the app, the TEMP_FILE is empty and giving the error on line 237.
The Service Definition:
# Service definition
define service{
use generic-service
host_name belgian
service_description tablespaces
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 3
contact_groups dba
notification_interval 120
notification_period 24x7
notification_options n
check_command belgian-tablespaces
}
The Check Command:
# Tablespaces for 'qdev'
define command{
command_name belgian-tablespaces
command_line /web/nagios/3.0/libexec/check_oracle_tablespace.sh -s qdev -w 95 -c 98 -d .*
}
I can copy/paste the check command to the prompt and it works fine. It’s running from the web front end that fails.
Can someone shed some light on what’s wrong? I feel like I’m staring at a wall now and need some fresh eyes.
Nagios Server - Ubuntu 7.10, Nagios 3.0, Oracle Instant Client 10gr2
Oracle Server - RedHat EL 5, Oracle 10.2.0.3 Database
Thanks!
Darrin