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

[Related alerts] Add related alerts for all the observability rules #195592

Merged

Conversation

maryam-saeidi
Copy link
Member

@maryam-saeidi maryam-saeidi commented Oct 9, 2024

Closes #193942
Closes #193952

Summary

This PR adds related alert logic for all the observability rules, as mentioned in #193942. Also, it adds a beta badge for this new tab.

image

@maryam-saeidi maryam-saeidi added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 9, 2024
@maryam-saeidi maryam-saeidi self-assigned this Oct 9, 2024
@@ -79,6 +101,8 @@ export function InternalRelatedAlerts({ alert, kuery }: Props) {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [alertStart, alertEnd]);

if (!kuery || !alert) return <EmptyState />;
Copy link
Member Author

@maryam-saeidi maryam-saeidi Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should never happen because we have filter based on rule id in the kuery, but I just added it in case there was a bug or something went wrong.

@maryam-saeidi maryam-saeidi marked this pull request as ready for review October 10, 2024 16:15
@maryam-saeidi maryam-saeidi requested a review from a team as a code owner October 10, 2024 16:15
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-management Observability Management User Experience Team labels Oct 10, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 14, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: 4f1342b
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-195592-4f1342bbe3e3

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 1062 1063 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 467.6KB 470.1KB +2.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observability 103.7KB 103.8KB +59.0B
Unknown metric groups

miscellaneous assets size

id before after diff
observability 761.8KB 888.1KB +126.3KB

History

cc @maryam-saeidi

// - location
export const OBSERVER_NAME = 'observer.name';
// Inventory rule
export const HOST = 'host.name';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would host.ip also make sense here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, I need to check a bit more to see if this field is useful for most of the scenarios or not. (Added a new tab to this spreadsheet, "other fields" tab, feel free to add more fields that you think might be useful)

I started with a small set of fields, and we can extend it in the future.

Copy link
Contributor

@benakansara benakansara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +27 to +39
export const SERVICE_NAME = 'service.name';
// Synthetics rules
export const MONITOR_ID = 'monitor.id';
// - location
export const OBSERVER_NAME = 'observer.name';
// Inventory rule
export const HOST = 'host.name';
export const KUBERNETES_POD = 'kubernetes.pod.uid';
export const DOCKER_CONTAINER = 'container.id';
export const EC2_INSTANCE = 'cloud.instance.id';
export const S3_BUCKETS = 'aws.s3.bucket.name';
export const RDS_DATABASES = 'aws.rds.db_instance.arn';
export const SQS_QUEUES = 'aws.sqs.queue.name';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have some of these defined here as well. Could we move it to a common file and use it from there in both places?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sure. I will do it in a follow-up PR.

@maryam-saeidi maryam-saeidi merged commit b4c3ab5 into elastic:main Oct 15, 2024
24 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11353539186

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 15, 2024
…lastic#195592)

Closes elastic#193942
Closes elastic#193952

## Summary

This PR adds related alert logic for all the observability rules, as
mentioned in elastic#193942. Also, it adds a beta badge for this new tab.

![image](https://github.com/user-attachments/assets/43f7cf6a-670f-4a85-a11c-769d2b2f9625)

(cherry picked from commit b4c3ab5)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 15, 2024
…ules (#195592) (#196437)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Related alerts] Add related alerts for all the observability rules
(#195592)](#195592)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Maryam
Saeidi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-15T20:05:11Z","message":"[Related
alerts] Add related alerts for all the observability rules
(#195592)\n\nCloses #193942\r\nCloses #193952\r\n\r\n##
Summary\r\n\r\nThis PR adds related alert logic for all the
observability rules, as\r\nmentioned in #193942. Also, it adds a beta
badge for this new
tab.\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/43f7cf6a-670f-4a85-a11c-769d2b2f9625)","sha":"b4c3ab55a0680db2ec1a9d2f01051266f599e172","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management"],"title":"[Related
alerts] Add related alerts for all the observability
rules","number":195592,"url":"https://github.com/elastic/kibana/pull/195592","mergeCommit":{"message":"[Related
alerts] Add related alerts for all the observability rules
(#195592)\n\nCloses #193942\r\nCloses #193952\r\n\r\n##
Summary\r\n\r\nThis PR adds related alert logic for all the
observability rules, as\r\nmentioned in #193942. Also, it adds a beta
badge for this new
tab.\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/43f7cf6a-670f-4a85-a11c-769d2b2f9625)","sha":"b4c3ab55a0680db2ec1a9d2f01051266f599e172"}},"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/195592","number":195592,"mergeCommit":{"message":"[Related
alerts] Add related alerts for all the observability rules
(#195592)\n\nCloses #193942\r\nCloses #193952\r\n\r\n##
Summary\r\n\r\nThis PR adds related alert logic for all the
observability rules, as\r\nmentioned in #193942. Also, it adds a beta
badge for this new
tab.\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/43f7cf6a-670f-4a85-a11c-769d2b2f9625)","sha":"b4c3ab55a0680db2ec1a9d2f01051266f599e172"}}]}]
BACKPORT-->

Co-authored-by: Maryam Saeidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team v8.16.0 v9.0.0
Projects
None yet
5 participants