-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Closed
Copy link
Labels
Description
Description
Found in 6.4.0-BC1
According to documentation:
If your detector uses lat_long, metric, rare, or freq_rare functions, you cannot specify conditions for your rule.
If the user tries to create a job that:
- uses one of the forbidden functions (
lat_long,metric,rareorfreq_rare) - has a custom rule specifying a condition with
applies_toset totime
... the job gets created, even though it shouldn't have according to documentation.
Steps to reproduce
- Create a job that uses one of the forbidden functions (
lat_long,metric,rareorfreq_rare) and has a custom rule with a time condition:
PUT _xpack/ml/anomaly_detectors/custom_rule_forbidden_function
{
"analysis_config": {
"detectors": [
{
"function": "metric",
"field_name": "someFieldName",
"custom_rules": [
{
"actions": [
"skip_result"
],
"conditions": [
{
"applies_to": "time",
"operator": "gte",
"value": 0
}
]
}
]
}
]
},
"data_description": {}
}- Notice the job was created, even though it shouldn't have according to documentation.