Trigger User Alarms
You can trigger alarms that can be viewed on the NetMon Alarms page.
The following example shows alarms triggering when the Logger is sent an intermediate flow, a short running flow, and a long running flow.
function Flow_TriggerMyUserAlarm (dpiMsg, ruleEngine) require 'LOG' local function isempty(s) return s == nil or s == '' end if (IsIntermediateFlow(dpiMsg)) then local ruleSev = "high" EZINFO("INFO: Trigger Alarm for Intermediate Flow" ) TriggerUserAlarm(dpiMsg, ruleEngine, ruleSev) end
if (IsFinalShortFlow(dpiMsg)) then local ruleSev = "medium" EZINFO("INFO: Trigger Alarm for Final Short Flow" ) TriggerUserAlarm(dpiMsg, ruleEngine, ruleSev) end
if (IsFinalLongFlow(dpiMsg)) then local ruleSev = "low" EZINFO("INFO: Trigger Alarm for Final Long Flow" ) TriggerUserAlarm(dpiMsg, ruleEngine, ruleSev) end end |