Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Alerting] Log more descriptive error messages when runtime field mappings are updated to be incompatible with original query #95516

Closed
ymao1 opened this issue Mar 26, 2021 · 2 comments · Fixed by #96254
Assignees
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@ymao1
Copy link
Contributor

ymao1 commented Mar 26, 2021

Based on this investigation, we have determined that when runtime field mappings are updated to be incompatible with the originally defined type (date to keyword for a field used in a time range query for example, the index-threshold and es-query stack rule executions will fail with a search_phase_execution_exception that is logged in the event log. The actual error coming back from ES is usually more descriptive. It would be helpful to capture these more descriptive error messages to aid in debugging rule execution failures.

Some examples of the errors coming back from ES:

{
  "type": "query_shard_exception",
  "reason": "failed to create query: For input string: \"2021-03-25T18:35:54.545Z\"",
  "index_uuid": "znV1kqQrTEuOWgad1KOBBw",
  "index": "es-apm-sys-sim",
  "caused_by": {
  "type": "number_format_exception",
    "reason": "For input string: \"2021-03-25T18:35:54.545Z\""
  }
}
{
  "type": "illegal_argument_exception",
  "reason": "Field [second_timestamp] of type [keyword] does not support custom formats",
  "caused_by": {
    "type": "illegal_argument_exception",
    "reason": "Field [second_timestamp] of type [keyword] does not support custom formats"
  }
}
{
  "type": "illegal_argument_exception",
  "reason": "Field [free_memory] of type [keyword] is not supported for aggregation [avg]",
  "caused_by": {
    "type": "illegal_argument_exception",
    "reason": "Field [free_memory] of type [keyword] is not supported for aggregation [avg]"
  }
}
@ymao1 ymao1 added bug Fixes for quality problems that affect the customer experience Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Mar 26, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@ymao1 ymao1 removed the bug Fixes for quality problems that affect the customer experience label Mar 26, 2021
@mikecote
Copy link
Contributor

+1. I've seen this issue for other types of rules and it's hard to debug (example).

@mikecote mikecote self-assigned this Apr 5, 2021
@chrisronline chrisronline assigned chrisronline and unassigned mikecote Apr 5, 2021
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants