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

Maintenance window scoped query sometimes doesn't work #172950

Closed
kobelb opened this issue Dec 8, 2023 · 1 comment
Closed

Maintenance window scoped query sometimes doesn't work #172950

kobelb opened this issue Dec 8, 2023 · 1 comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Alerting/RulesManagement Issues related to the Rules Management UX needs-team Issues missing a team label

Comments

@kobelb
Copy link
Contributor

kobelb commented Dec 8, 2023

Description

While experimenting with the new maintenance window scoped queries, I've seen them not work a few times for suppressing the actions. It's also worked a few times as well, so I think the order of operations may matter.

The first time I saw it not working, I created a maintenance window w/ scoped query, and then created a SLO and a SLO Burn Rate alerting rule. Once I had the SLO Burn Rate rule creating alerts and triggering actions, I noticed that the maintenance window's scoped query was wrong and it wasn't suppressing any alerts. I went back to the maintenance window UI, updated the scoped query to be correct, saved the maintenance window, and continued to see actions triggered for all alerts.

The second time I saw it not working, I created a metric threshold alerting rule with the "group by" option. Once it was creating alerts and triggering actions, I then went and created a maintenance window w/ scoped query that was for kibana.alert.instance.id: "foo-1". After the maintenance window was created, it had no effect and I continued to see actions triggered for the alerts with this field set to this value.

Steps to reproduce:

The following is a recreation for the second time I saw this misbehaving.

1. Create some metrics

Use DevTools to create docs similar to the following, you'll need to update the @timestamp to make them more recent.

POST metrics-foo-default/_doc
{
  "@timestamp": "2023-12-08T13:27:11.488Z",
  "service": "foo-1",
  "success": false
}

POST metrics-foo-default/_doc
{
  "@timestamp": "2023-12-08T13:27:11.488Z",
  "service": "foo-2",
  "success": false
}

POST metrics-foo-default/_doc
{
  "@timestamp": "2023-12-08T13:27:11.488Z",
  "service": "foo-3",
  "success": false
}

POST metrics-foo-default/_doc
{
  "@timestamp": "2023-12-08T13:29:05.692Z",
  "service": "foo-1",
  "success": false
}

POST metrics-foo-default/_doc
{
  "@timestamp": "2023-12-08T13:29:05.692Z",
  "service": "foo-2",
  "success": false
}

POST metrics-foo-default/_doc
{
  "@timestamp": "2023-12-08T13:29:05.692Z",
  "service": "foo-3",
  "success": false
}

2. Create metric threshold alerting rule w/ index document action

Screenshot 2023-12-08 at 9 15 58 AM

3. Create Maintenance Window

Screenshot 2023-12-08 at 9 16 41 AM

Expected behavior:

The notifications index should not have documents with "service: foo-1" any longer being created.

@kobelb kobelb added bug Fixes for quality problems that affect the customer experience Feature:Alerting/RulesManagement Issues related to the Rules Management UX labels Dec 8, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Dec 8, 2023
@kobelb
Copy link
Contributor Author

kobelb commented Dec 8, 2023

Thanks for investigating this, @XavierM and @JiaweiWu. The feature is working as designed. The maintenance windows only apply to new alerts, they do not apply to ongoing alerts.

@kobelb kobelb closed this as completed Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Alerting/RulesManagement Issues related to the Rules Management UX needs-team Issues missing a team label
Projects
None yet
Development

No branches or pull requests

1 participant