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

Added event-analyzer #98

Merged
merged 3 commits into from
Aug 4, 2024
Merged

Added event-analyzer #98

merged 3 commits into from
Aug 4, 2024

Conversation

5hubh49
Copy link
Member

@5hubh49 5hubh49 commented Aug 1, 2024

This is how analysis would look like:

Screenshot 2024-08-01 at 9 04 48 PM

@5hubh49 5hubh49 closed this Aug 1, 2024
@5hubh49 5hubh49 changed the title Added ecccccbnglejvbeldjcebkkfkdegnucbikfvdkjneebuevent-analyzer Added event-analyzer Aug 1, 2024
@5hubh49 5hubh49 reopened this Aug 1, 2024
@5hubh49
Copy link
Member Author

5hubh49 commented Aug 1, 2024

Story: 109475

As per this doc, analyzer has been added in the troubleshoot-spec default.yaml

message: Event {{ .Reason }} by object {{ .InvolvedObject.Name }} kind {{ .InvolvedObject.Kind }} has message {{ .Message }}
- pass:
when: "false"
message: No OOMKilled event detected
Copy link
Member

Choose a reason for hiding this comment

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

maybe we should change the wording here to match the event

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

outcomes:
- fail:
when: "true"
message: Event {{ .Reason }} by object {{ .InvolvedObject.Name }} kind {{ .InvolvedObject.Kind }} has message {{ .Message }}
Copy link
Member

Choose a reason for hiding this comment

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

nit: Perhaps we can have a message like below

Pod '{{ .InvolvedObject.Name }}' got killed (OOMKilling) with the reason: {{ .Message }}

Copy link
Member

Choose a reason for hiding this comment

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

given that this event is kind: Node, is the object name not the node name? I guess we need an example event to confirm.

Copy link
Member

Choose a reason for hiding this comment

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

Good point.

Copy link
Member

Choose a reason for hiding this comment

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

@5hubh49 perhaps a good follow-up would be detecting which pod. Something like below. I tried to get a pod being OOMKilled, and emit an event, but couldn't

    - event:
        checkName: OOMkilled detector
        namespace: default
        reason: "OOMKilled"
        kind: Pod
        outcomes:
          - fail:
              when: "true"
              message: Pod '{{ .InvolvedObject.Name }}' got killed with reason: {{ .Message }}
          - pass:
              when: "false" 
              message: No OOM killed pods found

@xavpaice xavpaice merged commit 097d8dd into main Aug 4, 2024
2 checks passed
@5hubh49 5hubh49 deleted the event-analyzer branch August 5, 2024 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants