Striim 3.9.7 documentation

ErrorHandling
Screen_Shot_2016-01-07_at_11.02.22_AM.png

This flow sends an alert immediately when an error appears in Log4ErrorWarningStream.

CREATE CQ GetErrors 
INSERT INTO ErrorStream 
SELECT log4j 
FROM Log4ErrorWarningStream log4j WHERE log4j.level = 'ERROR';

CREATE CQ SendErrorAlerts 
INSERT INTO ErrorAlertStream 
SELECT 'ErrorAlert', ''+logTime, 'error', 'raise', 'Error in log ' + message 
FROM ErrorStream;

GetErrors discards all WARN messages and passes only ERROR messages. In SendErrorAlerts, since the key value is logTime (which is different for every event) and the flag is raise (see Sending alerts from applications), an alert will be sent for every message in ErrorStream.