weblogic monitoring via snmp or custom scripts?

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

scott.russell
Posts: 8
Joined: Fri Jun 13, 2008 5:31 am

ooops..

Post by scott.russell »

I think port 1161 is used by weblogic... check as follows(unix/linux only):-

netstat -an|grep 1161
edgalura
Posts: 14
Joined: Fri Jun 06, 2008 3:23 pm

Post by edgalura »

Thanks scott for your prompt reply.

I executed the command you specified with a minor tweak to fit my requirements, good things you left a detailed explanation :-)

Code: Select all

[myserver@root ~]# snmpwalk -v 1 -c myshipserv@shipserv30 apollo:1161 .1.3.6.1.4.1.140.625.340.1.1
SNMPv2-SMI::enterprises.140.625.340.1.1.32.57.55.98.99.97.56.102.101.49.102.98.98.100.98.99.52.55.48.48.48.51.56.53.101.97.102.102.99.98.102.102.100 = STRING: "97bca8fe1fbbdbc47000385eaffcbffd"
I check the port 1161 on the server where my weblogic is installed and this is what it display:

Code: Select all

apollo:~ # netstat -an |grep 1161
udp        0      0 :::1161                 :::*

So i guess its nothing wrong here? Also the port 1161 was the port number that I use for SNMP agent request for weblogic, since im getting an error when I use the port 161 stating that the port already in use.
Might be the snmp daemon.

Which is why when I configure the SNMP manager in weblogic, I specified the Host server where cacti run and the port 161. (Is this correct)

I updated the sunjvm.xml file OID /REG and place the value you specifed on your previous post and now manage to get results :-)

Code: Select all

+ Running data query [12].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/sunjvm.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.140.625.340.1.1'
+ Located input field 'jvmRuntimeIndex' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.1.32.57.55.98.99.97.56.102.101.49.102.98.98.100.98.99.52.55.48.48.48.51.56.53.101.97.102.102.99.98.102.102.100' [value='97bca8fe1fbbdbc47000385eaffcbffd']
+ Located input field 'jvmRuntimeObjectName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.5.32.57.55.98.99.97.56.102.101.49.102.98.98.100.98.99.52.55.48.48.48.51.56.53.101.97.102.102.99.98.102.102.100' [value='JVMRuntime:ShipServAdmin30']
+ Located input field 'jvmRuntimeName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.15.32.57.55.98.99.97.56.102.101.49.102.98.98.100.98.99.52.55.48.48.48.51.56.53.101.97.102.102.99.98.102.102.100' [value='ShipServAdmin30']
+ Located input field 'versionNumber' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.35.32.57.55.98.99.97.56.102.101.49.102.98.98.100.98.99.52.55.48.48.48.51.56.53.101.97.102.102.99.98.102.102.100' [value='1.4.2_05']
+ Located input field 'OSName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.45.32.57.55.98.99.97.56.102.101.49.102.98.98.100.98.99.52.55.48.48.48.51.56.53.101.97.102.102.99.98.102.102.100' [value='Linux']
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/sunjvm.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/sunjvm.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/sunjvm.xml'
But I guess the value you specified is only for this xml cause when I tried updating the other 3 xml files ( cluster, jrock and execute queues) no value was return.

Where can I get the correct OID for this 3 xml's?
I think I'm almost halfway finish here, hope you guys could still assist me.

Thanks
scott.russell
Posts: 8
Joined: Fri Jun 13, 2008 5:31 am

Post by scott.russell »

>So i guess its nothing wrong here? Also the port 1161 was the port >number that I use for SNMP agent request for weblogic, since im getting >an error when I use the port 161 stating that the port already in use.
>Might be the snmp daemon.

It is probably the underlying operating system's snmp daemon that is listening on the port 161.

Also the ":::1161" that you are seeing from the netstat command indicates that something is listening on the ipV6 address on your box. Personally, I prefer not to have anything else listening on ipv4 or ipv6. Either way, the fact you are getting a response from snmpwalk is a good thing. You now have working snmp from weblogic. Congrats....


Now for OID's... there was a link for weblogic 9.2 in an earlier post, however I will repeat it here....

http://edocs.bea.com/wls/docs92/snmp/index.html

I confesss that I prefer to do an snmpwalk for each and every oid that I choose, just so that I know what the parameter I chose is retruning something good.


Give it a go...

Sc0tt...
edgalura
Posts: 14
Joined: Fri Jun 06, 2008 3:23 pm

Its finally working!

Post by edgalura »

Hi scott,

Finally figure out on how to indicate the correct OID.

All 3 queries seems to be running now, except for the weblogic cluster since our dev server was not configure as a cluster type.

Host detection should be set as :

Device detection :ping
Method: udp
ping port: 23

Once it manage to ping the host, its all set.

Note:
In order to view the graph, create a graph with the snmp data queries, not with the graph template.

To the one who post the weblogic template and to the one who help me setting up this graph, Thank you very much! :P
shakenfr
Posts: 2
Joined: Fri Jul 25, 2008 1:57 am

