How to do complex event processing using node-red

In node-red how can we do complex event processing. I am using node-red-contrib-cep node for complex event processing , is there any alternative or any simple example on this node-red-contrib-cep node only having examples of pattern,window,filter based rule.

The example which they have mentioned in node-red-contrib-cep node is not sufficient and hard to understand.

Can you give an example of what you would like to do?

Like filter, window, pattern based situations.Like for example filter means it will check whether data is ==, >= , <= , !=,> ,< . For window based examples it should store based on time or message length and it should store and support aggregate functions such as MAX,AVG. Then for pattern based rule it should support increment, decrement. Sequential rule also.

So... half of those like the builtin switch node?

If you think the docs are hard to understand, you could open an issue on the nodes github page and work with the nodes author to improve the docs. That way hopefully you and the community both benefit.

Also if there are missing features then I think adding them to that node would be the best solution. So again working with the author to improve the node would be good.

Some of this is easily handled with the existing switch node. For things like aggregations, you'll want to be saving data points somewhere to be able to perform the comparative analysis. Increment/decrements can be handled pretty easily in the function node. Some advanced things like statistical analysis over long periods of time may be easier if you utilize something like a time-series database (influx or similar.)


while my node-red-contrib-calc only covers simple mathematics, Dean's node-red-contrib-statistics node might contain some calculations you could use ...

1 Like