mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[Alert details page] Fix exception in loading alert history stats (#208352)](https://github.com/elastic/kibana/pull/208352) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maryam Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2025-01-28T14:11:34Z","message":"[Alert details page] Fix exception in loading alert history stats (#208352)\n\n## Summary\r\n\r\nThis PR fixes the following bug on the alert details page, not sure what\r\nhas changed to cause this issue:\r\n\r\n```\r\nError: Unable to retrieve alert details for alert with id of \"undefined\" or with query \"{\"bool\":{\"must\":[{\"term\":{\"kibana.alert.rule.uuid\":\"f90968a7-8723-4bf6-9472-1053a4e70ec1\"}},{\"term\":{\"kibana.alert.instance.id\":\"host-2\"}},{\"range\":{\"kibana.alert.time_range\":{\"from\":\"now-30d\",\"to\":\"now+1d\"}}}]}}\" and operation find \r\nError: ResponseError: x_content_parse_exception\r\n Caused by:\r\n x_content_parse_exception: [1:333] [bool] failed to parse field [must]\r\n Root causes:\r\n parsing_exception: [range] query does not support [from]\r\n```\r\n\r\n|Before|After|\r\n|---|---|\r\n\r\n||","sha":"95a160ca94e45ffd063f1037bce6eb1a5c5dd372","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","backport:prev-minor"],"title":"[Alert details page] Fix exception in loading alert history stats","number":208352,"url":"https://github.com/elastic/kibana/pull/208352","mergeCommit":{"message":"[Alert details page] Fix exception in loading alert history stats (#208352)\n\n## Summary\r\n\r\nThis PR fixes the following bug on the alert details page, not sure what\r\nhas changed to cause this issue:\r\n\r\n```\r\nError: Unable to retrieve alert details for alert with id of \"undefined\" or with query \"{\"bool\":{\"must\":[{\"term\":{\"kibana.alert.rule.uuid\":\"f90968a7-8723-4bf6-9472-1053a4e70ec1\"}},{\"term\":{\"kibana.alert.instance.id\":\"host-2\"}},{\"range\":{\"kibana.alert.time_range\":{\"from\":\"now-30d\",\"to\":\"now+1d\"}}}]}}\" and operation find \r\nError: ResponseError: x_content_parse_exception\r\n Caused by:\r\n x_content_parse_exception: [1:333] [bool] failed to parse field [must]\r\n Root causes:\r\n parsing_exception: [range] query does not support [from]\r\n```\r\n\r\n|Before|After|\r\n|---|---|\r\n\r\n||","sha":"95a160ca94e45ffd063f1037bce6eb1a5c5dd372"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208352","number":208352,"mergeCommit":{"message":"[Alert details page] Fix exception in loading alert history stats (#208352)\n\n## Summary\r\n\r\nThis PR fixes the following bug on the alert details page, not sure what\r\nhas changed to cause this issue:\r\n\r\n```\r\nError: Unable to retrieve alert details for alert with id of \"undefined\" or with query \"{\"bool\":{\"must\":[{\"term\":{\"kibana.alert.rule.uuid\":\"f90968a7-8723-4bf6-9472-1053a4e70ec1\"}},{\"term\":{\"kibana.alert.instance.id\":\"host-2\"}},{\"range\":{\"kibana.alert.time_range\":{\"from\":\"now-30d\",\"to\":\"now+1d\"}}}]}}\" and operation find \r\nError: ResponseError: x_content_parse_exception\r\n Caused by:\r\n x_content_parse_exception: [1:333] [bool] failed to parse field [must]\r\n Root causes:\r\n parsing_exception: [range] query does not support [from]\r\n```\r\n\r\n|Before|After|\r\n|---|---|\r\n\r\n||","sha":"95a160ca94e45ffd063f1037bce6eb1a5c5dd372"}}]}] BACKPORT--> Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
This commit is contained in:
parent
d5bcef977d
commit
fdbc5baf63
2 changed files with 6 additions and 3 deletions
|
@ -174,7 +174,7 @@ describe('useAlertsHistory', () => {
|
|||
'{"size":0,"rule_type_ids":["apm"],"consumers":["foo"],"query":{"bool":{"must":[' +
|
||||
'{"term":{"kibana.alert.rule.uuid":"cfd36e60-ef22-11ed-91eb-b7893acacfe2"}},' +
|
||||
'{"term":{"kibana.alert.instance.id":"instance-1"}},' +
|
||||
'{"range":{"kibana.alert.time_range":{"from":"2023-04-10T00:00:00.000Z","to":"2023-05-10T00:00:00.000Z"}}}]}},' +
|
||||
'{"range":{"kibana.alert.time_range":{"gte":"2023-04-10T00:00:00.000Z","lte":"2023-05-10T00:00:00.000Z"}}}]}},' +
|
||||
'"aggs":{"histogramTriggeredAlerts":{"date_histogram":{"field":"kibana.alert.start","fixed_interval":"1d",' +
|
||||
'"extended_bounds":{"min":"2023-04-10T00:00:00.000Z","max":"2023-05-10T00:00:00.000Z"}}},' +
|
||||
'"avgTimeToRecoverUS":{"filter":{"term":{"kibana.alert.status":"recovered"}},' +
|
||||
|
@ -217,7 +217,7 @@ describe('useAlertsHistory', () => {
|
|||
body:
|
||||
'{"size":0,"rule_type_ids":["apm"],"query":{"bool":{"must":[' +
|
||||
'{"term":{"kibana.alert.rule.uuid":"cfd36e60-ef22-11ed-91eb-b7893acacfe2"}},' +
|
||||
'{"range":{"kibana.alert.time_range":{"from":"2023-04-10T00:00:00.000Z","to":"2023-05-10T00:00:00.000Z"}}}]}},' +
|
||||
'{"range":{"kibana.alert.time_range":{"gte":"2023-04-10T00:00:00.000Z","lte":"2023-05-10T00:00:00.000Z"}}}]}},' +
|
||||
'"aggs":{"histogramTriggeredAlerts":{"date_histogram":{"field":"kibana.alert.start","fixed_interval":"1d",' +
|
||||
'"extended_bounds":{"min":"2023-04-10T00:00:00.000Z","max":"2023-05-10T00:00:00.000Z"}}},' +
|
||||
'"avgTimeToRecoverUS":{"filter":{"term":{"kibana.alert.status":"recovered"}},' +
|
||||
|
|
|
@ -150,7 +150,10 @@ export async function fetchTriggeredAlertsHistory({
|
|||
: []),
|
||||
{
|
||||
range: {
|
||||
[ALERT_TIME_RANGE]: dateRange,
|
||||
[ALERT_TIME_RANGE]: {
|
||||
gte: dateRange.from,
|
||||
lte: dateRange.to,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue