mirror of
https://github.com/recklessop/Zerto_Exporter.git
synced 2026-08-19 10:10:03 -04:00
When a ZVM reboots its cumulative counters (IOPs, write/sync/network MBs, encrypted/unencrypted LBs) reset to zero. The previous abs() approach converted the large negative delta into an equally wrong positive spike. Introduces _counter_delta(new, old, vm_id, metric) which: - Returns new - old when new >= old (normal incrementing counter) - Returns new as-is when new < old (counter reset / reboot detected) and logs a WARNING identifying the VM and metric that reset Publishing the raw new value on reset correctly reflects the restarted counter state, suppresses the false spike, and produces a visible dip in Grafana that naturally indicates the ZVM reboot event. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>