Ad Widget

Collapse

A simple way to discover Oracle tablespace

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hardysimpson1984
    Junior Member
    • Jul 2013
    • 5

    #1

    A simple way to discover Oracle tablespace

    I write a little shell script to discover and monitor oracle's tablespace. I'am lazy to create a repo on github, so publish here.

    I use some scripts from zabora, with is quite neat.

    1. create oracle user with zabbix_user.txt
    2. unzip ux.zip, put oraenv, cont.sql in some path, change the shell alternatively
    3. the actual work script is otbs.discovery, which provide tablespace discovery, and otbs.sh, get the item of each tablespace.

    put 2 lines in zabbix_agentd.conf

    UserParameter=oracle.tbs.discovery[*],/home/zabbix/shbin/otbs.discovery.sh
    UserParameter=oracle.tbs[*],/home/zabbix/shbin/otbs.sh $1 $2

    the 2nd shell work as follows

    oracle.tbs[SYSTEM,total] -- the total space of SYSTEM, in bytes
    oracle.tbs[SYSTEM,free] -- the free space of SYSTEM, in bytes
    oracle.tbs[SYSTEM,pused] -- the percentage of SYSTEM used

    The discovery, item and trigger can be set as describes above.
    Attached Files
Working...