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 Threshold alert detail page should only show one chart per condition. #160320

Closed
simianhacker opened this issue Jun 22, 2023 · 1 comment · Fixed by #160321
Closed
Labels
bug Fixes for quality problems that affect the customer experience Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge"

Comments

@simianhacker
Copy link
Member

Kibana version:

main, 8.9

Original install method (e.g. download page, yum, from source, etc.):

source

Describe the bug:

On the Log Threshold Rule, when you have multiple conditions it displays multiple charts, one per condition. The problem is that the multiple conditions are evaluated as an intersection, drawing a chart per condition doesn't make sense.

Steps to reproduce:

  1. Ingest some data where you can set a Log Threshold Rule with multiple conditions
  2. Create a rule with more than one condition
  3. Set the threshold to where it will trigger
  4. Visit the "Alert detail page"

Expected behavior:

There should only be one chart that represents the intersection of the two search terms.

Screenshots (if relevant):

image
@simianhacker simianhacker added bug Fixes for quality problems that affect the customer experience Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" labels Jun 22, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

simianhacker added a commit that referenced this issue Jun 27, 2023
…60321)

## Summary

This PR fixes #160320 by changing the chart from the `CriterionPreview`
chart, borrowed from the Log Threshold Rule, to an embedded Lens
visualization that represents the correct document count in one chart. I
also took the liberty of changing the ratio chart to use the same
technique for consistency sake.

## Count with multiple conditions

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/6c6a27ea-f8e4-491f-8a12-261d0ed13dcb">

### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/9b18ebe9-e911-4e40-8911-bee55cd7d245">

## Count with multiple conditions and a group by

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/7b9462da-55b2-4f54-ba09-3c55b372ae2c">


### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/b268caed-242f-430a-ade0-14bf491ec899">

## Ratio with multiple conditions

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/55b8dfa2-7789-433b-bffd-e412bdb08b3f">

### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/a029bf8a-3ba1-4e16-87bd-097ebc526a4e">


## Ratio with multiple conditions and a  group by

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/61ddf1e9-c5ad-4546-a539-15a51ee563c0">

### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/15b0aaa3-4ef9-47f6-baba-24869feae77e">
kibanamachine pushed a commit that referenced this issue Jun 27, 2023
…60321)

## Summary

This PR fixes #160320 by changing the chart from the `CriterionPreview`
chart, borrowed from the Log Threshold Rule, to an embedded Lens
visualization that represents the correct document count in one chart. I
also took the liberty of changing the ratio chart to use the same
technique for consistency sake.

## Count with multiple conditions

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/6c6a27ea-f8e4-491f-8a12-261d0ed13dcb">

### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/9b18ebe9-e911-4e40-8911-bee55cd7d245">

## Count with multiple conditions and a group by

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/7b9462da-55b2-4f54-ba09-3c55b372ae2c">

### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/b268caed-242f-430a-ade0-14bf491ec899">

## Ratio with multiple conditions

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/55b8dfa2-7789-433b-bffd-e412bdb08b3f">

### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/a029bf8a-3ba1-4e16-87bd-097ebc526a4e">

## Ratio with multiple conditions and a  group by

### Before

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/61ddf1e9-c5ad-4546-a539-15a51ee563c0">

### After

<img width="736" alt="image"
src="https://github.com/elastic/kibana/assets/41702/15b0aaa3-4ef9-47f6-baba-24869feae77e">

