weblogic monitoring via snmp or custom scripts?

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

Moderators: Developers, Moderators

davidvincent
Posts: 5
Joined: Wed Mar 28, 2007 2:03 pm

Re : weblogic monitoring via snmp or custom scripts?

Post by davidvincent »

As explained at http://e-docs.bea.com/wls/docs81/snmpma ... ml#1072184.

Is your use community name "community_prefix" you only get data about the admin server.

If you use "community_prefix@server_name" you get data about server_name.

If you use "community_prefix@domain_name" you get data about the admin and all managed servers.

If you use this "community_prefix@domain_name" as a community name, datas are indexed per instance with an index value corresponding to the match of this regexp /enterprises.140.625.340.1.1.(.*)/.

Regards,
David.
yaohe
Posts: 2
Joined: Wed May 02, 2007 6:32 pm

Graph can not be generate

Post by yaohe »

Hi All,

I tried to set up BEA monitoring using those templates and still have some issue with poller.

The cacti version is cacti-0.8.6j

The SNMP Cache items look fine. But Poller Cache Items do not have anything shown on the graph.

I turn on the Debug and there is no error related to it.

I run php cmd.php hostid hostit and the issue is the same.

The hostid is 23. Is the following data right on mysql?

mysql> select * from data_local;
+-----+------------------+---------+---------------+------------+
| id | data_template_id | host_id | snmp_query_id | snmp_index |
+-----+------------------+---------+---------------+------------+
| 173 | 3 | 17 | 2 | 1 |
| 172 | 41 | 17 | 1 | 2 |
| 171 | 41 | 17 | 1 | 1 |
| 170 | 34 | 17 | 0 | |
| 169 | 47 | 17 | 0 | |
| 168 | 33 | 17 | 0 | |
| 167 | 31 | 17 | 0 | |
| 166 | 32 | 17 | 0 | |
| 165 | 30 | 17 | 0 | |
| 164 | 5 | 17 | 0 | |
| 163 | 4 | 17 | 0 | |
| 162 | 6 | 17 | 0 | |
| 215 | 62 | 23 | 0 | |
| 222 | 85 | 23 | 0 | |
+-----+------------------+---------+---------------+------------+
14 rows in set (0.00 sec)

mysql> select * from graph_local;
+-----+-------------------+---------+---------------+------------+
| id | graph_template_id | host_id | snmp_query_id | snmp_index |
+-----+-------------------+---------+---------------+------------+
| 120 | 2 | 17 | 1 | 1 |
| 121 | 2 | 17 | 1 | 2 |
| 122 | 3 | 17 | 2 | 1 |
| 119 | 13 | 17 | 0 | |
| 118 | 11 | 17 | 0 | |
| 117 | 4 | 17 | 0 | |
| 164 | 51 | 23 | 0 | |
| 178 | 86 | 23 | 0 | |
| 180 | 78 | 23 | 0 | |
+-----+-------------------+---------+---------------+------------+
9 rows in set (0.00 sec)

I can not find record on poller_item related to the graph and Data source debug information is:
Data Source Debug

/usr/bin/rrdtool create \
/var/www/cacti/rra/jvm_snmp_for_qaapp11s1_jvmruntimeheapsize_26.rrd \
--step 300 \
DS:jvmRuntimeHeapSize:GAUGE:600:0:U \
DS:jvmRuntimeHeapFree:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:1:8928 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:12:8760 \
RRA:AVERAGE:0.5:288:3650 \
RRA:MIN:0.5:1:8928 \
RRA:MIN:0.5:12:8760 \
RRA:MIN:0.5:288:3650 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:1:8928 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:12:8760 \
RRA:MAX:0.5:288:3650 \

Looks like Data Source also has some issue.

Could somebody provide any help on how to trouleshooting?

Thanks in advance,
Yao

