ZABBIX Forums  
  #1  
Old 19-01-2007, 10:10
den_crane den_crane is offline
Senior Member
 
Join Date: Feb 2006
Location: Russia
Posts: 253
Send a message via ICQ to den_crane
Default Oracle monitoring

Unzip ZABORA.zip, change oracle environment in oraenv, change oracle connection params (user/pass) in cont.sql, change full path to oraenv and cont.sql in zabora.

Code:
$ ./zabora
zabora version: 1.2
usage:
    ./zabora checkactive [SID]     -- Check Intance is active and open.
    ./zabora usercount [SID]       -- Count of users connected to Oracle.
    ./zabora activeusercount [SID] -- Count of active users.
    ./zabora dbsize [SID]          -- Size of user data (without temp).
    ./zabora dbfilesize [SID]      -- Size of all datafiles.
    ./zabora version [SID]         -- Oracle version (Banner).
    ./zabora dsksortratio [SID]    -- Disk sorts ratio.
    ./zabora rcachehit [SID]       -- Read Cache hit ratio.
    ./zabora uptime [SID]          -- Instance Uptime (seconds).
    ./zabora commits [SID]         -- User Commits.
    ./zabora rollbacks [SID]       -- User Rollbacks.
    ./zabora deadlocks [SID]       -- Deadlocks.
    ./zabora redowrites [SID]      -- Redo Writes.
    ./zabora tblscans [SID]        -- Table scans (long tables).
    ./zabora tblrowsscans [SID]    -- Table scan rows gotten.
    ./zabora indexffs [SID]        -- Index fast full scans (full).
    ./zabora hparsratio [SID]      -- Hard parse ratio.
    ./zabora netsent [SID]         -- Bytes sent via SQL*Net to client.
    ./zabora netresv [SID]         -- Bytes received via SQL*Net from client.
    ./zabora netroundtrips [SID]   -- SQL*Net roundtrips to/from client.
    ./zabora logonscurrent [SID]   -- Logons current.
    ./zabora lastarclog [SID]      -- Last archived log sequence.
    ./zabora lastapplarclog [SID]  -- Last applied archive log (at standby).
    ./zabora freebufwaits [SID]    -- free buffer waits.
    ./zabora bufbusywaits [SID]    -- buffer busy waits.
    ./zabora logswcompletion [SID] -- log file switch completion.
    ./zabora logfilesync [SID]     -- log file sync.
    ./zabora logprllwrite [SID]    -- log file parallel write.
    ./zabora enqueue [SID]         -- enqueue waits.
    ./zabora dbseqread [SID]       -- db file sequential read waits.
    ./zabora dbscattread [SID]     -- db file scattered read.
    ./zabora dbsnglwrite [SID]     -- db file single write.
    ./zabora dbprllwrite [SID]     -- db file parallel write.
    ./zabora directread [SID]      -- direct path read.
    ./zabora directwrite [SID]     -- direct path write.
    ./zabora zaboraver             -- Version of this script.
Test the script
Code:
$ ./zabora version
Oracle8i Release 8.1.7.4.0 - Production
Add UserParameter to zabbix_agentd.conf
Code:
$echo "UserParameter=oracle[*],/opt/zabbix/zabora \$1 \$2" >>zabbix_agentd.conf
Test from zabbix agent
Code:
$ ./zabbix_agentd -c /etc/zabbix_agentd.conf -t oracle[version]
oracle[/opt/zabbix/zabora version ]           [t|Oracle8i Release 8.1.7.4.0 - Production]
Add Items in Zabbix
Code:
Description                               Type          Key                   Type of information Units      Update interval Store value  History    Trends      Applications
Oracle/Deadlocks.                         ZABBIX agent  oracle[deadlocks]     Numeric (integer)              600             Delta        7          365         Oracle
Oracle/Disk sorts ratio.                  ZABBIX agent  oracle[dsksortratio]  Numeric (float)     %          600             As Is        7          365         Oracle
Oracle/Hard parse ratio.                  ZABBIX agent  oracle[hparsratio]    Numeric (float)     %          600             As Is        7          365         Oracle
Oracle/Index fast full scans (full).      ZABBIX agent  oracle[indexffs]      Numeric (integer)              600             Delta        7          365         Oracle
Oracle/Intance is active and open.        ZABBIX agent  oracle[checkactive]   Numeric (integer)              300             As Is        7          365         Oracle
Oracle/Read Cache hit ratio.              ZABBIX agent  oracle[rcachehit]     Numeric (float)     %          600             As Is        7          365         Oracle
Oracle/Redo Writes.                       ZABBIX agent  oracle[redowrites]    Numeric (integer)              600             Delta        7          365         Oracle
Oracle/Size of all datafiles.             ZABBIX agent  oracle[dbfilesize]    Numeric (integer)   B          7200            As Is        7          365         Oracle
Oracle/Size of user data (without temp).  ZABBIX agent  oracle[dbsize]        Numeric (integer)   B          7200            As Is        7          365         Oracle
Oracle/Table scan rows gotten.            ZABBIX agent  oracle[tblrowsscans]  Numeric (integer)              600             Delta        7          365         Oracle
Oracle/Table scans (long tables).         ZABBIX agent  oracle[tblscans]      Numeric (integer)              600             Delta        7          365         Oracle
Oracle/Uptime.                            ZABBIX agent  oracle[uptime]        Numeric (integer)   s          600             As Is        7          365         Oracle
Oracle/User Commits.                      ZABBIX agent  oracle[commits]       Numeric (integer)              600             Delta        7          365         Oracle
Oracle/User Rollbacks.                    ZABBIX agent  oracle[rollbacks]     Numeric (integer)              600             Delta        7          365         Oracle
Oracle/Usercount                          ZABBIX agent  oracle[usercount]     Numeric (integer)              300             As Is        7          365         Oracle
Oracle/Version                            ZABBIX agent  oracle[version]       Character                      7200            As Is        7          365         Oracle
Oracle/ZaboraVer                          ZABBIX agent  oracle[zaboraver]     Character                      7200            As Is        3          365
Attached Files
File Type: zip ZABORA.zip (2.4 KB, 67931 views)
Reply With Quote
  #2  
