diff --git a/features/org.wso2.analytics.apim.feature/src/main/resources/siddhi-files/apim_alert_frequent_tier_limit_hitting_0.siddhi b/features/org.wso2.analytics.apim.feature/src/main/resources/siddhi-files/apim_alert_frequent_tier_limit_hitting_0.siddhi index d994bf3bc..7bef32241 100644 --- a/features/org.wso2.analytics.apim.feature/src/main/resources/siddhi-files/apim_alert_frequent_tier_limit_hitting_0.siddhi +++ b/features/org.wso2.analytics.apim.feature/src/main/resources/siddhi-files/apim_alert_frequent_tier_limit_hitting_0.siddhi @@ -27,6 +27,8 @@ define stream ThrottledOutStream( apiContext string, apiCreator string, apiCreatorTenantDomain string, + apiResourceTemplate string, + apiMethod string, applicationId string, applicationName string, subscriber string, @@ -75,7 +77,7 @@ insert into TemporaryUserStream; --this query ensures that the same type of alert is not generated for same apiCreator again for a time defined in #window.time(), @info(name = 'Query contains Suppression logic') -from TemporarySubscriberStream#window.length(1) as a left outer join SuppressedTemporarySubscriberStream#window.time(10 minute) as b +from TemporarySubscriberStream#window.length(1) as a left outer join SuppressedTemporarySubscriberStream#window.time(10 minutes) as b on (a.apiCreator == b.apiCreator and a.apiVersion == b.apiVersion and a.applicationId == b.applicationId) select a.apiCreator, a.apiName, a.apiVersion, a.applicationId, a.applicationName, a.apiCreatorTenantDomain, a.userTenantDomain, a.subscriber, a.numHits having b.apiCreator is null @@ -83,7 +85,7 @@ insert into SuppressedTemporarySubscriberStream ; --this query ensures that the same type of alert is not generated for same user again for a time defined in #window.time() @info(name = 'Alert Suppression') -from TemporaryUserStream#window.length(1) as a left outer join SuppressedTemporaryUserStream#window.time(10 minute) as b +from TemporaryUserStream#window.length(1) as a left outer join SuppressedTemporaryUserStream#window.time(10 minutes) as b on (a.username == b.username and a.apiVersion == b.apiVersion and a.applicationId == b.applicationId) select a.username, a.apiCreator, a.apiName, a.apiVersion, a.applicationId, a.applicationName, a.apiCreatorTenantDomain, a.userTenantDomain, a.subscriber, a.numHits having b.username is null