diff options
Diffstat (limited to 'web/attachments/126077-check_oracle.diff')
-rw-r--r-- | web/attachments/126077-check_oracle.diff | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/web/attachments/126077-check_oracle.diff b/web/attachments/126077-check_oracle.diff new file mode 100644 index 0000000..2266ce3 --- /dev/null +++ b/web/attachments/126077-check_oracle.diff | |||
@@ -0,0 +1,50 @@ | |||
1 | --- check_oracle.new 2005-03-17 15:12:05.000000000 +0100 | ||
2 | +++ /home/stefan/packages/nagios-plugins-1.4/plugins-scripts/check_oracle.sh 2004-12-01 21:09:59.000000000 +0100 | ||
3 | @@ -241,36 +241,17 @@ | ||
4 | echo "UNKNOWN - Warning level is more then Crit" | ||
5 | exit $STATE_UNKNOWN | ||
6 | fi | ||
7 | - | ||
8 | - | ||
9 | - if [ ${5} = 'TEMP' ] ; then | ||
10 | - result=`sqlplus -s ${3}/${4}@${2} << EOF | ||
11 | - set pagesize 0 | ||
12 | - set numf '9999999.99' | ||
13 | - | ||
14 | - select b.free,a.total,100 - trunc(b.free/a.total * 1000) / 10 prc | ||
15 | - from ( | ||
16 | - select tablespace_name,sum(bytes)/1024/1024 total | ||
17 | - from dba_temp_files group by tablespace_name) A, | ||
18 | - ( select tablespace_name,sum(bytes_free)/1024/1024 free | ||
19 | - from v\\$temp_space_header group by tablespace_name) B | ||
20 | - where a.tablespace_name=b.tablespace_name and a.tablespace_name='${5}'; | ||
21 | - EOF` | ||
22 | - else | ||
23 | - result=`sqlplus -s ${3}/${4}@${2} << EOF | ||
24 | - set pagesize 0 | ||
25 | - set numf '9999999.99' | ||
26 | - | ||
27 | - select b.free,a.total,100 - trunc(b.free/a.total * 1000) / 10 prc | ||
28 | - from ( | ||
29 | - select tablespace_name,sum(bytes)/1024/1024 total | ||
30 | - from dba_data_files group by tablespace_name) A, | ||
31 | - ( select tablespace_name,sum(bytes)/1024/1024 free | ||
32 | - from dba_Free_space group by tablespace_name) B | ||
33 | - where a.tablespace_name=b.tablespace_name and a.tablespace_name='${5}'; | ||
34 | - EOF` | ||
35 | - fi | ||
36 | - | ||
37 | + result=`sqlplus -s ${3}/${4}@${2} << EOF | ||
38 | +set pagesize 0 | ||
39 | +set numf '9999999.99' | ||
40 | +select b.free,a.total,100 - trunc(b.free/a.total * 1000) / 10 prc | ||
41 | +from ( | ||
42 | +select tablespace_name,sum(bytes)/1024/1024 total | ||
43 | +from dba_data_files group by tablespace_name) A, | ||
44 | +( select tablespace_name,sum(bytes)/1024/1024 free | ||
45 | +from dba_free_space group by tablespace_name) B | ||
46 | +where a.tablespace_name=b.tablespace_name and a.tablespace_name='${5}'; | ||
47 | +EOF` | ||
48 | |||
49 | if [ -n "`echo $result | grep ORA-`" ] ; then | ||
50 | error=` echo "$result" | grep "ORA-" | head -1` | ||