Old 23-01-2007, 17:25
Paul Hanson Paul Hanson is offline
Junior Member
 
Join Date: Dec 2006
Location: Tulsa, Oklahoma USA
Posts: 5
Thumbs up Thanks!

Thanks for sharing this.
Reply With Quote
  #3  
Old 29-01-2007, 16:42
jcanning jcanning is offline
Junior Member
 
Join Date: Mar 2006
Posts: 5
Default Many Thanks!

Thanks so much for posting this. It's what I have been looking for.

Cheers!
Reply With Quote
  #4  
Old 30-01-2007, 11:21
den_crane den_crane is offline
Senior Member
 
Join Date: Feb 2006
Location: Russia
Posts: 253
Send a message via ICQ to den_crane
Default

Good news wildcards in ZabbixW32.exe works.

I created zabora.bat :

Code:
C:\ZABBIX>zabora.bat uptime
10193506
UserParameter=oracle[*],c:\zabbix\zabora.bat $1 $2
Timeout=30
Attached Files
File Type: zip zabora_win.zip (2.3 KB, 990 views)
Reply With Quote
  #5  
Old 30-01-2007, 16:12
den_crane den_crane is offline
Senior Member
 
Join Date: Feb 2006
Location: Russia
Posts: 253
Send a message via ICQ to den_crane
Default

On some windows system environment variable path invisible for services, and zabora.bat couldn't find sqlplus.

set nls_lang=american_cis.cl8mswin1251
set path=C:\ora92\bin

if user LocalSystem (owner of zabbix service) not included in group ORA_DBA, cont.sql requare real password for "conn" command
Reply With Quote
  #6  
Old 01-02-2007, 15:35
den_crane den_crane is offline
Senior Member
 
Join Date: Feb 2006
Location: Russia
Posts: 253
Send a message via ICQ to den_crane
Default

Oracle user for zabora:
Code:
CREATE USER "ZABBIX" IDENTIFIED BY "password";
GRANT "CONNECT" TO "ZABBIX";
grant select on v_$instance to zabbix;
grant select on v_$sysstat to zabbix;
grant select on v_$session to zabbix;
grant select on dba_free_space to zabbix;
grant select on dba_data_files to zabbix;
grant select on dba_tablespaces to zabbix;
grant select on v_$log to zabbix;
grant select on v_$archived_log to zabbix;
grant select on v_$loghist to zabbix;
grant select on v_$system_event to zabbix;
grant select on v_$event_name to zabbix;

Last edited by den_crane; 25-07-2008 at 10:47.
Reply With Quote
  #7  
Old 25-04-2007, 22:46
mfortier mfortier is offline
Junior Member
 
Join Date: Apr 2007
Location: Sherbrooke, QC, CANADA
Posts: 4
Default

thank you for sharing
__________________
Maxime
Reply With Quote
  #8  
Old 14-06-2007, 19:22
StanZoid StanZoid is offline
Member
 
Join Date: Oct 2005
Location: Salt Lake City, Utah
Posts: 47
Send a message via ICQ to StanZoid Send a message via AIM to StanZoid Send a message via Yahoo to StanZoid
Default

Do you have mods to allow this to check multiple instances on a single server?

StanZoid
Reply With Quote
  #9  
Old 15-06-2007, 02:25
Treitor Treitor is offline
Junior Member
 
Join Date: Feb 2006
Posts: 14
Thumbs up Thank´s for these scripts

Thank´s a lot for these scripts.
__________________
=====================
Treitor
Brazil - RJ
-------------------
Helpers go to haven

=====================
Reply With Quote
  #10  
Old 22-06-2007, 13:43
den_crane den_crane is offline
Senior Member
 
Join Date: Feb 2006
Location: Russia
Posts: 253
Send a message via ICQ to den_crane
Default

Quote:
Originally Posted by StanZoid
Do you have mods to allow this to check multiple instances on a single server?

StanZoid
./zabora checkactive [SID]
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:36.