Manually invoke the collector, for example to recover from a missed scheduled run.
Procedure
- Create a one-off Job from the CronJob's current template:
CRON=$(kubectl -n "$NS" get cronjob -o jsonpath='{.items[0].metadata.name}') kubectl -n "$NS" create job --from=cronjob/"$CRON" manual-run kubectl -n "$NS" wait --for=condition=complete job/manual-run --timeout=300s kubectl -n "$NS" logs --selector=job-name=manual-run --tail=200
Important
A manual run uses the CronJob's current schedule and scan-window settings — it does not accept a custom time window. If the resulting scan overlaps with a previous or upcoming scheduled run, chats in the overlapping period may be scanned twice. - Clean up the manual job when you're done reviewing its logs:
kubectl -n "$NS" delete job manual-run
