Policy Creator UI Design
General Mode
Policy Editor (General Mode) mainly supports some general alert template and provide easy-to-use template form and general native eagle policy in backend using the submitted form data and policy template.
Backend Support
// Interface interface org.apache.eagle.policy.GeneralPolicyTemplateBuilder { PolicyDefinition build(GeneralPolicyConfigs); } // Metadata GeneralPolicyTemplate { type: "SINGLE_SOURCE_THRESHOLD_ALERT" name: "Single Source Threshold Alert", description: "An alert policy template consuming single stream source." view: "/path/to/form", builder: "org.apache.eagle.policy.GeneralPolicyTemplateBuilder", configs: { from: HDFS_AUDIT_SRC_STREAM, partition: { type: "GROUPBY",field: "USER" }, window: { type: "SLIDING_WINDOW", configs: { length: "20 hour" } }, aggregators: [ { function: "SUM", field: "USER", alias: "USER_COUNT" } ], filters: [ { field: "USER_COUNT", function: ">", value: 20 }, { field: "USER", function: "NOT IN", value: "HADOOP, HDFS, MAPRED" } ] } }
Embedded Mode
Advanced Mode