Skip to content

Instantly share code, notes, and snippets.

@JosefJezek
Created November 8, 2013 14:23
Show Gist options
  • Save JosefJezek/7371708 to your computer and use it in GitHub Desktop.
Save JosefJezek/7371708 to your computer and use it in GitHub Desktop.
Monitoring Oracle Database with Zenoss

Monitoring Oracle Database with Zenoss

Zenpacks

Setup Oracle Instant Client and Python package cx_Oracle

Download this RPMs from http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

basic: oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
SDK/devel: oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm
sudo rpm -Uvh ~/oracle-instantclient11.2-basic-*
sudo rpm -Uvh ~/oracle-instantclient11.2-devel-*

su - zenoss

echo '# Oracle Instant Client' >> $HOME/.bashrc
echo 'export ORACLE_VERSION="11.2"' >> $HOME/.bashrc
echo 'export ORACLE_HOME="/usr/lib/oracle/$ORACLE_VERSION/client64"' >> $HOME/.bashrc
echo 'export PATH=$PATH:"$ORACLE_HOME/bin"' >> $HOME/.bashrc
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$ORACLE_HOME/lib"' >> $HOME/.bashrc
. $HOME/.bashrc
easy_install-2.7 cx_Oracle

Remote Collector

/opt/zenoss/etc/zenperfsql.conf
hubusername     admin
hubpassword     zenoss

Create user zenoss on Oracle DB

su - oracle
sqlplus
Enter user-name: / as sysdba
create user zenoss
identified by zenoss01
default tablespace USERS
temporary tablespace TEMP
profile DEFAULT;

grant connect to zenoss;
grant select on v_$database to zenoss;
grant select on dba_tablespaces to zenoss;
grant select on dba_data_files to zenoss;
grant select on v_$sysmetric to zenoss;
grant select on dba_free_space to zenoss;
grant select on v_$session to zenoss;
grant select on dba_objects to zenoss;
grant select on dba_segments to zenoss;

Testing

zenperfsql run -d example.com

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment