Post : http://localhost:9090/rest/metadata/policies


-sudha Jenslin

 
> On Mar 22, 2017, at 4:47 PM, Jean Rossier <[email protected]> wrote:
> 
> Hi Jean,
> 
> You can create policies either through rest API or through Eagle UI.
> 
> Rest API:
> Post : 
> 
> {
>    "name": "hdfsPolicy_1",
>    "description": "hdfsPolicy",
>    "inputStreams": [
>       "HDFS_AUDIT_LOG_ENRICHED_STREAM_EAGLE_LP"
>    ],
>    "outputStreams": [
>       "HDFS_AUDIT_LOG_ENRICHED_STREAM_EAGLE_LP"
>    ],
>    "definition": {
>       "type": "siddhi",
>       "value": "from HDFS_AUDIT_LOG_ENRICHED_STREAM_SANDBOX[src=='/tmp'] 
> select * insert into Audit_log_alert"
>    },
>    "alertDefinition":
>               {"templateType":"TEXT",
>               "subject”:”Test Alert : eagle alert",
>               "body”:"Tmp : test alert",
>               "severity":"CRITICAL",
>               "category":"test"
>               },
>    "partitionSpec": [
>       {
>          "streamId": "HDFS_AUDIT_LOG_ENRICHED_STREAM_EAGLE_LP",
>          "type": "GROUPBY",
>          "columns" : [
>             "user"
>          ]
>       }
>    ],
>    "parallelismHint": 2
> }
> 
> You can follow the below given document:
> https://cwiki.apache.org/confluence/display/EAG/5.1+Create+Alert+Policy 
> <https://cwiki.apache.org/confluence/display/EAG/5.1+Create+Alert+Policy>
> https://cwiki.apache.org/confluence/display/EAG/Quick+Start+with+Alert+Engine+through+API
>  
> <https://cwiki.apache.org/confluence/display/EAG/Quick+Start+with+Alert+Engine+through+API>
> 
> Regards,
> Sudha Jenslin

Reply via email to