Files
Zerto_Exporter/app
justin a4ff29e1b5 Fix counter spike/negative on ZVM reboot (closes #12)
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 <noreply@anthropic.com>
2026-02-20 19:47:35 -05:00
..
2024-05-30 20:57:39 -04:00
2023-12-21 12:57:30 -05:00
2024-05-30 20:57:39 -04:00