Ad Widget

Collapse

Montoring oracle?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeremy
    Junior Member
    • Apr 2009
    • 6

    #1

    Montoring oracle?

    Hi,

    Can you give me a method for supervise an Oracle database, please
    thank you and sorry for my english, i am not very good
  • vins
    Member
    • Feb 2009
    • 31

    #2
    I use a perl script to monitor response times of oracle databases. I hope you've some perl knowledge... because maybe you'll need to modify it.

    A sql client is required for this script to work (I use oracle's instantclient: it's easy to install and it works fine).

    The script reads a config file with database parameters and then connects to databases, performs queries and the obtained response times are sent to zabbix server.

    The script is located at /home/zabbix/bin of the zabbix server. And it's desirable to run it from crontab, just like this:

    */5 * * * * /home/zabbix/bin/chkora.pl > /dev/null 2> /dev/null


    Zabbix Item config:
    Description: LIFERAY response time
    Type: ZABBIX Trapper
    Key: liferay.responsetime
    Type of information: Numeric (float)
    Store value: As is


    This is the chkora.cfg:

    title firstdb-lray
    url 172.16.45.2:1524:LRAY
    user LIFERAYuser
    pass LIFERAYpass
    query select count(*) from intranet_lportal.v_nag_lrayresponsetime
    zbxtrap 127.0.0.1:10051@[email protected]


    This is the format of the chkora.cfg file:

    title firstdb-firstschema
    url ipaddress:listenerport:sid
    user dbuser
    pass dbpass
    query sql query
    zbxtrap [zabbixserver-ipaddress]:[zabbixserver-port]@[database-hostname]@[zabbix-key]

    title firstdb-2ndschema
    url ipaddress:listenerport:sid
    user dbuser
    pass dbpass
    query sql query
    zbxtrap [zabbixserver-ipaddress]:[zabbixserver-port]@[database-hostname]@[zabbix-key]

    title seconddb-anotherschema
    url 172.16.1.3:1521:SID
    user username
    pass password
    query select count(*) from intranet_lportal.v_nag_lrayresponsetime
    zbxtrap 127.0.0.1:10051@[email protected]

    title ... and so

    Please, this script was designed in five minutes (well, maybe not this fast, but very quickly) and its scalability may be weak. But it works nice with less than 40-50 databases.

    Good luck!
    Attached Files

    Comment

    Working...