[HOWTO] Monitor Oracle via SNMP
Moderators: Developers, Moderators
-
- Posts: 1
- Joined: Wed Oct 02, 2002 8:59 am
[HOWTO] Monitor Oracle via SNMP
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!
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!
Oracle stats via SNMP - the cookbook link
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!
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!
Re: iplanet
mazzo,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!
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
Re: [HOWTO] Monitor Oracle via SNMP
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?
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
Edu
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: [HOWTO] Monitor Oracle via SNMP
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?
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?
Re: [HOWTO] Monitor Oracle via SNMP
I really wanted to know that there is any tools monitoring software of an Oracle Database server farm.?Thanks!
Who is online
Users browsing this forum: No registered users and 0 guests