Skip to content

skym-notify: Feishu messages and a healthchecks.io dead man's switch - #14

Merged
bencode merged 1 commit into
mainfrom
notify
Oct 5, 2026
Merged

bencode merged 1 commit into
mainfrom
notify

Conversation

@bencode

@bencode bencode commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

A new binary, skym-notify, that reads the server's API like any reader (the server is unchanged) and runs beside it.

  • Every 15 s: reads the open incidents (muted included) and compares them with what it announced.
    • New: open, not muted, warn or critical.
    • Worse: announced below critical, now critical; once, and only once a mute ends.
    • Resolved: gone for 10 minutes; one that comes back sooner says nothing. A truncated list resolves nothing.
  • One message per pass to a Feishu custom bot (optional signature), 5 entries then "… and N more". State advances only when Feishu answers code: 0; otherwise it is resent next pass. State is a JSON file saved atomically and retried until saved.
  • healthchecks.io: pinged every minute while the server could be read in the last two passes; /fail once Feishu has failed for 10 minutes.
  • Secrets (token, webhook, signing secret, ping URL) never appear in Debug output, errors or logs.
  • deploy/Dockerfile.notify, deploy/notify.example.toml, docs (install, architecture, README).

Tests: unit tests for the decisions, message and signature; integration tests against local fakes of the API, Feishu and healthchecks.io. cargo-mutants: 0 missed (the loop in main.rs excluded). Reviewed independently; fixes applied.

… man's switch

A separate reader of the server's API, run beside it: every 15 s it compares
the open incidents with what it announced and tells a Feishu group bot what
is new (warn or critical), worse, or resolved (gone for 10 minutes). State
advances only once Feishu accepts the message. healthchecks.io is pinged while
the server can be read, and /fail once Feishu has failed for 10 minutes.
The server is unchanged.
@bencode
bencode merged commit 9d201cd into main Oct 5, 2026
2 checks passed
@bencode bencode mentioned this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant