---------- Forwarded message ----------
From: Isham Mohamed <is...@wso2.com>
Date: Fri, Nov 17, 2017 at 2:34 PM
Subject: Anomaly Detection in JIra Using CEP
To: d...@wso2.com
Cc: Sriskandarajah Suhothayan <s...@wso2.com>, Tishan Dahanayakage <
tis...@wso2.com>, Srinath Perera <srin...@wso2.com>


Hi All,
This is regarding monitoring jira and alert support people once there is an
anomaly situation occur.
There are some complicated scenarios to be implemented and we have come up
with some siddhi queries.
Just want to know if there is any better way to do it.
Product: wso2das-3.1.0
siddhi version: 3.1.2

*  Scenario 1*
*Stream* *Definition*: *Alert1(minTime string, maxTime string, issueCount
long, latestIssue string, tableBody string)*

*Scenario*: When there is a new alert with a higher issueCount than the
alerts came within 10 mins ago, send the current alert. if the issueCount
is not higher than the latest alert, then send no alert.

*Solution*:
*from Alert1#window.time(10 min)*
*select minTime, maxTime, issueCount , max(issueCount) as maxCount,
latestIssue, tableBody*
*insert all events into Alert_seq;*

*from e1=Alert_seq[e1.maxCount==2]*
*select minTime,maxTime,issueCount,latestIssue,tableBody*
*insert into Alert;*

*from every e1=Alert_seq, e2=Alert_seq[e1.maxCount < e2.maxCount ]*
*select minTime,maxTime,e2.issueCount,e2.latestIssue, e2.tableBody*
*insert into Alert;*

 *Scenario 2*
*Stream Definition:* *stream1(uniqueID string, other string )*

*Scenario:* Unique First Time Window (send only the first event came with a
uniqueID within a time Period)

*Solution:*
*from Alert1#window.time(10 min)*
*select uniqueID,other, count() as alertCount*
*group by uniqueID*
*having [alrtCount == 1]*
*insert insert into stream2;*

Thanks.









-- 

Isham Mohamed
*Trainee Software Engineer*
WSO2

p: +94778696585 <+94%2077%20869%206585>

<https://lk.linkedin.com/in/isham-mohamed-890792109>.



-- 

Isham Mohamed
*Trainee Software Engineer*
WSO2

p: +94778696585

<https://lk.linkedin.com/in/isham-mohamed-890792109>.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to