No output returned from plugin
Posted: Thu Mar 06, 2014 5:01 am
Hi folks,
there's a problem with a nagios check. All other checks have a status information except service "Tablespace VPSTAB EASTPROD". See attached jpg.
The script is defined as
command[check_east_vpstab]=/usr/local/nagios/libexec/check_tablespace.bsh -d EASTPROD -t VPSTAB -w 85 -c 90
in nrpe.cfg.
At the end of the shell script check_tablespace.bsh there are some echos and exitsatus:
Running the script in CLI on the nagios server:
I think, the last line of output should be the status information.
Tablespace VPSTAB der Instanz EASTPROD hat noch genug Platz.
Do you have an idea why it is not?
Regards arenist
there's a problem with a nagios check. All other checks have a status information except service "Tablespace VPSTAB EASTPROD". See attached jpg.
The script is defined as
command[check_east_vpstab]=/usr/local/nagios/libexec/check_tablespace.bsh -d EASTPROD -t VPSTAB -w 85 -c 90
in nrpe.cfg.
At the end of the shell script check_tablespace.bsh there are some echos and exitsatus:
Code: Select all
...
ECHO="/bin/echo -e"
...
sqlplus / as sysdba @/usr/local/nagios/libexec/belegung_tablespaces.sql
ZEILEN=$(awk -v TS="${TABLESPACE}" -v W="${WARNING}" 'match($0,TS) {if ($NF > W) print $NF}' /tmp/belegung_tablespace.txt|awk -F"." '{print $1}')
if [ -z ${ZEILEN} ];then
# Tablespace ist weniger als ${WARNING}% belegt -> alles OK
$ECHO "Tablespace ${TABLESPACE} der Instanz ${DATABASE} hat noch genug Platz.\n"
exitstatus=$STATE_OK
else
if [ ${ZEILEN} -gt ${CRIT} ];then
# Tablespace ist ueber 90% belegt -> kritisch
$ECHO "Tablespace ${TABLESPACE} der Instanz ${DATABASE} hat nicht mehr genug Platz.\n"
exitstatus=$STATE_CRITICAL
else
# Tablespace ist zwischen ${WARNING}% und ${CRIT}% belegt -> Warnung
$ECHO "Tablespace ${TABLESPACE} der Instanz ${DATABASE} muss vergroessert werden.\n"
exitstatus=$STATE_WARNING
fi
fi
exit ${exitstatus}
Code: Select all
nagios@madpbk51:/usr/local/nagios/libexec> ./check_nrpe -H veastdb11 -c check_east_vpstab
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 6 10:51:47 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
TABLESPACE_NAME MB_USED MB_FREE PERCENT_USED
-------------------- ---------- ---------- ------------
VPSTAB 272377 48510 82.19
SYSTEM 1400 272 80.57
SYSAUX 1300 298 77.06
USERS 500 193 61.31
UNDOTBS1 4096 4008 02.16
PSTAB 20480 20272 01.01
6 rows selected.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Tablespace VPSTAB der Instanz EASTPROD hat noch genug Platz.
Tablespace VPSTAB der Instanz EASTPROD hat noch genug Platz.
Do you have an idea why it is not?
Regards arenist