Send alert only if the error has http status code 500

I can send error alerts to a slack channel when an Java application send an error to APM. But I want to send only errors with status code 500.

I tried to put the following in the bool filter but now the alert does not send anything at all. I also tried to use http.response.status_code with the same result.

{
  "term": {
    "context.response.status_code": 500
  }
}

I am using Elastic Cloud. Everything is in 7.5.1 version.

I solved using:

{
  "term": {
    "http.response.status_code": "500"
  }
}

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.