elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.76k stars 8.17k forks source link

[ResponseOps][Alerts] Stack alerts page crashes on certain local storage configurations #193565

Open cnasikas opened 1 week ago

cnasikas commented 1 week ago

On certain local storage configurations, the alerts page in the Stack crashes. It is unknow how to reproduce these configurations from the UI.

Image Image

Steps to reproduce

  1. Go to DevTools and create the following rule. The rule will generate some alerts.
POST kbn:/api/alerting/rule
{
  "params": {
    "timeField": "@timestamp",
    "index": [
      ".kibana-event-log*"
    ],
    "esQuery": "{\n    \"query\":{\n      \"match_all\" : {}\n    }\n  }",
    "size": 100,
    "thresholdComparator": ">",
    "timeWindowSize": 10,
    "timeWindowUnit": "m",
    "threshold": [
      0
    ],
    "aggType": "count",
    "groupBy": "all",
    "termSize": 5,
    "searchType": "esQuery",
    "excludeHitsFromPreviousRun": false,
    "sourceFields": []
  },
  "consumer": "discover",
  "schedule": {
    "interval": "10s"
  },
  "tags": [],
  "name": "EQ rule with consumer: discover",
  "rule_type_id": ".es-query",
  "actions": []
}
  1. Add the following snippet to the stackAlerts.default.pageFilters local storage property.
Local storage snippet ```javascript { "viewMode": "view", "id": "8f6e7415-e181-4f76-a1ca-7131fc8ca7de", "panels": { "0": { "type": "optionsListControl", "order": 0, "grow": true, "width": "small", "explicitInput": { "id": "0", "dataViewId": "unified-alerts-dv", "fieldName": "kibana.alert.status", "title": "Status", "hideExclude": true, "hideSort": true, "hidePanelTitles": true, "placeholder": "", "ignoreParentSettings": { "ignoreValidations": true }, "selectedOptions": [ "active" ], "hideActionBar": true, "persist": true, "hideExists": true, "existsSelected": false, "exclude": false } }, "1": { "type": "optionsListControl", "order": 1, "grow": true, "width": "small", "explicitInput": { "id": "1", "dataViewId": "unified-alerts-dv", "fieldName": "kibana.alert.rule.name", "title": "Rule", "hideExclude": true, "hideSort": true, "hidePanelTitles": true, "placeholder": "", "ignoreParentSettings": { "ignoreValidations": true }, "hideExists": true, "selectedOptions": [], "existsSelected": false, "exclude": false } }, "2": { "type": "optionsListControl", "order": 2, "grow": true, "width": "small", "explicitInput": { "id": "2", "dataViewId": "unified-alerts-dv", "fieldName": "kibana.alert.group.value", "title": "Group", "hideExclude": true, "hideSort": true, "hidePanelTitles": true, "placeholder": "", "ignoreParentSettings": { "ignoreValidations": true }, "selectedOptions": [], "existsSelected": false, "exclude": false } }, "3": { "type": "optionsListControl", "order": 3, "grow": true, "width": "small", "explicitInput": { "id": "3", "dataViewId": "unified-alerts-dv", "fieldName": "tags", "title": "Tags", "hideExclude": true, "hideSort": true, "hidePanelTitles": true, "placeholder": "", "ignoreParentSettings": { "ignoreValidations": true }, "selectedOptions": [], "existsSelected": false, "exclude": false } } }, "defaultControlWidth": "small", "defaultControlGrow": true, "controlStyle": "oneLine", "chainingSystem": "HIERARCHICAL", "showApplySelections": false, "ignoreParentSettings": { "ignoreFilters": false, "ignoreQuery": false, "ignoreTimerange": false, "ignoreValidations": false }, "filters": [ { "meta": { "index": "unified-alerts-dv", "key": "kibana.alert.status", "disabled": false }, "query": { "match_phrase": { "kibana.alert.status": "active" } } } ] } ```
  1. Navigate to the Stack alerts page. It should crash.
elasticmachine commented 1 week ago

Pinging @elastic/response-ops (Team:ResponseOps)