weblogic template on server 8 & 10

Post by shakenfr »

Hello,
With the template of this thread, I have no problem to obtain graph with Weblogic 10 but for Weblogic 8.1 it's strange.
I have a weblogic 8.1 cluster, the data queries of the jvm is good but the data queries of Weblogic_cluster doesn't return something :

OK for sunjvm :

+ Running data query [27].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/users/cacti/cacti-0.8.7b/resource/snmp_queries/sunjvm.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.140.625.340.1.1'
+ Located input field 'jvmRuntimeIndex' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.1.32.52.99.55.55.53.97.100.53.56.102.98.98.55.102.57.49.102.55.102.49.100.48.49.49.50.49.51.54.53.48.53.55' [value='4c775ad58fbb7f91f7f1d01121365057']
+ Located input field 'jvmRuntimeObjectName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.5.32.52.99.55.55.53.97.100.53.56.102.98.98.55.102.57.49.102.55.102.49.100.48.49.49.50.49.51.54.53.48.53.55' [value='JVMRuntime:ESAWL814_admin']
+ Located input field 'jvmRuntimeName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.15.32.52.99.55.55.53.97.100.53.56.102.98.98.55.102.57.49.102.55.102.49.100.48.49.49.50.49.51.54.53.48.53.55' [value='ESAWL814_admin']
+ Located input field 'versionNumber' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.35.32.52.99.55.55.53.97.100.53.56.102.98.98.55.102.57.49.102.55.102.49.100.48.49.49.50.49.51.54.53.48.53.55' [value='1.4.2_05']
+ Located input field 'OSName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.45.32.52.99.55.55.53.97.100.53.56.102.98.98.55.102.57.49.102.55.102.49.100.48.49.49.50.49.51.54.53.48.53.55' [value='SunOS']
+ Found data query XML file at '/users/cacti/cacti-0.8.7b/resource/snmp_queries/sunjvm.xml'
+ Found data query XML file at '/users/cacti/cacti-0.8.7b/resource/snmp_queries/sunjvm.xml'
+ Found data query XML file at '/users/cacti/cacti-0.8.7b/resource/snmp_queries/sunjvm.xml'


KO for cluster

+ Running data query [25].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/users/cacti/cacti-0.8.7b/resource/snmp_queries/Weblog-cluster.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.140.625.110.1.1'
+ No SNMP data returned
+ Found data query XML file at '/users/cacti/cacti-0.8.7b/resource/snmp_queries/Weblog-cluster.xml'
+ Found data query XML file at '/users/cacti/cacti-0.8.7b/resource/snmp_queries/Weblog-cluster.xml'
+ Found data query XML file at '/users/cacti/cacti-0.8.7b/resource/snmp_queries/Weblog-cluster.xml'


any idea ?
niqhil
Posts: 2
Joined: Fri Aug 11, 2006 10:41 am

Post by niqhil »

shakenfr

For some reason I am not able to get results from any of the queries. (ExecuteQueue, sunjvm etc)

I am using Weblogic 10 and have enabled domain scoped snmp agent and am able to snmpwalk using the community@domain.

I don't see any of the oids (.1.3.6.1.4.1.140.625.180.1.1, .1.3.6.1.4.1.140.625.110.1.1) when I snmpwalk .1.3.6.14.1.140.625.

Any idea what could be wrong here?

--Enabled MBeans-- That did it.
Aleph
Posts: 3
Joined: Tue Dec 16, 2008 3:03 am

weblogic_sun_jvm.xml

Post by Aleph »

Hi all,

the snmp query below allows you to get back the data of all servers at once and choose which graph you want to draw.

<interface>
<name>Get weblogic JVM metrics</name>
<description>queries weblogic snmp agent to get jvm info</description>
<oid_index>.1.3.6.1.4.1.140.625.340.1.15</oid_index>
<oid_index_parse>OID/REGEXP:\.1\.3\.6\.1\.4\.1\.140\.625\.340\.1\.15\.(.*)$</oid_index_parse>
<index_order>Index:Name</index_order>
<fields>
<Name>
<name>Name</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.140.625.340.1.15</oid>
</Name>
<HeapFreeCurrent>
<name>HeapFreeCurrent</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.140.625.340.1.25</oid>
</HeapFreeCurrent>
<HeapSizeCurrent>
<name>HeapSizeCurrent</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.140.625.340.1.30</oid>
</HeapSizeCurrent>
</fields>
</interface>

If you're intersted in the graph templates I'll add them.

Working on pool thread now.


Aleph
thomasvincent
Posts: 3
Joined: Tue Apr 04, 2006 8:58 pm
Contact:

JDBC, JMS Templates

Post by thomasvincent »

Has anyone had any luck with a JDBC or JMS Template?
ledub
Posts: 4
Joined: Thu Apr 09, 2009 4:14 am

Re: weblogic monitoring via snmp or custom scripts?

Post by ledub »

I need help to enable snmp agent on a weblogic 10 server with managed servers
thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests