Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Linux NET-SNMP MRTG Oracle

Linux NET-SNMP MRTG Oracle

From: Thomas Willomitzer <willo_at_test.at>
Date: 5 Nov 2002 02:42:45 -0800
Message-ID: <d369a8ac.0211050242.6411e6f8@posting.google.com>


Thomas,  

Yes, you have to specify two sources. I didn't notice that in your conf.  

kind regards,
Ivan  

-----Original Message-----

From: Willomitzer Thomas [mailto:Thomas.Willomitzer_at_kuoni.at] Sent: dinsdag 5 november 2002 11:31
To: 'Saez Scheihing, I.A.'
Subject: AW: oracle snmp stuff

Hello Ivan,  

the mib resolution was no problem...but now i understood how mrtg works...  

unless you provide two mib sources source1&source2...mrtg tries to get ifInOctets.2 ifOutOctets.2 for a single mib...  

Your mrtg.cfg line
Target[ivan]: 1.3.6.1.2.1.27.1.1.8.2&.1.3.6.1.2.1.27.1.1.8.2:public_at_localhost is composed of two sources and that's why it works  

The single mib line
Target[ivan]: 1.3.6.1.2.1.27.1.1.8.2:public_at_localhost (requires ifInOctets.2 ifOutOctets.2)
produces errors  

The Errors for
sysUptime sysName on public_at_localhost
disappear with the nomib2 keyword in mrtg.cfg  

thanks a lot
Thomas  

p.s. maybe we should publish this thread somewhere...    

-----Ursprüngliche Nachricht-----

Von: Saez Scheihing, I.A. [mailto:I.A.Saez.Scheihing_at_tue.nl] Gesendet: Dienstag, 05. November 2002 07:35 An: 'Willomitzer Thomas'
Betreff: RE: oracle snmp stuff

Thomas,  

It seems that your problem is more related to mrtg than Oracle-snmp. The error :
error status: noSuchName
  index 4 (OID: 1.3.6.1.2.1.1.5.0)
indicates that mrtg can't read the sysname and that it expects a number but it gets a empty string.
Did you define the MIBDIRS environment variable? Probably mrtg isn't able to locate the mibs.
Try this simple mrtg conf I use  

YLegend[ivan]: Oracle
ShortLegend[ivan]: connecties

Legend1[ivan]: Oracle connecties
Legend2[ivan]:
Legend3[ivan]: Max Observed Oracle connecties
Legend4[ivan]:
LegendI[ivan]: &nbsp;Oracle :
LegendO[ivan]:

WithPeak[ivan]: ywm
MaxBytes[ivan]: 15
Options[ivan]: growright, gauge, nopercent Workdir: /home/oracle/product/8.1.7/Apache/Apache/htdocs/mrtg Target[ivan]: 1.3.6.1.2.1.27.1.1.8.2&.1.3.6.1.2.1.27.1.1.8.2:public_at_localhost Title[ivan]: Oracle Hits
PageTop[ivan]: <H2>Oracle Statistics: aantal connecties</H2>

Thus try to use the oid number instead of the variable name.  

kind regards,  

Ivan  

-----Original Message-----

From: Willomitzer Thomas [mailto:Thomas.Willomitzer_at_kuoni.at] Sent: maandag 4 november 2002 17:44
To: 'Saez Scheihing, I.A.'
Subject: AW: oracle snmp stuff

hello....
there is a little problem left....
seems like snmpwalk can get all the data but mrtg fails........  

please help me again before you post your cv to oracle :)....  

cheers
thom      

if i do



[root_at_stream mrtg]# snmpwalk -m all localhost public oraDbTablespaceSizeUsed.2.2
enterprises.oracle.oraDbMIB.oraDbObjects.oraDbTablespaceTable.oraDbTablespaceEntry.oraDbTablespaceSizeUsed.2.2 = 148480

i get the correct usage of the tablespace of 148480kb  

when i write this in the mrtg.conf there comes an error



[root_at_stream mrtg]# mrtg /etc/mrtg/mrtg.cfg SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 4 (OID: 1.3.6.1.2.1.1.5.0)
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
                  community: "public"
                 request ID: 1831483728
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)

 at /usr/bin/../lib/mrtg2/SNMP_util.pm line 450 SNMPGET Problem for ifInOctets.2 ifOutOctets.2 sysUptime sysName on public_at_localhost
 at /usr/bin/mrtg line 1491
WARNING: Expected a number but got ''
WARNING: Expected a number but got ''
Scalar found where operator expected at (eval 13) line 1, near "2. $"

        (Missing operator before $?)
ERROR: Target[lastfm.tablespace] eval warning: syntax error at (eval 13) line 1, near "2. $"


 

content of mrtg.conf  



# Minimal mrtg.cfg
#--------------------

LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/oradb.v1  

WorkDir: /web/site/html/admin/mrtg  

