
asegaitz
New User
Feb 13, 2007, 3:15 AM
Post #1 of 1
(998 views)
|
Hi everybody!! I am new on this language, but i need for doing a script in perl which have to monitor oracle tablespaces used space with NagiosGraph. I`ve done a script for nagios which do this output :ESTADO DE TABLESPACES-->CRITICAL: :/SYSAUX 100% :/SYSTEM 99% :/USERS 99% WARNING: OK: :/EXAMPLE 68% :/TS_PRUEBAJAH 13% :/UNDOTBS1 10% What I want is to monitor this with nagiosgraph. I`ve done this in perl: /output:.*CRITICAL:.*/ and do{ my @_pct =/:\/(\S+) (\d+)%/g; while ( my($_d,$_b,$_i) = splice @_pct,0,2 ) { my @_s; /perfdata:.*$_d=(\d+);(\d+)/; push @s, [ TABLESPACES, [ portzentaia, GAUGE, $_b ]]; } }; In this case only appears the graph of the first tablespace, and we want the average of all ones.
|