8000 enhance dashboard by abahmed · Pull Request #594 · abahmed/kwatch · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,17 @@ deploy/
.dockerignore
Dockerfile
LICENSE

# Credentials must never reach the build context, at any depth. Nothing
# the build compiles or embeds matches these.
**/*.pem
**/*.key
**/*.crt
**/*.p12
**/*.pfx
**/*.jks
**/.env
**/.env.*
**/*.kubeconfig
**/kubeconfig
**/id_rsa*
12 changes: 7 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ enforces, are in `docs/contributor-architecture.md`.
| `internal/clock`, `internal/format`, `internal/metrics`, `internal/feature` | Time dependency, pure text helpers, the bounded-label Prometheus registry, feature identifiers |
| `internal/redact` | Secret and private-address redaction at ingest and in the e2e sanitizer (leaf) |
| `internal/ratelimit` | Provider rate-limit errors and Retry-After parsing; a leaf because SDK providers and delivery both use it |
| `internal/cloudmeta` | Cloud metadata addresses and host names; a leaf because the delivery transport and KwatchConfig probes both refuse them |
| `internal/health`, `internal/upgrader`, `internal/telemetry`, `internal/heartbeat` | Diagnostics server, upgrade check, telemetry, heartbeat |
| `internal/kubeclient` | Kubernetes access: the application-owned `ClientSet`, HTTP client, informer trimming, and panic-safe handlers |

Expand Down Expand Up @@ -333,8 +334,9 @@ Every background saver, watcher, ticker, source, and worker has an owner,
cancellation path, bounded shutdown, and observable failure.

The health server serves `/healthz`, `/readyz`, `/availabilityz`,
`/health` and `/metrics`, plus `/status` only when `healthCheck.statusEndpoint`
is true (default false; otherwise 404). `/status` is the read-only view of
`/health` and `/metrics` (Pro: Community answers it with `404`), plus
`/status` only when `healthCheck.statusEndpoint` is true (default false;
otherwise 404). `/status` is the read-only view of
open incidents with object names, built by `internal/status`; it has no
authentication, so reach it with `kubectl port-forward`. A component returning to the running state clears
its previous safe degradation reason.
Expand All @@ -346,9 +348,9 @@ informer, or REST-client implementation.
Rules of thumb:

- `inventory` / `storage` / `notification` / `detection/reasons` /
`redact` / `ratelimit` / `format` must stay free of orchestration,
provider, and Kubernetes client imports. Only `inventory/kube` imports
Kubernetes clients for the model.
`redact` / `ratelimit` / `cloudmeta` / `format` must stay free of
orchestration, provider, and Kubernetes client imports. Only
`inventory/kube` imports Kubernetes clients for the model.
- The domain layers import downward only: `inventory` <- `detection` <-
`rootcause` <- `incident` <- `notification/compose`. `pipeline`
orchestrates them, and only `internal/app` imports `pipeline`.
Expand Down
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<p align="center">
kwatch runs inside your Kubernetes cluster, traces every failure back to
what started it, and sends one message: what broke, why, who changed it,
what started it, and sends one message: what broke, why, what changed it,
and what to do next.
</p>

Expand Down Expand Up @@ -56,9 +56,9 @@ license.
<td width="33%" valign="top"><b>🔕 Quiet by default</b><br>One message, then silence until something new is true.</td>
</tr>
<tr>
<td valign="top"><b>🕵️ Who changed what</b><br>See who changed what, and when.</td>
<td valign="top"><b>👉 The next step</b><br>Every message ends with the command to run.</td>
<td valign="top"><b>📣 50+ channels</b><br>Slack, Teams, PagerDuty, email, webhooks and more.</td>
<td valign="top"><b>🕵️ What changed</b><br>See what changed, when, and which tool did it (Pro).</td>
<td valign="top"><b>👉 The next step</b><br>Every message ends with the command to run (Pro).</td>
<td valign="top"><b>📣 50+ channels</b><br>Slack, Teams, PagerDuty, email, webhooks and more (one on Community, all on Pro).</td>
</tr>
</table>

Expand All @@ -69,6 +69,8 @@ crash looping (starting, failing and restarting over and over), a Service has no
endpoints, and two other apps fail their health checks. Every alert is true.
None of them says why.

These samples show Pro. Community says what is failing and the type of cause.

kwatch sends this instead (an illustrative message):

```text
Expand Down Expand Up @@ -141,9 +143,9 @@ More in the [glossary](https://docs.kwatch.dev/glossary) and the
storms. kwatch waits for failures to settle, merges what belongs together
and speaks when there is news. Successful rollouts, scaling and node
drains never wake anyone.
- 🕵️ **Who changed what.** Rollouts, config edits and image updates sit on a
timeline with who made them, so a message can say "after alice's 14:02
release".
- 🕵️ **What changed.** Rollouts, config edits and image updates sit on a
timeline with the tool or GitOps app that made them, so a message can say
"after the 14:02 release by argocd-controller".
- 👉 **The next step.** A message ends with the command to run: read the crash
log, describe the node, or roll back.
- 📣 **50+ channels.** Slack, Microsoft Teams, Discord, PagerDuty, Opsgenie,
Expand Down Expand Up @@ -241,7 +243,7 @@ how urgent a message is: 🔴 page · 🟠 notify · 🟡 low · ✅ resolved.

1. **Watch.** kwatch keeps a live map of your cluster: pods, workloads,
nodes, volumes, configs, services and certificates, how they connect,
and every change made to them, with who made it.
and every change made to them, with the tool or GitOps app that made it.
2. **Trace.** When something fails, it follows the links upstream and keeps
only suspects that are broken or changed just before. It prefers the
cause with stronger evidence over the one that covers more failures.
Expand Down Expand Up @@ -307,11 +309,12 @@ during early access. No credit card required.

| | Community | Pro |
| --- | --- | --- |
| Detection | Pod crash loops, OOM kills and Pending pods; node NotReady | Adds node pressure and draining, readiness, rollouts, Jobs and CronJobs, PDBs, HPAs, storage, network, admission, certificates, quota, custom resources, control plane, probes and unusual events |
| Root cause | One-line headline | Full proof and confidence, shared-factor suspects, recent changes and who made them, affected services, log excerpts |
| Detection | Pods: crash loops, OOM kills, Pending and unschedulable pods, image pull errors, config errors, evictions, init-container failures, liveness and startup probe failures; node NotReady | Adds node pressure and draining, readiness, rollouts, Jobs and CronJobs, PDBs, HPAs, storage, network, admission, certificates, quota, custom resources, control plane, probes and unusual events |
| Root cause | What is failing and the type of cause ("Cause found: a config change.") | The exact cause (which object or change), full proof and confidence, shared-factor suspects, recent changes and the tool or GitOps app that made them, affected services, log excerpts, fix commands and the setting to change, recurrence ("This is the third time this week") |
| Channels | 1 provider (pick with `app.communityProvider`), namespace filters and silences | All providers, routing by scope, threads, text templates, audit log |
| Noise control | Related alerts arrive as one incident, in Community and Pro. Dedup and settling; announced incidents survive a restart, so their resolves are still sent | Flapping detection, startup summary, state kept on disk across restarts, changes made while kwatch was down, gap report |
| Operations | RBAC audit, secret redaction, health, text `/status` | Prometheus `/metrics`, severity overrides, maintenance holds, runbook links, heartbeat monitor, `/status` JSON, flight recorder and `replay-export` |
| Noise control | Related alerts arrive as one incident, in Community and Pro. Dedup and settling; failures already present at start are announced one by one if still failing after the startup window; announced incidents survive a restart, so their resolves are still sent | Flapping detection, startup summary, state kept on disk across restarts, changes made while kwatch was down, gap report |
| Operations | RBAC audit, secret redaction, health (`/health`) | Heartbeat monitor (dead man's switch), Prometheus `/metrics`, severity overrides, maintenance holds, runbook links, `/status` (text and JSON), flight recorder and `replay-export` |
| Dashboard | None | Read-only web dashboard: active and resolved issues, who was told, and an overview of the cluster and of kwatch itself (`dashboard.enabled`) |
| Account | None | Email only |
| Support | GitHub issues and Discussions | Dedicated support: installation help, and your feature requests and fixes come first |

Expand All @@ -338,8 +341,8 @@ install, set `KWATCH_LICENSE_KEY` in the environment of the same command.
[what leaves my cluster](#-what-leaves-my-cluster)). If it can't reach
kwatch.dev, Pro keeps working for up to 7 days after the last successful
check, then falls back to Community. Monitoring continues.
- The license state is in `/status` and in the installer's **License / Pro**
menu.
- The license state is in the startup log, in `/status` (Pro) and in the
installer's **License / Pro** menu.

Details: [licensing](./docs/licensing.md).

Expand All @@ -362,7 +365,7 @@ channels you set up.
kwatch version and the node count. Community without a key makes no
license calls.
- **Nothing else goes to kwatch.dev.** To know when kwatch itself stops,
Pro can ping your own monitoring (`heartbeatMonitor.url`).
kwatch Pro can ping your own monitoring (`heartbeatMonitor.url`).
- The license, the telemetry and the update check always verify TLS, even if
`app.insecureSkipTLSVerify` is set for your alert providers.

Expand Down Expand Up @@ -410,9 +413,13 @@ license instance key.
With Pro, it picks up where it left off: open incidents are not announced
again and changes made while it was down still explain failures. After a
gap of 5 minutes or more it sends a gap report: what changed and what
crashed while it was down, compared with before. Community
keeps state in memory, so after a restart it takes a fresh baseline and
alerts on new failures or ones that get worse. See
crashed while it was down, compared with before. Community saves
only the incidents it announced that are still open, and restores them
so their resolves are still sent; history and baselines start fresh. Any
other failure already present is announced on its own if it is still
failing once the two-minute startup window ends (Pro sends one startup
summary instead), and one that recovers inside the window is never
mentioned. See
[production operations](./docs/production-operations.md).
</details>

Expand Down
Loading
Loading
0