Target[eth0]: 2:public_at_localhost:1161
MaxBytes[eth0]: 12500000
Title[eth0]: LAST.FM Traffic Analysis PageTop[eth0]: <H1>LAST.FM Traffic Analysis</H1> BodyTag[eth0]: <body bgcolor="#837456" link="#DDDDDD">  

Target[cpusum]:ssCpuRawUser.0&ssCpuRawUser.0:public_at_localhost:1161 + ssCpuRawSystem.0&ssCpuRawSystem.0:public_at_localhost:1161 + ssCpuRawNice.0&ssCpuRawNice.0:public_at_localhost:1161 RouterUptime[cpusum]: public_at_localhost:1161 MaxBytes[cpusum]: 100
Title[cpusum]: CPU LOAD
PageTop[cpusum]: <H1>Active CPU Load %</H1> BodyTag[cpusum]: <body bgcolor="#837456" link="#DDDDDD"> Unscaled[cpusum]: ymwd
ShortLegend[cpusum]: %

YLegend[cpusum]: CPU Utilization
Legend1[cpusum]: Active CPU in % (Load)
Legend2[cpusum]:
Legend3[cpusum]:
Legend4[cpusum]:
LegendI[cpusum]:  Active
LegendO[cpusum]:
Options[cpusum]: growright,nopercent
 

Target[lastfm.tablespace]:
oraDbTablespaceSizeUsed.2.2:public_at_localhost RouterUptime[lastfm.tablespace]: public_at_localhost:1161 MaxBytes[lastfm.tablespace]: 100
Title[lastfm.tablespace]: Oracle lastfm tablespace usage PageTop[lastfm.tablespace]: <H1>Oracle lastfm tablespace usage %</H1> BodyTag[lastfm.tablespace]: <body bgcolor="#837456" link="#DDDDDD"> Unscaled[lastfm.tablespace]: ymwd
ShortLegend[lastfm.tablespace]: %

YLegend[lastfm.tablespace]: Tablespace Usage
Legend1[lastfm.tablespace]: Usage in %
Legend2[lastfm.tablespace]:
Legend3[lastfm.tablespace]:
Legend4[lastfm.tablespace]:
LegendI[lastfm.tablespace]:  Used
LegendO[lastfm.tablespace]:
Options[lastfm.tablespace]: growright,nopercent

--------------------------------------------------------------------------------------------

-----Ursprüngliche Nachricht-----

Von: Saez Scheihing, I.A. [mailto:I.A.Saez.Scheihing_at_tue.nl] Gesendet: Montag, 04. November 2002 16:26 An: 'Willomitzer Thomas'
Betreff: RE: oracle snmp stuff

Thomas,  

I'm glad it works for you! I think I'll send my CV to Oracle:-) If you want to play with Mrtg then let me know. I have a Mrtg website.  

kind regards,  

Ivan  

p.s. all the snmp stuff is poorly supported by Oracle (IMHO). In all their online support databases, Metalink, technet, etc there is nothing to be found about oranamesmib.
-----Original Message-----

From: Willomitzer Thomas [mailto:Thomas.Willomitzer_at_kuoni.at] Sent: maandag 4 november 2002 16:19
To: 'Saez Scheihing, I.A.'
Subject: AW: oracle snmp stuff

WOW!   Never got such precise help!
after editing the .v1 file and
lsnrctl dbsnmp_stop
lsnrctl dbsnmp_start
lsnrctl stop
lsnrctl start  

everything works!  

thanks for the help!
made my day...  

Cheers
Thomas
-----Ursprüngliche Nachricht-----

Von: Saez Scheihing, I.A. [mailto:I.A.Saez.Scheihing_at_tue.nl] Gesendet: Montag, 04. November 2002 16:10 An: 'Willomitzer Thomas'
Betreff: RE: oracle snmp stuff

Willomitzer ,  

Did you start de intelligent agent (lsnrctl dbsnmp_start)? My sequence for starting everything is:  

....
....  

        echo "starting snmp peer"
        $ORA_HOME/network/snmp/peer/start_peer -a 
        sleep5
        echo "Starting Oracle Databases (zie /var/opt/oracle/oratab)"
        $SU - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
        sleep 5
        echo "Starting Oracle Intelligent Agent (dbsnmp)"
        $SU - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl dbsnmp_start"
        sleep 5
        echo "Starting Oracle Names"
        $SU - $ORA_OWNER -c "$ORA_HOME/bin/namesctl start"
        sleep 5
        echo "Starting Oracle Listener"      
        $SU - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"  
....
....  

When you do a lsnrctl status do you see: SNMP ON or SNMP OFF?  

Try a snmpwalk -m all localhost public oraListenerTable to poll the listener or
a snmpwalk -m all localhost public rdbmsMIB to poll the rdbmsMIB  