Host: JVM SNMP for qaapp11s1 , SNMP Query: Weblogic Sun JVM
Index: 1.3.6.1.4.1.140.625.340.1.1.32.56.100.99.57.48.48.100.49.54.54.102.102.49.56.53.53.54.100.52.101.54.48.51.55.55.49.98.48.53.56.101.52 , Field Name: jvmRuntimeIndex , Field Value:
OID: .1.3.6.1.4.1.140.625.340.1.1.1.3.6.1.4.1.140.625.340.1.1.32.56.100.99.57.48.48.100.49.54.54.102.102.49.56.53.53.54.100.52.101.54.48.51.55.55.49.98.48.53.56.101.52
Host: JVM SNMP for qaapp11s1 , SNMP Query: Weblogic Sun JVM
Index: 1.3.6.1.4.1.140.625.340.1.1.32.56.100.99.57.48.48.100.49.54.54.102.102.49.56.53.53.54.100.52.101.54.48.51.55.55.49.98.48.53.56.101.52 , Field Name: jvmRuntimeName , Field Value:
OID: .1.3.6.1.4.1.140.625.340.1.15.1.3.6.1.4.1.140.625.340.1.1.32.56.100.99.57.48.48.100.49.54.54.102.102.49.56.53.53.54.100.52.101.54.48.51.55.55.49.98.48.53.56.101.52
Host: JVM SNMP for qaapp11s1 , SNMP Query: Weblogic Sun JVM
Index: 1.3.6.1.4.1.140.625.340.1.1.32.56.100.99.57.48.48.100.49.54.54.102.102.49.56.53.53.54.100.52.101.54.48.51.55.55.49.98.48.53.56.101.52 , Field Name: jvmRuntimeObjectName , Field Value:
OID: .1.3.6.1.4.1.140.625.340.1.5.1.3.6.1.4.1.140.625.340.1.1.32.56.100.99.57.48.48.100.49.54.54.102.102.49.56.53.53.54.100.52.101.54.48.51.55.55.49.98.48.53.56.101.52
Host: JVM SNMP for qaapp11s1 , SNMP Query: Weblogic Sun JVM
Index: 1.3.6.1.4.1.140.625.340.1.1.32.56.100.99.57.48.48.100.49.54.54.102.102.49.56.53.53.54.100.52.101.54.48.51.55.55.49.98.48.53.56.101.52 , Field Name: OSName , Field Value:
OID: .1.3.6.1.4.1.140.625.340.1.45.1.3.6.1.4.1.140.625.340.1.1.32.56.100.99.57.48.48.100.49.54.54.102.102.49.56.53.53.54.100.52.101.54.48.51.55.55.49.98.48.53.56.101.52
Host: JVM SNMP for qaapp11s1 , SNMP Query: Weblogic Sun JVM
Index: 1.3.6.1.4.1.140.625.340.1.1.32.56.100.99.57.48.48.100.49.54.54.102.102.49.56.53.53.54.100.52.101.54.48.51.55.55.49.98.48.53.56.101.52 , Field Name: versionNumber , Field Value:
OID: .1.3.6.1.4.1.140.625.340.1.35.1.3.6.1.4.1.140.625.340.1.1.32.56.100.99.57.48.48.100.49.54.54.102.102.49.56.53.53.54.100.52.101.54.48.51.55.55.49.98.48.53.56.101.52
yaohe
Posts: 2
Joined: Wed May 02, 2007 6:32 pm

Post by yaohe »

Hi All,

I fixed the issue. It is related to snmp_qurey xml file.

The original <oid_index_parse>OID/REGEXP seems do not work.

Regards,
Yao
clockwork
Posts: 22
Joined: Fri Feb 23, 2007 1:04 am

Post by clockwork »

This looks great and potentially a huge win. Where are you guys getting your snmp xml files ? Are you building them by hand ? Does anyone have a prebuilt set that would work for weblogic 8.1.5 ?

Also has a side note, if your doing snmp for the system on port 161 and you put weblogic on some other snmp port, what sort of setup are you going with as far as snmp proxy ? (net-snmp on linux/unix)
mwarchut
Posts: 1
Joined: Mon Feb 06, 2006 6:30 pm

Post by mwarchut »

yaohe wrote:Hi All,

I fixed the issue. It is related to snmp_qurey xml file.

The original <oid_index_parse>OID/REGEXP seems do not work.

Regards,
Yao
Can I ask what you did to fix this?? Thanks

Mike
davidvincent
Posts: 5
Joined: Wed Mar 28, 2007 2:03 pm

Can I ask what you did to fix this?

Post by davidvincent »

The original <oid_index_parse>OID/REGEXP will work or not depending the way your php/snmp plugin resolves parts of numerical oids to names.

Most implementations will resolve at least this part :
.iso.org.dod.internet.private.enterprises
.1.3.6.1.4.1

Then some will know about Weblo, and will resolve all of that :
.iso.org.dod.internet.private.enterprises.bea.wls
.1.3.6.1.4.1.140.625

