Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-10290

Add snapshot monitoring to Proxmox VE Template

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • Templates (T)
    • None

      This regards the following template: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/proxmox?at=release%2F7.4

      We have implemented snapshot monitoring for Proxmox VE LXC containers and QEMU virtual machines. This enhancement helps prevent storage bloat from forgotten snapshots and provides visibility into snapshot hygiene.

      The default threshold values are based on our internal requirements and may need adjustment for other environments. I could not find best practices documentation. Otherwise I would have used defaults from there.

      This is tested using Zabbix Server 7.4.3 with Proxmox VE 9.10.

      Hope this helps!

      Changes Overview:

      New Macros:

      • {$PVE.SNAPSHOT.COUNT.MAX.WARN} - Maximum number of snapshots before triggering a warning (default: 6)
      • {$PVE.SNAPSHOT.AGE.MAX.WARN} - Maximum age of oldest snapshot in seconds before triggering a warning (default: 86400 = 24 hours)

      New Items (per LXC/VM):

      • Snapshot data - Retrieves snapshot list from Proxmox API
      • Snapshot count - Number of snapshots (excluding "current")
      • Snapshot max age - Age of oldest snapshot in seconds

      New Triggers:

      • Warning trigger when snapshot count exceeds threshold OR oldest snapshot exceeds age threshold
      • Stable over 1 hour to prevent false positives or temporary excessive snapshot use
      • Applies to both LXC containers and QEMU VMs

      Implementation Details:

      • Snapshot data collected via HTTP agent from /api2/json/nodes/{node}/{vmid}/snapshot endpoint
      • Age calculation uses JavaScript preprocessing to find oldest snapshot timestamp
      • Count uses JSONPath filtering to exclude the "current" pseudo-snapshot

      Benefits:

      • Proactive monitoring of snapshot accumulation
      • Helps prevent storage capacity issues
      • Configurable thresholds per VM/container using macro context

      Attached are unified diffs for both the template YAML and README documentation.

            vjaceslavs Vjaceslavs Bogdanovs
            commodore Simon Cornet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: