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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions in-cluster/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,15 @@ spec:
message: "There are PVCs using more than 80% of storage: {{ .PVC.ConcatenatedNames }}"
- pass:
message: "No PVCs are using more than 80% of storage"
- event:
checkName: event-oom-check
namespace: default
reason: "OOMKilling"
kind: Node
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

- pass:
when: "false"
message: No OOMKilling event detected
Loading