Others dont even know about BEA and will return this :
.iso.org.dod.internet.private.enterprises.140.625

You must adapt the OID/REGEXP depending on how far your php/snmp plugin resolves oids to names.

Regards,
David.
Tommi
Posts: 10
Joined: Mon May 21, 2007 2:26 am

Re: Can I ask what you did to fix this?

Post by Tommi »

davidvincent wrote:The original <oid_index_parse>OID/REGEXP will work or not depending the way your php/snmp plugin resolves parts of numerical oids to names.
So, as my system gives with snmpwalk as seen below, I should be able to use the "<oid_index_parse>OID/REGEXP" part as it is delivered?

Original setting:
<oid_index_parse>OID/REGEXP:enterprises.140.625.340.1.1.(.*)$</oid_index_parse>

Code: Select all

snmpwalk -v 2c -c pharse asennustesti:17005 .1.3.6.1.4.1.140.625.340.1.1
SNMPv2-SMI::enterprises.140.625.340.1.1.32.102.50.100.53.52.101.48.57.97.57.56.55.52.49.57.56.57.51.53.51.97.50.49.49.97.99.55.49.53.53.50.100 = STRING: "f2d54e09a98741989353a211ac71552d"
Still cacti can't understand what it is getting from the WLS. Verbose Query ( Console -> Devices -> (Edit) ---> (Verbose Query) ) gives me "No SNMP data returned" (see below). But snmpwalk gives data, so the problem is on the xml-file?

I just don't know what to check next, I have tried different OID/REGEXP settings (from full numeric to bea.wls).

Code: Select all

+ Running data query [16].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/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'
+ No SNMP data returned
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/sunjvm.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/sunjvm.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/sunjvm.xml'
Btw. If someone is looking for the MIBs of weblogic (like i was...:)), you can found them here -> http://edocs.bea.com/wls/docs92/snmp/index.html (beware, it's a java-app, over 2 MB big)
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Moving to scripts/templates.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
scott.russell
Posts: 8
Joined: Fri Jun 13, 2008 5:31 am

weblogic monitoring via snmp - problems on cacti 0.8.7b

Post by scott.russell »

Hi...

Tried uploading the template provided into cacti. The template loads OK, but when I try to create graphs, I get the following error....

Notice: Undefined variable: column_counter in /usr/share/cacti/site/graphs_new.php on line 876

No errors are posted in the cacti logs(/var/log/cacti/cacti.log

I really have no idea how to track this down... any suggestions appreciated....

thanks

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

weblogic monitoring via snmp - problems on cacti 0.8.7b

Post by scott.russell »

hi,
I managed to track down that the following file was missing in my install...

/usr/share/cacti/site/resource/snmp_queries/Weblog_cluster.xml

I renamed the file cacti_data_query_weblogic_cluster.xml to Weblog_cluster.xml. And now I get the following error..... I am probably doing something silly... any suggestions appreciated....

Sc0tt.....


Notice: Undefined index: oid_index in /usr/share/cacti/site/lib/data_query.php on line 167

Notice: Undefined index: oid_index in /usr/share/cacti/site/lib/data_query.php on line 172

Warning: Variable passed to each() is not an array or object in /usr/share/cacti/site/lib/data_query.php on line 539

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/lib/data_query.php:167) in /usr/share/cacti/site/host.php on line 77
scott.russell
Posts: 8
Joined: Fri Jun 13, 2008 5:31 am

weblogic monitoring via snmp - problems on cacti 0.8.7b

Post by scott.russell »

Hi,

Sorry, I think I have been thinking out loud via email. Got past the installation issues...

I basically copied the correct files to the correct place. No renaming required!. So brain dead today. I still have an issue on the OID's for the weblog-cluster.xml, but could be they have changed since 8.1(I am using weblogic 9.2). I will investigate and try to start thinking inside my head instead of here....

apologies to all... and thanks for the scripts...

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

Post by scott.russell »

Folks,
I seem to have everything correct now, but my graphs are empty. I have done an snmp walk and everything seems fine. But when I do a "Data query verbose output" from the cacti console. The values returned are all blank. I am guessing there is an issue in the xml file, but I am at a loss to know what it is....Any help appreciated....

********* output of debug from cacti screen ***************

