[HOWTO] Monitor Oracle via SNMP

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

Post Reply
bigmarlydude
Posts: 1
Joined: Wed Oct 02, 2002 8:59 am

[HOWTO] Monitor Oracle via SNMP

Post by bigmarlydude »

I wanted to contrib some info on how I got cacti to monitor some of the Oracle Intelligent Agent stats. btw cacti rocks!

First off I wanted a central repository for monitor everything, and I mean everything. cacti is the tool to use. If you all want to know how to monitor iPlanet via snmp, I'll contrib that also, but later!

Anyhow! Oracle, lets monitor!!!! BTW this is Oracle on Solaris. Oracle on Linux, it's about the same.

Step 1: I found a Doc out on the web on how to configure net-snmp with oracle, it was out on the net-snmp website, I went looking for it the other day, but was unable to find it, basically oracle uses a snmp proxy. Your main snmpd runs on port 1161, you tweak the oracle encapsulator ( $ORACLE_HOME/network/snmp/peer/CONFIG.encap to include the 1.3.6.1.2.1.2021 and 1.3.6.1.4.1.2021 oid's for net-snmp and what port the "agent" (net-snmp) runs at (port 1161).

Step 2: I changed the CONFIG.master changed the line "ALLOW ALL OPERATIONS" to "ALLOW GET OPERATIONS"

Step 3: Tweaked the start_peer, changed some of the SNMPD lines to point to my net-snmpd.conf file.

Step 4: Started the peer by running this as root:
#export ORACLE_HOME=/path/to/your/oracle/dir
#$ORACLE_HOME/network/snmp/peer/start_peer -a

Step 5: Start the dbsnmp agent
#su - oracle
oracle>lsnrctl dbsnmp_start

Step 6: check and see if things started:
#ps -ef |grep snmp

root 11527 1 0 Sep 26 ? 0:03 /usr/local/ucd-snmp/sbin/snmpd -c /usr/local/ucd-snmp/share/snmp/snmpd.conf -p
oracle 11763 1 0 Sep 26 ? 0:46 dbsnmp
oracle 11764 11763 0 Sep 26 ? 1:09 dbsnmp

#ps -ef | grep encap
root 11523 1 0 Sep 26 ? 0:02 ./encap_peer -t 1162 -s 1160 -c CONFIG.encap

things look good!

lets try a walk.... I want to walk .1.3.6.1.2.1.39 first, I want to get some oid values out of this tree first.

$snmpwalk {ipaddress_of_dbhost} public .1.3.6.1.2.1.39.1.1.1.4

if you don't get anything, then you got a problem with the agent.... Try looking at this doc http://download-west.oracle.com/otndoc/ ... 68/ch2.htm

Look for this oid 39.1.1.1.4.x = "your_dbname"

you want to know what the .x is, mine is .8 for "your_dbname"

Lets say you want to look at your Oracle database Transaction Rate (tps) "oraDbSysUserCommits" by using this doc http://download-west.oracle.com/otndoc/ ... 8/data.htm you will see the oid for oraDbSysUserCommits = 1.3.6.1.4.1.111.4.1.1.1.23 you will need to add the x vaulue from the .39.1.1.1.4 tree to the end of the 111 oid, so my oid for oraDbSysUserCommits in my first database is = to .1.3.6.1.4.1.111.4.1.1.1.23.8

In cacti use the Get SNMP Data data input tool to grab this snmp info.

Monitor on!
fletch
Cacti User
Posts: 132
Joined: Mon Oct 06, 2003 5:40 pm
Location: Stanford, CA

Oracle stats via SNMP - the cookbook link

Post by fletch »

Here is the link I followed (googled for "net-snmp oracle")

http://www.jimweller.net/article.php?st ... mode=print


- I now have access to the Oracle Intelligent Agent stats via SNMP -

Does anyone have some templates I can plunder or is it time to start slogging through the Oracle MIBs?

Thanks!
mazzo
Posts: 2
Joined: Mon Aug 02, 2004 5:20 am

iplanet

Post by mazzo »

Thanks for the info on oracle.
We have a couple of servers running on iPlanet software (mail, web, etc), and would like to monitor that with cacti.

If you have any information on this topic, you'll make my day ;-)

Thanks a lot!
ropeguru

Re: iplanet

Post by ropeguru »

mazzo wrote:Thanks for the info on oracle.
We have a couple of servers running on iPlanet software (mail, web, etc), and would like to monitor that with cacti.

If you have any information on this topic, you'll make my day ;-)

Thanks a lot!
mazzo,

Looks like the mibs for your iPlanet servers are already loaded. Follow this link and should help you a little more:

http://mailbox.isux.com:82/manual/ag/essnmp.htm#1024860
hrz520520
Posts: 4
Joined: Wed May 28, 2008 8:03 am

Post by hrz520520 »

As i know,oracle 10g has no path about $ORACLE_HOME/network/snmp,
could you tell me how to setup oracle snmp?
Thanks a lot
ealcaniz
Posts: 40
Joined: Fri Sep 30, 2011 3:37 am

Re: [HOWTO] Monitor Oracle via SNMP

Post by ealcaniz »

I have oracle 11g and agent snmp working but I imported templates and assign the host (that check other snmp well)

I got this when I create the graphics
|host_description| - Oracle - |query_DbName| DbSysTable

have I to fill it? or it's auto?
Thanks

Edu
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: [HOWTO] Monitor Oracle via SNMP

Post by TheWitness »

Perform research on 'Data Queries' in the first link in my signature.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
brylle28
Posts: 1
Joined: Wed Nov 09, 2011 7:15 am

Re: [HOWTO] Monitor Oracle via SNMP

Post by brylle28 »

I really wanted to know that there is any tools monitoring software of an Oracle Database server farm.?Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests