Skip to content

Events and Logs section selector #175

Closed

Description

@RafalKlimczakSysAdmins

Hi team,

I am enjoying your tool but Events and Logs section can be optional and enabled via boolean.
Looks great but take a lot of space on slack message, it's hard to read multiple notifications without real logs but with existing mandatory section from template

2.) For events output some simple grep phrase can be implement as optional parameter as bellow

 rafalklimczak@192 kwatch % cat example                            
 [2022-12-14 01:19:02 +0000 UTC] Scheduled Successfully assigned test/nginx-test-9fb6dc769-lvjmf to ip-10-1-6-
 [2022-12-14 01:20:29 +0000 UTC] Pulling Pulling image "nginx:testtest"
 [2022-12-14 01:20:29 +0000 UTC] Failed Failed to pull image "nginx:testtest": rpc error: code = Unknown desc = Error response  from daemon: manifest for nginx:testtest not found: manifest unknown: manifest unknown
 [2022-12-14 01:20:29 +0000 UTC] Failed Error: ErrImagePull
 [2022-12-14 01:24:16 +0000 UTC] BackOff Back-off pulling image "nginx:testtest"
 [2022-12-14 01:20:41 +0000 UTC] Failed Error: ImagePullBackOff
 rafalklimczak@192 kwatch % grep -i -A1 "failed error" example 
 [2022-12-14 01:20:29 +0000 UTC] Failed Error: ErrImagePull
 [2022-12-14 01:24:16 +0000 UTC] BackOff Back-off pulling image "nginx:testtest"
 [2022-12-14 01:20:41 +0000 UTC] Failed Error: ImagePullBackOff

Regards
RK

Activity

  1. teyhouse commented on Dec 29, 2025

    @teyhouse

    Hey @abahmed ,

    I am still experiencing this issue with kwatch v0.10.3.
    Let me provide a bit of context:

    Current config with reasons filtering:

    reasons:
    - '!Scheduled'
    - '!Pulling'
    - '!Pulled'
    - '!Created'
    - '!Started'
    ignoreLogPatterns:
      - .*Successfully.*
      - .*Image size:.*
    maxRecentLogLines: 0
    

    Despite these filters, Discord messages still include full Events section with these events:

    [0001-01-01 00:00:00 +0000 UTC] Scheduled Successfully assigned default/pod-name to k3s-hetzner
    [2025-12-29 16:28:47 +0000 UTC] Pulling Pulling image "alpine:latest"
    [2025-12-29 16:28:36 +0000 UTC] Pulled Successfully pulled image "alpine:latest" in 770ms. Image size: 3870955 bytes.
    [2025-12-29 16:28:36 +0000 UTC] Created Created container: alpine
    [2025-12-29 16:28:36 +0000 UTC] Started Started container alpine

    This confirms:

    • reasons field filters what kwatch monitors/triggers on, NOT what appears in Events section
    • ignoreLogPatterns only affects container logs, not Kubernetes Events
    • Events section always included regardless of filters

    Given Discord's 1024 character limit for embed fields, this is critical.

    Would you consider implementing either:

    1. Boolean flag to disable Events section entirely
    2. Event filtering capability (e.g., ignoreEventReasons)

    I think option 2 would be great.
    Thanks for the great tool!

  2. abahmed commented on Sep 6, 2026

    @abahmed
    Owner

    Fixed in main, but not released yet. Alerts now support includeEvents and includeLogs selectors so each section can be disabled independently. The fix will be available in the next release.

  3. abahmed commented on Oct 19, 2026

    @abahmed
    Owner

    🎉 This is now released in kwatch v1.0.0: https://github.com/abahmed/kwatch/releases/tag/v1.0.0

    Upgrade with the installer:

    /bin/bash -c "$(curl -fsSL https://kwatch.dev/kwatch.sh)"

    Coming from 0.10.x? Check the upgrade notes in the release first. Feedback is welcome in #564 🙏

  4. added this to the v1.0.0 milestone on Oct 19, 2026
  5. moved this to ✅ Done in kwatchon Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      ✅ Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions