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

OU-199: Use korrel8r to load logs related to an alert #139

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

kyoto
Copy link
Member

@kyoto kyoto commented Oct 2, 2023

With this PR, we just use the first korrel8r goal that has some LogQL results. In other words, if the korrel8r API returns multiple LogQL queries that have results, we ignore all but the first one in the API response.

alert-to-logs.mov

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 2, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 2, 2023

@kyoto: This pull request references OU-199 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 2, 2023
@openshift-ci openshift-ci bot requested review from jgbernalp and zhuje October 2, 2023 10:14
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 2, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 2, 2023

@kyoto: This pull request references OU-199 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jgbernalp
Copy link
Contributor

/jira refresh

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 11, 2023

@jgbernalp: This pull request references OU-199 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kyoto
Copy link
Member Author

kyoto commented Oct 24, 2023

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 24, 2023
@kyoto kyoto changed the title [WIP] OU-199: Use korrel8r to load logs related to an alert OU-199: Use korrel8r to load logs related to an alert Nov 8, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 8, 2023
@kyoto
Copy link
Member Author

kyoto commented Nov 8, 2023

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 8, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 8, 2023

@kyoto: This pull request references OU-199 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

alert-to-logs.mov

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jgbernalp
Copy link
Contributor

/retest

}
}

if (logQL && tenant) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably can be outside the response.forEach, I assume we are searching in the response for the first goal that matches logs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @jgbernalp. I tidied up the function and made it more clear that we're just using the first goal that matches logs with this PR.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 9, 2023

@kyoto: This pull request references OU-199 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

With this PR, we just use the first korrel8r goal that has some LogQL results. In other words, if the korrel8r API returns multiple LogQL queries that have results, we ignore all but the first one in the API response.

alert-to-logs.mov

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kyoto
Copy link
Member Author

kyoto commented Nov 9, 2023

/retest

Copy link
Contributor

openshift-ci bot commented Nov 9, 2023

@kyoto: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@jgbernalp
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 9, 2023
Copy link
Contributor

openshift-ci bot commented Nov 9, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp, kyoto

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit b98de52 into openshift:main Nov 9, 2023
5 checks passed
@kyoto kyoto deleted the alert-related-logs branch November 10, 2023 02:04
@jgbernalp
Copy link
Contributor

/cherry-pick release-5.8

@openshift-cherrypick-robot

@jgbernalp: new pull request created: #154

In response to this:

/cherry-pick release-5.8

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants