I am trying to set up some anomaly detections. I have an index that has field http.response.status_code
. This is a long and contains the HTTP status code.
I am trying to create a detector that will search my index, however, I am failing to achieve this
If I go to Dev Tools, I am able to search my index. I have tried a few different ways
{
"query": {
"range": {
"http.response.status_code": {
"gte": 400,
"lt": 500
}
}
}
}
and
{
"query": {
"terms": {
"http.response.status_code": [
"400",
"401",
"200"
]
}
}
}
These all return documents, but when I use the same code under custom expression in AD I get an query error
Custom query error: [1:1309] [terms] unknown field [http.response.status_code]
The end goal is that I am trying to set up a detector that will detect an increase in 4XX and 5XX which is in field http.response.status_code
Any suggestions?