Tuesday, December 8, 2009

Short tutorial on using Weblogic Diagnostics and watches

see
http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e13952/taskhelp/diagnostics/CreateWatchesForADiagnosticModule.html

the trick is: DO NOT FORGET TO TARGET YOUR WATCH to a server!
I have chosen the dummy criteria JRockitRuntimeMBean.Uptime > 1, which triggers immediately.
You should see in the log this (set the Severity and Log Watch Severity to error, just to be sure it does log)

<8 déc. 2009 18 h 35 CET> <Notice> <Diagnostics> <BEA-320068> <Watch 'sockets' with severity 'Error' on server 'myserver' has triggered at 8 déc. 2009 18 h 35 CET. Notification details:
WatchRuleType: Harvester
WatchRule: (${[weblogic.management.runtime.JRockitRuntimeMBean]//Uptime} >= 1)
WatchData: com.bea:Name=myserver,ServerRuntime=myserver,Type=JRockitRuntime//Uptime = 17420813
WatchAlarmType: AutomaticReset
WatchAlarmResetPeriod: 60000
>


You can use the JMS notification: use weblogic.jms.ConnectionFactory as Connection Factory for your alarm queue.

It will generate a MapMessage.

No comments: