Wednesday, May 22nd 2013, 12:15am UTC+2
You are not logged in.
Dear visitor, welcome to Monitoring-Portal.
Although this is a german monitoring forum, please don't hesitate to post in
English. Nearly everybody here understands you and will answer in English as well.
If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form to register here or read more information about the registration process. If you are already registered, please login here.
Gender: male
Location: DMZ
Number of monitoring servers: 2
Nagios Version: 3.2.x
Distributed monitoring: Ja
Redundant monitoring: Nein
Number of hosts: 1300
Number of services: 9100
OS: SLES10
Plugin Version: 1.4.x
NagVis Version: 1.4
NDO Version: 1.4
Other Addons: NagiosGrapher, Business Process AddOns, netMySLA
|
|
Source code |
1 |
sqlplus <username>/<kennwort>@<sid> |

|
|
Source code |
1 |
nagios@xxx:~> /usr/lib/nagios/plugins/check_oracle_health --method=sqlplus --connect=xxx --user=xxx --password=xxx --mode=tablespace-usage |
|
|
Source code |
1 2 3 4 5 6 7 8 9 |
Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/plugins/check_oracle_health line 4170. Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/plugins/check_oracle_health line 4173. Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/plugins/check_oracle_health line 4181. Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/plugins/check_oracle_health line 4182. Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/plugins/check_oracle_health line 4185. Use of uninitialized value in numeric eq (==) at /usr/lib/nagios/plugins/check_oracle_health line 2670, <> line 7. Use of uninitialized value in subtraction (-) at /usr/lib/nagios/plugins/check_oracle_health line 2671, <> line 7. Use of uninitialized value in division (/) at /usr/lib/nagios/plugins/check_oracle_health line 2671, <> line 7. Illegal division by zero at /usr/lib/nagios/plugins/check_oracle_health line 2671, <> line 7. |
Gender: male
Location: München
Occupation: Informatiker
Number of monitoring servers: 1
Nagios Version: 3.2.0
Distributed monitoring: Ja
Redundant monitoring: Ja
Number of hosts: 2000
Number of services: 50000
OS: Linux/SLES11, CentOS5.5
Plugin Version: 1.4.14
NDO Version: 1.4b7
Other Addons: PNP,mod_gearman,OMD,coshsh
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
SELECT
a.tablespace_name "Tablespace",
b.status "Status",
b.contents "Type",
b.extent_management "Extent Mgmt",
sum(a.bytes_free + a.bytes_used) bytes, -- allocated
d.maxbytes bytes_max,
SUM(a.bytes_free + a.bytes_used - NVL(c.bytes_used, 0)) bytes_free
FROM
sys.v_$TEMP_SPACE_HEADER a,
sys.dba_tablespaces b,
sys.v_$Temp_extent_pool c,
dba_temp_files d
WHERE
c.file_id(+) = a.file_id
and c.tablespace_name(+) = a.tablespace_name
and d.file_id = a.file_id
and d.tablespace_name = a.tablespace_name
and b.tablespace_name = a.tablespace_name
GROUP BY
a.tablespace_name,
b.status,
b.contents,
b.extent_management,
d.maxbytes
ORDER BY
1
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
SELECT
a.tablespace_name "Tablespace",
b.status "Status",
b.contents "Type",
b.extent_management "Extent Mgmt",
a.bytes bytes,
a.maxbytes bytes_max,
c.bytes_free + NVL(d.bytes_expired,0) bytes_free
FROM
(
-- belegter und maximal verfuegbarer platz pro datafile
-- nach tablespacenamen zusammengefasst
-- => bytes
-- => maxbytes
SELECT
a.tablespace_name,
SUM(a.bytes) bytes,
SUM(DECODE(a.autoextensible, 'YES', a.maxbytes, 'NO', a.bytes)) maxbytes
FROM
dba_data_files a
GROUP BY
tablespace_name
) a,
sys.dba_tablespaces b,
(
-- freier platz pro tablespace
-- => bytes_free
SELECT
a.tablespace_name,
SUM(a.bytes) bytes_free
FROM
dba_free_space a
GROUP BY
tablespace_name
) c,
(
-- freier platz durch expired extents
-- speziell fuer undo tablespaces
-- => bytes_expired
SELECT
a.tablespace_name,
SUM(a.bytes) bytes_expired
FROM
dba_undo_extents a
WHERE
status = 'EXPIRED'
GROUP BY
tablespace_name
) d
WHERE
a.tablespace_name = c.tablespace_name (+)
AND a.tablespace_name = b.tablespace_name
AND a.tablespace_name = d.tablespace_name (+)
|
Gender: male
Location: DMZ
Number of monitoring servers: 2
Nagios Version: 3.2.x
Distributed monitoring: Ja
Redundant monitoring: Nein
Number of hosts: 1300
Number of services: 9100
OS: SLES10
Plugin Version: 1.4.x
NagVis Version: 1.4
NDO Version: 1.4
Other Addons: NagiosGrapher, Business Process AddOns, netMySLA
Gender: male
Location: München
Occupation: Informatiker
Number of monitoring servers: 1
Nagios Version: 3.2.0
Distributed monitoring: Ja
Redundant monitoring: Ja
Number of hosts: 2000
Number of services: 50000
OS: Linux/SLES11, CentOS5.5
Plugin Version: 1.4.14
NDO Version: 1.4b7
Other Addons: PNP,mod_gearman,OMD,coshsh
|
|
Source code |
1 2 3 4 5 6 7 |
...
$thisparams{type} = lc $type;
$thisparams{extent_management} = lc $extentmgmt;
printf STDERR "%s\n", Data::Dumper::Dumper(\%thisparams); # <------
my $tablespace = DBD::Oracle::Server::Database::Tablespace->new(
%thisparams);
...
|
Gender: male
Location: DMZ
Number of monitoring servers: 2
Nagios Version: 3.2.x
Distributed monitoring: Ja
Redundant monitoring: Nein
Number of hosts: 1300
Number of services: 9100
OS: SLES10
Plugin Version: 1.4.x
NagVis Version: 1.4
NDO Version: 1.4
Other Addons: NagiosGrapher, Business Process AddOns, netMySLA
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
$VAR1 = {
'bytes_max' => '2097152000',
'bytes' => '251658200',
'name2' => undef,
'absolute' => undef,
'status' => 'online',
'statefilesdir' => '/var/tmp/check_oracle_health',
'mode' => 'server::database::tablespace::usage',
'lookback' => undef,
'password' => 'xxx',
'basis' => undef,
'timeout' => 60,
'user' => 'xxx',
'racmode' => 0,
'method' => 'sqlplus',
'criticalrange' => undef,
'connect' => 'host_dbsid'',
'extent_management' => 'local',
'warningrange' => undef,
'datafile' => undef,
'eyecandy' => undef,
'name' => 'BKK_TABLE',
'handle' => bless( {
'sid' => 'host_dbsid',
'mode' => 'server::database::tablespace::usage',
'sqlplus' => '/usr/lib/oracle/11.1/client64/bin/sqlplus -S xxx/xxx@host_dbsid < /tmp/server::database::tablespace::usage1VHFH.sql > /tmp/server::database::tablespace::usage0MPNU.out', 'oraclehome' => '/usr/lib/oracle/11.1/client64',
'password' => 'xxx',
'loginstring' => 'traditional',
'sql_resultfile_handle' => \*{'File::Temp::$fh'},
'timeout' => 60,
'user' => 'xxx',
'connect' => 'host_dbsid'',
'sql_commandfile' => '/tmp/server::database::tablespace::usage1VHFH.sql',
'access' => 'sqlplus',
'tnsadmin' => '/etc',
'tac' => '1237995064.86978',
'sql_commandfile_handle' => \*{'File::Temp::$fh'},
'handle' => undef,
'sql_resultfile' => '/tmp/server::database::tablespace::usage0MPNU.out'
}, 'DBD::Oracle::Server::Connection::Sqlplus' ),
'selectname' => undef,
'regexp' => undef,
'type' => 'permanent',
'bytes_free' => '17825790',
'units' => undef,
'tablespace' => undef
};
[...]
Use of uninitialized value in numeric eq (==) at /usr/lib/nagios/plugins/check_oracle_health line 2671, <> line 7.
Use of uninitialized value in subtraction (-) at /usr/lib/nagios/plugins/check_oracle_health line 2672, <> line 7.
Use of uninitialized value in division (/) at /usr/lib/nagios/plugins/check_oracle_health line 2672, <> line 7.
Illegal division by zero at /usr/lib/nagios/plugins/check_oracle_health line 2672, <> line 7.
|
This post has been edited 2 times, last edit by "contact_name" (Mar 25th 2009, 6:18pm)
Gender: male
Location: München
Occupation: Informatiker
Number of monitoring servers: 1
Nagios Version: 3.2.0
Distributed monitoring: Ja
Redundant monitoring: Ja
Number of hosts: 2000
Number of services: 50000
OS: Linux/SLES11, CentOS5.5
Plugin Version: 1.4.14
NDO Version: 1.4b7
Other Addons: PNP,mod_gearman,OMD,coshsh
ORACLE_HOME ist jetzt instantclient-tauglich gesetzt, dadurch sind die "unitialized value in concatenation"s verschwunden, danke.
Ausgabe mit eingebautem printf (an der Stelle "[...]" gekürzt, die $VAR1 taucht sehr oft gleichsam auf):
![]()
Source code
1 2 3 4 5 6 7 8 9 10 11$VAR1 = { 'bytes_max' => '2097152000', 'bytes' => '251658200', 'bytes_free' => '17825790', [...] Use of uninitialized value in numeric eq (==) at /usr/lib/nagios/plugins/check_oracle_health line 2671, <> line 7. Use of uninitialized value in subtraction (-) at /usr/lib/nagios/plugins/check_oracle_health line 2672, <> line 7. Use of uninitialized value in division (/) at /usr/lib/nagios/plugins/check_oracle_health line 2672, <> line 7. Illegal division by zero at /usr/lib/nagios/plugins/check_oracle_health line 2672, <> line 7.
|
|
Source code |
1 2 3 |
if ($self->{bytes_max} == 0) {
$self->{percent_used} =
($self->{bytes} - $self->{bytes_free}) / $self->{bytes} * 100;
|
Quoted
die $VAR1 taucht sehr oft gleichsam auf
Quoted
Die Abfragen funktionieren beide und liefern sinnvolle Werte
Gender: male
Location: DMZ
Number of monitoring servers: 2
Nagios Version: 3.2.x
Distributed monitoring: Ja
Redundant monitoring: Nein
Number of hosts: 1300
Number of services: 9100
OS: SLES10
Plugin Version: 1.4.x
NagVis Version: 1.4
NDO Version: 1.4
Other Addons: NagiosGrapher, Business Process AddOns, netMySLA
Ist gemacht, siehe Anhang.Das hilft mir nichts. Entweder ich bekomme den gesamten Output oder ich kann nicht weiterhelfen.
Gender: male
Location: München
Occupation: Informatiker
Number of monitoring servers: 1
Nagios Version: 3.2.0
Distributed monitoring: Ja
Redundant monitoring: Ja
Number of hosts: 2000
Number of services: 50000
OS: Linux/SLES11, CentOS5.5
Plugin Version: 1.4.14
NDO Version: 1.4b7
Other Addons: PNP,mod_gearman,OMD,coshsh
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
$VAR1 = {
'bytes_max' => undef, # <-------
'bytes' => undef, # <------------
'name2' => undef,
'absolute' => undef,
'status' => '',
'statefilesdir' => '/var/tmp/check_oracle_health',
'mode' => 'server::database::tablespace::usage',
'lookback' => undef,
'password' => 'xxx',
'timeout' => 60,
'basis' => undef,
'user' => 'xxx',
'racmode' => 0,
'method' => 'sqlplus',
'criticalrange' => undef,
'connect' => 'xxx',
'extent_management' => '',
'datafile' => undef,
'warningrange' => undef,
'name' => 'xxx',
|
Gender: male
Location: München
Occupation: Informatiker
Number of monitoring servers: 1
Nagios Version: 3.2.0
Distributed monitoring: Ja
Redundant monitoring: Ja
Number of hosts: 2000
Number of services: 50000
OS: Linux/SLES11, CentOS5.5
Plugin Version: 1.4.14
NDO Version: 1.4b7
Other Addons: PNP,mod_gearman,OMD,coshsh
|
|
Source code |
1 2 3 4 |
$ check_oracle_health --mode tablespace-free --name TEST_TBS --units MB OK - tbs TEST_TBS has 128.00MB free space left | 'tbs_test_tbs_free_pct'=17.98%;0.70:;0.28: 'tbs_test_tbs_free'=128.00MB;5.00:;2.00:;0;712.00 $ check_oracle_health --mode tablespace-free --name TEST_TBS --units MB WARNING - tbs TEST_TBS is offline | 'tbs_test_tbs_free_pct'=100.00%;0.00:;0.00: 'tbs_test_tbs_free'=0.00MB;5.00:;2.00:;0;0.00 |
Gender: male
Location: DMZ
Number of monitoring servers: 2
Nagios Version: 3.2.x
Distributed monitoring: Ja
Redundant monitoring: Nein
Number of hosts: 1300
Number of services: 9100
OS: SLES10
Plugin Version: 1.4.x
NagVis Version: 1.4
NDO Version: 1.4
Other Addons: NagiosGrapher, Business Process AddOns, netMySLA

|
|
Source code |
1 |
'tbs_46 zeilen ausgewahlt._usage_pct'=0.00%;90;98 'tbs_46 zeilen ausgewahlt._usage'=0MB;0;0;0;0 'tbs_46 zeilen ausgewahlt._alloc'=0MB;;;0;0 |
Gender: male
Location: München
Occupation: Informatiker
Number of monitoring servers: 1
Nagios Version: 3.2.0
Distributed monitoring: Ja
Redundant monitoring: Ja
Number of hosts: 2000
Number of services: 50000
OS: Linux/SLES11, CentOS5.5
Plugin Version: 1.4.14
NDO Version: 1.4b7
Other Addons: PNP,mod_gearman,OMD,coshsh
select tablespace_name from dba_tablespaces;
|
|
Source code |
1 |
] } grep { ! /^\d+ rows selected/ }
|
|
|
Source code |
1 |
grep { ! /^\d+ [Zz]eilen ausgew / }
|
Gender: male
Location: DMZ
Number of monitoring servers: 2
Nagios Version: 3.2.x
Distributed monitoring: Ja
Redundant monitoring: Nein
Number of hosts: 1300
Number of services: 9100
OS: SLES10
Plugin Version: 1.4.x
NagVis Version: 1.4
NDO Version: 1.4
Other Addons: NagiosGrapher, Business Process AddOns, netMySLA
This post has been edited 1 times, last edit by "contact_name" (Mar 31st 2009, 1:34pm)