OSB Alerts - Purging is Essential

Oracle Service Bus allows Alert actions to be configured within the message flow (pipeline alerts). These pipeline alert actions generate alerts based on message context in a pipeline, to send to an alert destination. They are then displayed on the dashboard within the Service Bus console. The Alert duration history can be configured to display these alerts for a period of between 30 minutes to 6 hours. After that time, all alerts can be viewed by selecting the “Extended Alert History” tab.

alerts.jpg

The alert processing in OSB utilises the underlying WebLogic diagnostic framework (WLDF). By default, the alert data is stored with all other diagnostic data in a file store within the WebLogic domain. The components that make up WLDF will be targeted to a single managed server in a clustered environment or to the Admin server in a single server environment. To establish what managed server this is, check to see where the WLI Aggregator application is targeted to. The WLDF data will be stored under this single managed server in the following location: //domain_name/servers/server_name/data/store/diagnostics/

If the Alert action is used, then the total number of alerts will keep increasing unless they are purged. If they get to a large enough level (many thousands), this will cause the following issues:
1. The alert dashboard will become unusable. You won’t be able to get to the Extended Alert History and you won’t be able to get to the alert detail page. I have found that the underlying query the console uses, will time out due to the amount of the data.
2. If the file store is allowed to get large enough (GB’s in size), then the respective managed server will take a long time (more than 30 minutes) to start.

The best way to keep your alerts under control is to purge them on a regular basis. The following WLST script extract, purges all alerts older than the number of days specified.



# Calculate end time in milliseconds

now = System.currentTimeMillis()

startTime = 0

days = Integer(days_to_keep).intValue()

endTime = (now - days * 3600 * 24 * 1000)

print "Deleting records older than", days_to_keep, "days old from AlSB Alerts"

alsbAlerts = cmo.getWLDFRuntime().getWLDFAccessRuntime().lookupWLDFDataAccessRuntime('CUSTOM/com.bea.wli.monitoring.alert')

numDeleted = alsbAlerts.deleteDataRecords(startTime,endTime,"")

print "Number deleted =", numDeleted


Also remember that in WebLogic 9.2, you will still need to compact your file store as a separate process. The space a flat file store uses will not be released, even though you have purged the data. To compact a file store, use the WLST “compactstore” command.

Comments:

Post a Comment:
Comments are closed for this entry.
About

Oracle Service Bus Best Practices

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today