(cherry picked from commit a8322d2)
kibanamachine added a commit that referenced this issue Jun 27, 2023
…ge (#160321) (#160661)

# Backport

This will backport the following commits from `main` to `8.9`:
- [[Alerting] Fix the charts on Log Threshold Rule Alert Detail page
(#160321)](#160321)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Chris
Cowan","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-27T16:18:31Z","message":"[Alerting]
Fix the charts on Log Threshold Rule Alert Detail page (#160321)\n\n##
Summary\r\n\r\nThis PR fixes #160320 by changing the chart from the
`CriterionPreview`\r\nchart, borrowed from the Log Threshold Rule, to an
embedded Lens\r\nvisualization that represents the correct document
count in one chart. I\r\nalso took the liberty of changing the ratio
chart to use the same\r\ntechnique for consistency sake.\r\n\r\n## Count
with multiple conditions\r\n\r\n### Before\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/6c6a27ea-f8e4-491f-8a12-261d0ed13dcb\">\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/9b18ebe9-e911-4e40-8911-bee55cd7d245\">\r\n\r\n##
Count with multiple conditions and a group by\r\n\r\n###
Before\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/7b9462da-55b2-4f54-ba09-3c55b372ae2c\">\r\n\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/b268caed-242f-430a-ade0-14bf491ec899\">\r\n\r\n##
Ratio with multiple conditions\r\n\r\n### Before\r\n\r\n<img
width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/55b8dfa2-7789-433b-bffd-e412bdb08b3f\">\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/a029bf8a-3ba1-4e16-87bd-097ebc526a4e\">\r\n\r\n\r\n##
Ratio with multiple conditions and a group by\r\n\r\n###
Before\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/61ddf1e9-c5ad-4546-a539-15a51ee563c0\">\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/15b0aaa3-4ef9-47f6-baba-24869feae77e\">","sha":"a8322d27117415e94d69da43c682b0d399cb344c","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","auto-backport","v8.9.0","v8.10.0"],"number":160321,"url":"https://github.com/elastic/kibana/pull/160321","mergeCommit":{"message":"[Alerting]
Fix the charts on Log Threshold Rule Alert Detail page (#160321)\n\n##
Summary\r\n\r\nThis PR fixes #160320 by changing the chart from the
`CriterionPreview`\r\nchart, borrowed from the Log Threshold Rule, to an
embedded Lens\r\nvisualization that represents the correct document
count in one chart. I\r\nalso took the liberty of changing the ratio
chart to use the same\r\ntechnique for consistency sake.\r\n\r\n## Count
with multiple conditions\r\n\r\n### Before\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/6c6a27ea-f8e4-491f-8a12-261d0ed13dcb\">\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/9b18ebe9-e911-4e40-8911-bee55cd7d245\">\r\n\r\n##
Count with multiple conditions and a group by\r\n\r\n###
Before\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/7b9462da-55b2-4f54-ba09-3c55b372ae2c\">\r\n\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/b268caed-242f-430a-ade0-14bf491ec899\">\r\n\r\n##
Ratio with multiple conditions\r\n\r\n### Before\r\n\r\n<img
width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/55b8dfa2-7789-433b-bffd-e412bdb08b3f\">\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/a029bf8a-3ba1-4e16-87bd-097ebc526a4e\">\r\n\r\n\r\n##
Ratio with multiple conditions and a group by\r\n\r\n###
Before\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/61ddf1e9-c5ad-4546-a539-15a51ee563c0\">\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/15b0aaa3-4ef9-47f6-baba-24869feae77e\">","sha":"a8322d27117415e94d69da43c682b0d399cb344c"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160321","number":160321,"mergeCommit":{"message":"[Alerting]
Fix the charts on Log Threshold Rule Alert Detail page (#160321)\n\n##
Summary\r\n\r\nThis PR fixes #160320 by changing the chart from the
`CriterionPreview`\r\nchart, borrowed from the Log Threshold Rule, to an
embedded Lens\r\nvisualization that represents the correct document
count in one chart. I\r\nalso took the liberty of changing the ratio
chart to use the same\r\ntechnique for consistency sake.\r\n\r\n## Count
with multiple conditions\r\n\r\n### Before\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/6c6a27ea-f8e4-491f-8a12-261d0ed13dcb\">\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/9b18ebe9-e911-4e40-8911-bee55cd7d245\">\r\n\r\n##
Count with multiple conditions and a group by\r\n\r\n###
Before\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/7b9462da-55b2-4f54-ba09-3c55b372ae2c\">\r\n\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/b268caed-242f-430a-ade0-14bf491ec899\">\r\n\r\n##
Ratio with multiple conditions\r\n\r\n### Before\r\n\r\n<img
width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/55b8dfa2-7789-433b-bffd-e412bdb08b3f\">\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/a029bf8a-3ba1-4e16-87bd-097ebc526a4e\">\r\n\r\n\r\n##
Ratio with multiple conditions and a group by\r\n\r\n###
Before\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/61ddf1e9-c5ad-4546-a539-15a51ee563c0\">\r\n\r\n###
After\r\n\r\n<img width=\"736\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/41702/15b0aaa3-4ef9-47f6-baba-24869feae77e\">","sha":"a8322d27117415e94d69da43c682b0d399cb344c"}}]}]
BACKPORT-->

Co-authored-by: Chris Cowan <[email protected]>
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 Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge"
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants