We want to push legency system's log to BAM, and to send email to administrator if an exception occurs.
Data publisher helps a lot, but I don't know about CEP. How can I manage the email sent real time?
Asked
Active
Viewed 394 times
1

Community
- 1
- 1

wiwengweng
- 352
- 1
- 4
- 16
1 Answers
1
If you are analyzing the logs real-time, you can use WSO2 CEP with an email output event adaptor to generate notifications as emails. For a sample on generating email notifications, you can refer to sample no. 0106 here.
You will have to write a query to detect exceptions in the logs here. Writing a filter query with 'contains' clause may be enough if you are just detecting the occurrences of word 'exception'. You can find documentation on writing filters here.

Rajeev Sampath
- 2,739
- 1
- 16
- 19
-
Yes, thanks a bucket! And in fact, I have thought a Scenario that, I can push all the logs of legecy system into BAM, and writing hive scripts to analyse and display using BAM, but for real time, like I mentioned above, if an exeption occurs, CEP should response qiuckly to notify administrators. So I think BAM+CEP is a great choise. Can you show the difference between logstash solution and this one? I see the do the same thing. – wiwengweng Nov 27 '13 at 06:41
-
And I see the samples 0106 and follow the instruction to run it. Unfortunatly the BuildFailureNotificationStreamFormatter.xml is inactive because of Dependency not loaded [Dependency: outputBuildFailStatisticsStream:1.0.0]. How can I fix this? – wiwengweng Nov 27 '13 at 10:16
-
Did you modify the sample? Goto 'Event streams' inside 'main' in management console and check whether outputBuildFailStatisticsStream is there. – Rajeev Sampath Nov 27 '13 at 17:06
-
outputBuildFailStatisticsStream is the output stream of the query... if you modify the query without modifying the exported streams section, it may not load. – Rajeev Sampath Nov 27 '13 at 17:44
-
it is working now. You may find a bug in the wso2cep-samples.bat script, that it copies the stream-manager-config.xml to repository, but in fact should be repository/conf. That's why I confront with this. :) this line :copyfile if exist ..\samples\artifacts\%cn%\stream-manager-config.xml copy ..\samples\artifacts\%cn%\stream-manager-config.xml ..\repository\ > nul goto run – wiwengweng Nov 28 '13 at 01:02
-
hi Rajeev, I see the Siddhi support persistence in MYSQL ect. If we perform data analysis using mysql and feed the result to display, at the same time, BAM is able to perform the data analysis in cassandra and display in gadget server. any difference between these two method? – wiwengweng Nov 28 '13 at 02:38
-
It actually depends on your intent. If you want to do periodic batch analysis (of probably large data sets), BAM should be used. if you want to do real-time analysis (as the data flows in), CEP is the option. CEP is intended to analyse fast flowing data. Of course you may be able to use CEP to act like BAM and do batch analysis with some hacks... – Rajeev Sampath Nov 28 '13 at 15:11