The *.v1 files are not correct. In the onrs.v1 file you have to edit the
import section:  

        Counter
                FROM RFC1155-SMI

becomes  

        Counter, enterprises
                FROM RFC1155-SMI

 

-----Original Message-----

From: Willomitzer Thomas [mailto:Thomas.Willomitzer_at_kuoni.at] Sent: maandag 4 november 2002 15:22
To: 'Saez Scheihing, I.A.'
Subject: AW: oracle snmp stuff

config:  

oracle 8.1.7.0
Redhat 7.3
NET-SNMP version: 5.0.6
mrtg-2.9.17  

What i did (maybe completely wrong...)  

installed net-snmp, made it work for cpuload and eth0 traffic mrtg reporting cpuload and eth0  

Then thought would be nice to monitor oracle tablespaces edited the following files:  

$ORACLE_HOME/network/snmp/peer/CONFIG.master


TRANSPORT  ordinary        SNMP
           OVER UDP SOCKET
           AT PORT 161
 

COMMUNITY       public 
                ALLOW ALL OPERATIONS 
                USE NO ENCRYPTION 
MANAGER         localhost 
                SEND ALL TRAPS 
                WITH COMMUNITY PUBLIC

----------------------------------------------------------

$ORACLE_HOME/network/snmp/peer/CONFIG.encap



AGENT AT PORT 1161 WITH COMMUNITY public
SUBTREES        1.3.6.1.2.1.1, 
                1.3.6.1.2.1.2, 
                1.3.6.1.2.1.3, 
                1.3.6.1.2.1.4, 
                1.3.6.1.2.1.5, 
                1.3.6.1.2.1.6, 
                1.3.6.1.2.1.7, 
                1.3.6.1.2.1.8, 
                1.3.6.1.4.1.11.2 

FORWARD ALL TRAPS;
 

copied the $ORACLE_HOME/network/doc/*.v1 into /usr/share/snmp/mibs    

in the snmpd.conf (net-snmp) i added the line



agentaddress 1161

to let it listen to 1161 instead of 161 (which is now reserverd by the oracle master agent)  

killed the snmpd process
then started with
start_peer -a    

works fine for me:
> snmpget -p 1161 localhost public system.sysUpTime.0 system.sysUpTime.0 = Timeticks: (249785) 0:41:37.85  

> snmpget -p 161 localhost public system.sysUpTime.0 Error in packet
Reason: (noSuchName) There is no such variable name in this MIB. Failed object: system.sysUpTime.0      

is there any major mistake / misunderstanding.... the port swapping seems a bit strange ...  

Thanks in advance
thomas    

-----Ursprüngliche Nachricht-----

Von: Saez Scheihing, I.A. [mailto:I.A.Saez.Scheihing_at_tue.nl] Gesendet: Montag, 04. November 2002 15:13 An: 'Willomitzer Thomas'
Betreff: RE: oracle snmp stuff

Hi Willomitzer,  

Yes I did solve the problems. I can query the listener, rdbms and database mib. Only the Oracle Names
mib is still a problem. My conf is:

- oracle 8.1.7.4
- Redhat Linux 7.3
- ucd-snmp 4.2.4
- mrtg 2.9.18
 

Tell me what your problem is and maybe I can help you.  

kind regards,  

Ivan
-----Original Message-----

From: Willomitzer Thomas [mailto:Thomas.Willomitzer_at_kuoni.at] Sent: maandag 4 november 2002 15:06
To: 'i.a.saez.scheihing_at_tue.nl'
Subject: oracle snmp stuff

Hello Ivan!  

Have you solved your problems with snmp? I am in the same situation... What have you done to make it work?  

Thanks in advance    

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Hi,

I'm very close to solve my problem (to make Oracle snmp work with ucd-snmp). I can now poll the rdbms-mib (in database.v1):

oracle_at_linux:~/OraHome1/network/log > snmpget -m all localhost public rdbmsDbName.2
rdbmsMIB.rdbmsObjects.rdbmsDbTable.rdbmsDbEntry.rdbmsDbName.2 = "IVAN.tue.nl"

but when I try to pool the listener mib I get:

oracle_at_linux:~/OraHome1/network/log > snmpget -m all localhost public oraListenAddress.1
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB. Failed object:
enterprises.oracle.oraListenerMIB.oraListenerObjects.oraListenAddressTable.oraListenAddressEntry.oraListenAddress.1

I've also tried snmpwalk -m all localhost public enterprises.oracle.oraListenerMIB
but without results. Any ideas?

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 
 
 
 

Thomas Willomitzer
IT Development
Kuoni Reisebüro Ges.m.b.H.
Modecenterstrasse 16, A-1030 VIENNA, AUSTRIA Tel: +43 1 514 78 487
Fax: +43 1 514 78 9480 Received on Tue Nov 05 2002 - 04:42:45 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US