Skip to content

Lag Monitor

The lag monitor is a background process that periodically queries the source cluster to determine how far behind the backup process is. It uses the Kafka ListOffsets API to fetch the latest offsets for all backed-up topics.

The lag monitor runs automatically and does not need to be configured explicitly.

The offsets collected by the lag monitor are used to compute backup progress metrics.

You can tune the lag monitor’s refresh interval and request timeout via spec.lagMonitor on the Backup resource:

apiVersion: kannika.io/v1alpha
kind: Backup
metadata:
name: my-backup
spec:
source: "my-kafka-endpoint"
sink: "gcs-storage"
lagMonitor:
refreshInterval: "15s"
requestTimeout: "10s"
  • refreshInterval: how often the lag monitor queries the source cluster for the latest offsets. Defaults to 15s. Minimum is 1s.
  • requestTimeout: the timeout for each ListOffsets request to the source cluster. If the request does not complete within this duration, it is considered timed out and retried on the next interval. Defaults to 10s.