Table of Contents
Introduction
This sample demonstrates how to set up an execution plan with a quartz scheduler based cron window for generating periodic alerts on build failures.
...
Code Block |
---|
from buildStatisticsStream[isBuildFailed == true]#window.cron("0 0 1 * * * ? ") select project, productTeam, lastCommitter, count(timeStamp) as totalBuildFailures group by project insert into buildFailureStream; |
...
Open another terminal, go to
<CEP_HOME>/samples/producers/http
and run the following command:ant -Durl=http://localhost:9763/endpoints/buildStatisticsEventReceiver -Dsn=0115
It builds the http client and publishes the events at
<CEP_HOME>/samples/artifacts/0115/buildStatisticsEvents.txt
to the buildStatisticsEventReceiver http endpoint.You can see the events getting received by CEP by the logs in its console .
Info | ||
---|---|---|
The above query will output the processed events at "1 am" as defined in the execurion plan. You can edit the query in "BuildFailureStatisticsPlan.siddhiql" file which is located in <CEP_HOME>/samples/artifacts/0115/executionplans to reschedule as per requirement.
|