PDA

View Full Version : Monitoring WebLogic Server with Zabbix ??


rjorge99
18-04-2008, 20:15
Hi, somebody knows if is possible to monitor a WebLogic Server with zabbix?? I wanna know how many connections it has in some moment; I mean, to know how many hosts are connected to the server...

Thanks

Kees Jan Koster
18-04-2008, 21:26
Dear rjorge99,

Yes, it is possible, although I have not monitored WebLogic servers myself.

I assume that you already use Zabbix. Are you running WebLogic on Java 1.5+? If so, you can use the Zapcat WAR file and deploy that in your WebLogic server. You have to enable JMX in your JVM also. More information is on the Zapcat site (http://www.kjkoster.org/zapcat/).

As for the specifc items you ask for, use JConsole to find what JMX mbeans WebLogic uses to expose these statistics, then tell Zabbix to monitor those JMX mbeans.

Let me know how you fare.

(Disclaimer: Zapcat is my pet project)

rjorge99
21-04-2008, 18:14
hm... I have been reading and I found out that the version of weblogic8.1 works with jdk 1.4.2; so I think that zapcat won't works on this :s.

Thanks anyway

Kees Jan Koster
21-04-2008, 19:54
From a systems management perspective, Java 1.4 is a disaster. It's a black box process that's really hard to pry open and glean what's going on inside.

What you can do is to try and run WebLogic on Java 1.6 and see if everything works. Apart from the odd reference to 'enum' there is really nothing in 1.4 that would not work in 1.5 or 1.6.

Failing that, you can try to install the JMX extensions in your webapp and find what you can and cannot see in WebLogic. There are several command line utilities that allow you to query JMX mbeans from a monitoring agent.

bvr1210
04-07-2008, 19:30
Can you tell me how to monitor Weblogic using zapcat & zabbix .

As in how to's of zapcat i deployed the zapcat.war . when i telnet to the port 10052 ,
ZBXD☺►ZBX_NOTSUPPORTED

Connection to host lost.

is displayed on the screen , i'm using Zabbix verison 1.4.4 on Ubunt 7.1 gutsy

Any help would be absolutely appreciated

thanks in advance

Kees Jan Koster
04-07-2008, 22:49
Well, that output might actually mean that everything is working as expected. :-)

When I telnet to a test server here and just hit the enter key (so that a single newline is sent to the Zapcat agent), it behaves just like you say:


% telnet 192.168.0.1 10052
Trying 192.168.0.1...
Connected to mac.
Escape character is '^]'.

ZBXDZBX_NOTSUPPORTEDConnection closed by foreign host.
% _


However, if I paste in something that the agent understands, it responds differently:


% telnet 192.168.0.1 10052
Trying 192.168.0.1...
Connected to mac.
Escape character is '^]'.
system.property[java.version]
ZBX1.5.0_13Connection closed by foreign host.
% _


So my question is, what did you send to the Zapcat agent? Have you tried sending it a query string that it understands?

bvr1210
07-07-2008, 10:25
Thanks for your reply,

when i check in the zabbix console i see none of them are supoorted , it says not supported by zabbix agent . I have attached the screen shot for the same

even in the zabbix server logs i see the same error
4780:20080707:135024 Parameter [jmx[java.lang:type=GarbageCollector,name=PS MarkSweep][CollectionCount]] is not supported by agent on host

Kees Jan Koster
07-07-2008, 21:13
Dear bvr1210,

Your screenshot seems to be missing.

It is normal that some items are not supported. For example, the JVM knows many garbage collectors (GC's), but only uses two of them. The Zapcat template includes all possible GC's. You should see that most are marked "not supported", and that two are marked "Active".

Also, you did not answer my question from my previous post. Once again: what did you send to the Zapcat agent using telnet?

Could you check the "Latest values" screen for your JVM too, please?

Kees Jan

bvr1210
09-07-2008, 09:25
Thanks very much for your help :) .. i was able to get it working .. as you said ..when you telnet to 10052 port just copy & paste the command , it worked .. earlier i used to type in the whole command .

The problem was with the host configuration , i had not changed the host port to 10052 in the zabbix , cos of which i never used to get any values from the zapcat .

One more query , is there anyways to actually monitor the jsp pages meaning , the actual time taken for the jsp page to load ..

Kees Jan Koster
09-07-2008, 09:46
Dear bvr1210,

Glad it works for you now. Great.

As for your JSP question: I wish more people would monitor page response times. It gives so much insight in what your application is doing.

The difficult part is, is that page response time monitoring is specific to your application server. Tomcat has some mbeans in place to monitor that and maybe weblogic has too, but I do not know.

If you follow my directions on exploring JMX (http://www.kjkoster.org/zapcat/Exploring_JMX.html), or check the mbeans.jsp page in the Zapcat WAR file, you can get a feel for what mbeans your application server exposes.

If that server has useful beans, add them to your own host configuration.

If you find no useful mbeans, you'll have to resort to writing your own. If you cannot program Java yourself, get one of your company's developers to write them for you. My solution would be to introduce a servlet filter (http://www.google.com/search?q=servlet+filter+tutorial) and use that to measure response times. Then you can publish these times using a custom mbean (http://www.google.com/search?q=mbean+tutorial).

Of course, once you have JSP page response time monitoring up and running I'd love to hear about your solution. Maybe you could share your solution on this forum?

Kees Jan Koster
17-07-2008, 15:49
Actually, you can turn on response time logging in Apache or Tomcat easily. I posted about that on the java-monitor forum (http://java-monitor.com/forum/showthread.php?t=5). Not sure how that would work for other application servers. Also, you'd have to write a shell script of some kind to aggregate the information for consumption by Zabbix.