+ 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.1.3.6.1.4.1.140.625.340.1.1.32.50.57.48.49.101.51.57.55.57.53.101.101.56.53.56.52.56.48.97.51.48.101.52.57.100.98.57.57.52.48.101.48' [value='']
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.1.1.3.6.1.4.1.140.625.340.1.1.32.101.54.51.98.57.101.51.98.53.102.55.57.98.50.55.97.100.54.98.101.50.48.50.50.55.54.49.49.102.99.102.50' [value='']
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.1.1.3.6.1.4.1.140.625.340.1.1.32.102.50.100.53.52.101.48.57.97.57.56.55.52.49.57.56.57.51.53.51.97.50.49.49.97.99.55.49.53.53.50.100' [value='']
+ Located input field 'jvmRuntimeObjectName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.5.1.3.6.1.4.1.140.625.340.1.1.32.50.57.48.49.101.51.57.55.57.53.101.101.56.53.56.52.56.48.97.51.48.101.52.57.100.98.57.57.52.48.101.48' [value='']
+ Executing SNMP get for data @


**********snmp walk output below*******

snmpwalk -v 1 -c public myserver:161 .1.3.6.1.4.1.140.625.340.1.1
SNMPv2-SMI::enterprises.140.625.340.1.1.32.102.50.100.53.52.101.48.57.97.57.56.55.52.49.57.56.57.51.53.51.97.50.49.49.97.99.55.49.53.53.50.100 = STRING: "f2d54e09a98741989353a211ac71552d"
scott.russell
Posts: 8
Joined: Fri Jun 13, 2008 5:31 am

working now....

Post by scott.russell »

Folks,
I have managed to solve my issue. Seems that my regex was incorrect. In the file sunjvm.xml, I changed the regex as follows:-

before
<oid_index_parse>OID/REGEXP:enterprises.140.625.340.1.1.(.*)$</oid_index_parse>

After
<oid_index_parse>OID/REGEXP:1.3.6.1.4.1.140.625.340.1.1.(.*)$</oid_index_parse>

This all seems to work. Output from the Data query debug screen below for reference....

Many thanks...

Sc0tt.....


+ 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.50.57.48.49.101.51.57.55.57.53.101.101.56.53.56.52.56.48.97.51.48.101.52.57.100.98.57.57.52.48.101.48' [value='2901e39795ee858480a30e49db9940e0']
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.1.32.101.54.51.98.57.101.51.98.53.102.55.57.98.50.55.97.100.54.98.101.50.48.50.50.55.54.49.49.102.99.102.50' [value='e63b9e3b5f79b27ad6be20227611fcf2']
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.1.32.102.50.100.53.52.101.48.57.97.57.56.55.52.49.57.56.57.51.53.51.97.50.49.49.97.99.55.49.53.53.50.100' [value='f2d54e09a98741989353a211ac71552d']
edgalura
Posts: 14
Joined: Fri Jun 06, 2008 3:23 pm

Please help!

Post by edgalura »

i'm trying to setup our development server for this environment, but i'm having a hard time configuring and synchronizing all of the information posted on this thread.

The query like the most of you experience return a null value:

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.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='']
+ Located input field 'jvmRuntimeObjectName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.5.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='']
+ Located input field 'jvmRuntimeName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.15.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='']
+ Located input field 'versionNumber' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.35.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='']
+ Located input field 'OSName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.140.625.340.1.45.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='']
+ 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'
I tried to run this on the server which host weblogic but it didnt return any values either:

Code: Select all

snmpwalk -v 1 apollo -c myshipserv .1.3.6.1.4.1.140.625.340.1.1
I'm not exactly sure what to do next.

Also on the weblogic side, I followed the 1161 port for the SNMP agent but got confuse with the snmp manager, so I put the IP address of the Cacti server and the snmp port that i use. (im not sure if that the right value)

Would you be so kind enough to explain it in a simpliest way possible for I am new in to this SNMP trapping.

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

snmpwalk...help

Post by scott.russell »

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

Port 1161 is used by weblogic. Use 1162 instead...(change in weblogic console, then stop/start all admin and managed servers)

Then use this command:-

snmpwalk -v 1 -c apollo@mydomainname myshipserv:1162 .1.3.6.1.4.1.140.625.340.1.1


where:-
appollo = snmp community string
mydomainname = your weblogic domain name
myshipserv = your server
1162 = snmp port your server is listening on


give it a go and let us know if you can get at least snmpwalk working and we can go from there...

Sc0tt....
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests