forked from roger/k3s-cluster
agents fix language and time zone
This commit is contained in:
@@ -178,7 +178,14 @@ data:
|
||||
run (Hermes disables that). Do not try.
|
||||
7. **Talk like an engineer.** Short, concrete, with resource names and
|
||||
queries. No filler. When you fixed something, say what you did in one line.
|
||||
8. **Respect GitOps.** If an app is `OutOfSync`/`Degraded`, check whether a
|
||||
8. **Language: Catalan by default.** Address Roger in Catalan in *all*
|
||||
interactions — daily reports, watchdog alerts, Discord DMs, and any
|
||||
other message you produce. This is the default regardless of the
|
||||
language the cron prompt or instruction is written in (those are just
|
||||
instructions to you, not the output language). Only switch away from
|
||||
Catalan if Roger writes to you in another language or explicitly asks
|
||||
you to. Never default to English or Italian.
|
||||
9. **Respect GitOps.** If an app is `OutOfSync`/`Degraded`, check whether a
|
||||
commit is stuck. Don't hand-edit resources — fix the source repo.
|
||||
|
||||
## How you reach Roger
|
||||
|
||||
@@ -98,14 +98,21 @@ spec:
|
||||
create "argocd-sync-health" "every 6h" "discord" \
|
||||
"Check ArgoCD app health using the API documented in your SOUL.md. If every app is Synced and Healthy, reply [SILENT]. Otherwise list the OutOfSync or Degraded apps with their status. If an app is OutOfSync and you believe a recent git push caused it, you may trigger a sync via the API. Do NOT hand-edit resources to fix them — fix the source repo."
|
||||
|
||||
create "cert-expiry" "0 9 * * *" "discord" \
|
||||
create "cert-expiry" "0 7 * * *" "discord" \
|
||||
"Check certificate expiry using the Prometheus API documented in your SOUL.md. Alert on any certificate expiring in under 21 days, with its name and namespace. If none, reply [SILENT]."
|
||||
|
||||
create "node-resource-drift" "every 1d" "discord" \
|
||||
"Check node resources using the Prometheus API documented in your SOUL.md. Alert if any node is NotReady, or if any node has CPU over 90 percent or memory over 90 percent. Otherwise reply [SILENT]."
|
||||
|
||||
# ---- Daily report (always delivered) ----
|
||||
create "daily-cluster-report" "0 8 * * *" "discord" \
|
||||
# NOTE: Hermes' cron runs in UTC (no TZ set on the container). The
|
||||
# cluster is at UTC+2, so fixed daily times are expressed in UTC and
|
||||
# shifted back 2h from the intended local wall-clock time:
|
||||
# 08:00 local -> 0 6 (daily cluster report)
|
||||
# 09:00 local -> 0 7 (cert expiry check)
|
||||
# Relative schedules (every 6h / every 1h / every 1d) are
|
||||
# timezone-independent.
|
||||
create "daily-cluster-report" "0 6 * * *" "discord" \
|
||||
"Produce a daily cluster report for Roger using the HTTP APIs documented in your SOUL.md. Include: (1) node count and Ready/NotReady status per node, (2) top 5 pods by CPU and by memory, (3) count of pods not Running grouped by namespace, (4) any ArgoCD apps that are OutOfSync or Degraded, (5) any certificates expiring within 30 days, (6) recent error/crash activity: IMPORTANT context discipline — do NOT fetch raw log lines across the cluster over 24h — that overflows your context window. First run a LogQL aggregation that returns only counts: sum by (namespace, pod) (count_over_time({namespace=~\".+\"} |~ \"(?i)error|panic|crash|oom|backoff\" [24h])). Parse the counts with jq and summarize the top few noisiest pods by namespace/pod:count. If one stands out, fetch at most 5 sample lines for THAT pod only (limit=5) to identify the cause. Never paste more than a handful of lines total. Keep the whole report under 1800 chars. Always deliver (no [SILENT])."
|
||||
|
||||
echo "Done. Listing all cron jobs:"
|
||||
|
||||
Reference in New Issue
Block a user