You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 KiB

Proxmox VE by HTTP

Overview

This template is designed for the effortless deployment of Proxmox VE monitoring by Zabbix via HTTP and doesn't require any external scripts.

Proxmox VE uses a REST like API. The concept is described in (Resource Oriented Architecture - ROA). You can explore the API documentation at http://pve.proxmox.com/pve-docs/api-viewer/index.html

Requirements

Zabbix version: 7.0 and higher.

Tested versions

This template has been tested on:

  • Proxmox VE

Configuration

Zabbix should be configured according to the instructions in the Templates out of the box section.

Setup

Create an API token for the monitoring user. Important note: for security reasons, it is recommended to create a separate user (Datacenter - Permissions).

For the created API token and user, provide the necessary access levels:

  • Check: ["perm","/",["Sys.Audit"]]

  • Check: ["perm","/nodes/{node}",["Sys.Audit"]]

  • Check: ["perm","/vms/{vmid}",["VM.Audit"]]

Copy the resulting Token ID and Secret into host macros.

Macros used

Name Description Default
{$PVE.URL.PORT}

The API uses the HTTPS protocol and the server listens to port 8006 by default.

8006
{$PVE.TOKEN.ID}

API tokens allow stateless access to most parts of the REST API by another system, software or API client.

USER@REALM!TOKENID
{$PVE.TOKEN.SECRET}

Secret key.

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
{$PVE.ROOT.PUSE.MAX.WARN}

Maximum used root space in percentage.

90
{$PVE.MEMORY.PUSE.MAX.WARN}

Maximum used memory in percentage.

90
{$PVE.CPU.PUSE.MAX.WARN}

Maximum used CPU in percentage.

90
{$PVE.SWAP.PUSE.MAX.WARN}

Maximum used swap space in percentage.

90
{$PVE.VM.MEMORY.PUSE.MAX.WARN}

Maximum used memory in percentage.

90
{$PVE.VM.CPU.PUSE.MAX.WARN}

Maximum used CPU in percentage.

90
{$PVE.LXC.MEMORY.PUSE.MAX.WARN}

Maximum used memory in percentage.

90
{$PVE.LXC.CPU.PUSE.MAX.WARN}

Maximum used CPU in percentage.

90
{$PVE.STORAGE.PUSE.MAX.WARN}

Maximum used storage space in percentage.

90

Items

Name Description Type Key and additional info
Proxmox: Get cluster resources

Resources index.

HTTP agent proxmox.cluster.resources

Preprocessing

  • Check for not supported value

    Custom on fail: Set value to: Error getting data

Proxmox: Get cluster status

Get cluster status information.

HTTP agent proxmox.cluster.status

Preprocessing

  • Check for not supported value

    Custom on fail: Set value to: Error getting data

Proxmox: API service status

Get API service status.

Script proxmox.api.available

Preprocessing

  • Discard unchanged with heartbeat: 12h

Triggers

Name Description Expression Severity Dependencies and additional info
Proxmox: API service not available

The API service is not available. Check your network and authorization settings.

last(/Proxmox VE by HTTP/proxmox.api.available) <> 200 High

LLD rule Cluster discovery

Name Description Type Key and additional info
Cluster discovery Dependent item proxmox.cluster.discovery

Item prototypes for Cluster discovery

Name Description Type Key and additional info
Proxmox: Cluster [{#RESOURCE.NAME}]: Quorate

Indicates if there is a majority of nodes online to make decisions.

Dependent item proxmox.cluster.quorate[{#RESOURCE.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 10m

Trigger prototypes for Cluster discovery

Name Description Expression Severity Dependencies and additional info
Proxmox: Cluster [{#RESOURCE.NAME}] not quorum

Proxmox VE use a quorum-based technique to provide a consistent state among all cluster nodes.

last(/Proxmox VE by HTTP/proxmox.cluster.quorate[{#RESOURCE.NAME}]) <> 1 High

LLD rule Node discovery

Name Description Type Key and additional info
Node discovery Dependent item proxmox.node.discovery

Item prototypes for Node discovery

Name Description Type Key and additional info
Proxmox: Node [{#NODE.NAME}]: Status

Indicates if the node is online or offline.

Dependent item proxmox.node.online[{#NODE.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: Status

Read node status.

HTTP agent proxmox.node.status[{#NODE.NAME}]
Proxmox: Node [{#NODE.NAME}]: RRD statistics

Read node RRD statistics.

HTTP agent proxmox.node.rrd[{#NODE.NAME}]

Preprocessing

  • JavaScript: The text is too long. Please see the template.

Proxmox: Node [{#NODE.NAME}]: Time

Read server time and time zone settings.

HTTP agent proxmox.node.time[{#NODE.NAME}]
Proxmox: Node [{#NODE.NAME}]: Uptime

The system uptime expressed in the following format: "N days, hh:mm:ss".

Dependent item proxmox.node.uptime[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.data.uptime

Proxmox: Node [{#NODE.NAME}]: PVE version

PVE manager version.

Dependent item proxmox.node.pveversion[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.data.pveversion

  • Discard unchanged with heartbeat: 1d

Proxmox: Node [{#NODE.NAME}]: Kernel version

Kernel version info.

Dependent item proxmox.node.kernelversion[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.data.kversion

  • Discard unchanged with heartbeat: 1d

Proxmox: Node [{#NODE.NAME}]: Root filesystem, used

Root filesystem usage.

Dependent item proxmox.node.rootused[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.rootused

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: Root filesystem, total

Root filesystem total.

Dependent item proxmox.node.roottotal[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.roottotal

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: Memory, used

Memory usage.

Dependent item proxmox.node.memused[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.memused

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: Memory, total

Memory total.

Dependent item proxmox.node.memtotal[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.memtotal

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: CPU, usage

CPU usage.

Dependent item proxmox.node.cpu[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.cpu

  • Custom multiplier: 100

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: Outgoing data, rate

Network usage.

Dependent item proxmox.node.netout[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.netout

  • Custom multiplier: 8

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: Incoming data, rate

Network usage.

Dependent item proxmox.node.netin[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.netin

  • Custom multiplier: 8

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: CPU, loadavg

CPU average load.

Dependent item proxmox.node.loadavg[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.loadavg

  • Custom multiplier: 100

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: CPU, iowait

CPU iowait time.

Dependent item proxmox.node.iowait[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.iowait

  • Custom multiplier: 100

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: Swap filesystem, total

Swap total.

Dependent item proxmox.node.swaptotal[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.swaptotal

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: Swap filesystem, used

Swap used.

Dependent item proxmox.node.swapused[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.swapused

  • Discard unchanged with heartbeat: 10m

Proxmox: Node [{#NODE.NAME}]: Time zone

Time zone.

Dependent item proxmox.node.timezone[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.data.timezone

  • Discard unchanged with heartbeat: 12h

Proxmox: Node [{#NODE.NAME}]: Localtime

Seconds since 1970-01-01 00:00:00 (local time).

Dependent item proxmox.node.localtime[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.data.localtime

Proxmox: Node [{#NODE.NAME}]: Time

Seconds since 1970-01-01 00:00:00 UTC.

Dependent item proxmox.node.utctime[{#NODE.NAME}]

Preprocessing

  • JSON Path: $.data.time

Trigger prototypes for Node discovery

Name Description Expression Severity Dependencies and additional info
Proxmox: Node [{#NODE.NAME}] offline

Node offline.

last(/Proxmox VE by HTTP/proxmox.node.online[{#NODE.NAME}]) <> 1 High
Proxmox: Node [{#NODE.NAME}]: has been restarted

Uptime is less than 10 minutes.

last(/Proxmox VE by HTTP/proxmox.node.uptime[{#NODE.NAME}])<10m Info Manual close: Yes
Depends on:
  • Proxmox: Node [{#NODE.NAME}] offline
Proxmox: Node [{#NODE.NAME}]: PVE manager has changed

Firmware version has changed. Acknowledge to close the problem manually.

last(/Proxmox VE by HTTP/proxmox.node.pveversion[{#NODE.NAME}],#1)<>last(/Proxmox VE by HTTP/proxmox.node.pveversion[{#NODE.NAME}],#2) and length(last(/Proxmox VE by HTTP/proxmox.node.pveversion[{#NODE.NAME}]))>0 Info Manual close: Yes
Proxmox: Node [{#NODE.NAME}]: Kernel version has changed

Firmware version has changed. Acknowledge to close the problem manually.

last(/Proxmox VE by HTTP/proxmox.node.kernelversion[{#NODE.NAME}],#1)<>last(/Proxmox VE by HTTP/proxmox.node.kernelversion[{#NODE.NAME}],#2) and length(last(/Proxmox VE by HTTP/proxmox.node.kernelversion[{#NODE.NAME}]))>0 Info Manual close: Yes
Proxmox: Node [{#NODE.NAME}] high root filesystem space usage

Root filesystem space usage.

min(/Proxmox VE by HTTP/proxmox.node.rootused[{#NODE.NAME}],5m) / last(/Proxmox VE by HTTP/proxmox.node.roottotal[{#NODE.NAME}]) * 100 >{$PVE.ROOT.PUSE.MAX.WARN:"{#NODE.NAME}"} Warning
Proxmox: Node [{#NODE.NAME}] high memory usage

Memory usage.

min(/Proxmox VE by HTTP/proxmox.node.memused[{#NODE.NAME}],5m) / last(/Proxmox VE by HTTP/proxmox.node.memtotal[{#NODE.NAME}]) * 100 >{$PVE.MEMORY.PUSE.MAX.WARN:"{#NODE.NAME}"} Warning
Proxmox: Node [{#NODE.NAME}] high CPU usage

CPU usage.

min(/Proxmox VE by HTTP/proxmox.node.cpu[{#NODE.NAME}],5m) > {$PVE.CPU.PUSE.MAX.WARN:"{#NODE.NAME}"} Warning
Proxmox: Node [{#NODE.NAME}] high root filesystem space usage

If there is no swap configured, this trigger is ignored.

min(/Proxmox VE by HTTP/proxmox.node.swapused[{#NODE.NAME}],5m) / last(/Proxmox VE by HTTP/proxmox.node.swaptotal[{#NODE.NAME}]) * 100 > {$PVE.SWAP.PUSE.MAX.WARN:"{#NODE.NAME}"} and last(/Proxmox VE by HTTP/proxmox.node.swaptotal[{#NODE.NAME}]) > 0 Warning

LLD rule Storage discovery

Name Description Type Key and additional info
Storage discovery Dependent item proxmox.storage.discovery

Item prototypes for Storage discovery

Name Description Type Key and additional info
Proxmox: Storage [{#NODE.NAME}/{#STORAGE.NAME}]: Type

More specific type, if available.

Dependent item proxmox.node.plugintype[{#NODE.NAME},{#STORAGE.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 12h

Proxmox: Storage [{#NODE.NAME}/{#STORAGE.NAME}]: Size

Storage size in bytes.

Dependent item proxmox.node.maxdisk[{#NODE.NAME},{#STORAGE.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 10m

Proxmox: Storage [{#NODE.NAME}/{#STORAGE.NAME}]: Content

Allowed storage content types.

Dependent item proxmox.node.content[{#NODE.NAME},{#STORAGE.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 12h

Proxmox: Storage [{#NODE.NAME}/{#STORAGE.NAME}]: Used

Used disk space in bytes.

Dependent item proxmox.node.disk[{#NODE.NAME},{#STORAGE.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 10m

Trigger prototypes for Storage discovery

Name Description Expression Severity Dependencies and additional info
Proxmox: Storage [{#NODE.NAME}/{#STORAGE.NAME}] high filesystem space usage

Root filesystem space usage.

min(/Proxmox VE by HTTP/proxmox.node.disk[{#NODE.NAME},{#STORAGE.NAME}],5m) / last(/Proxmox VE by HTTP/proxmox.node.maxdisk[{#NODE.NAME},{#STORAGE.NAME}]) * 100 >{$PVE.STORAGE.PUSE.MAX.WARN:"{#NODE.NAME}/{#STORAGE.NAME}"} Warning

LLD rule QEMU discovery

Name Description Type Key and additional info
QEMU discovery Dependent item proxmox.qemu.discovery

Item prototypes for QEMU discovery

Name Description Type Key and additional info
Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Disk write, rate

Disk write.

Dependent item proxmox.qemu.diskwrite[{#QEMU.ID}]

Preprocessing

  • JSON Path: $.data.diskwrite

  • Change per second
  • Discard unchanged with heartbeat: 10m

Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Disk read, rate

Disk read.

Dependent item proxmox.qemu.diskread[{#QEMU.ID}]

Preprocessing

  • JSON Path: $.data.diskread

  • Change per second
  • Discard unchanged with heartbeat: 10m

Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Memory usage

Used memory in bytes.

Dependent item proxmox.qemu.mem[{#QEMU.ID}]

Preprocessing

  • JSON Path: $.data.mem

  • Discard unchanged with heartbeat: 10m

Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Memory total

The total memory expressed in bytes.

Dependent item proxmox.qemu.maxmem[{#QEMU.ID}]

Preprocessing

  • JSON Path: $.data.maxmem

  • Discard unchanged with heartbeat: 10m

Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Incoming data, rate

Incoming data rate.

Dependent item proxmox.qemu.netin[{#QEMU.ID}]

Preprocessing

  • JSON Path: $.data.netin

  • Change per second
  • Custom multiplier: 8

  • Discard unchanged with heartbeat: 10m

Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Outgoing data, rate

Outgoing data rate.

Dependent item proxmox.qemu.netout[{#QEMU.ID}]

Preprocessing

  • JSON Path: $.data.netout

  • Change per second
  • Custom multiplier: 8

  • Discard unchanged with heartbeat: 10m

Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: CPU usage

CPU load.

Dependent item proxmox.qemu.cpu[{#QEMU.ID}]

Preprocessing

  • JSON Path: $.data.cpu

  • Custom multiplier: 100

  • Discard unchanged with heartbeat: 10m

Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME}]: Status

Read VM status.

HTTP agent proxmox.qemu.status[{#QEMU.ID}]
Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Uptime

The system uptime expressed in the following format: "N days, hh:mm:ss".

Dependent item proxmox.qemu.uptime[{#QEMU.ID}]

Preprocessing

  • JSON Path: $.data.uptime

Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Status Dependent item proxmox.qemu.vmstatus[{#QEMU.ID}]

Preprocessing

  • JSON Path: $.data.status

Trigger prototypes for QEMU discovery

Name Description Expression Severity Dependencies and additional info
Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})] high memory usage

Memory usage.

min(/Proxmox VE by HTTP/proxmox.qemu.mem[{#QEMU.ID}],5m) / last(/Proxmox VE by HTTP/proxmox.qemu.maxmem[{#QEMU.ID}]) * 100 >{$PVE.VM.MEMORY.PUSE.MAX.WARN:"{#QEMU.ID}"} Warning
Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})] high CPU usage

CPU usage.

min(/Proxmox VE by HTTP/proxmox.qemu.cpu[{#QEMU.ID}],5m) > {$PVE.VM.CPU.PUSE.MAX.WARN:"{#QEMU.ID}"} Warning
Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME}]: has been restarted

Uptime is less than 10 minutes.

last(/Proxmox VE by HTTP/proxmox.qemu.uptime[{#QEMU.ID}])<10m Info Manual close: Yes
Depends on:
  • Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Not running
Proxmox: VM [{#NODE.NAME}/{#QEMU.NAME} ({#QEMU.ID})]: Not running

VM state is not "running".

last(/Proxmox VE by HTTP/proxmox.qemu.vmstatus[{#QEMU.ID}])<>"running" Average

LLD rule LXC discovery

Name Description Type Key and additional info
LXC discovery Dependent item proxmox.lxc.discovery

Item prototypes for LXC discovery

Name Description Type Key and additional info
Proxmox: LXC [{#LXC.NAME}/{#LXC.NAME}]: Status

Read LXC status.

HTTP agent proxmox.lxc.status[{#LXC.ID}]
Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Uptime

The system uptime expressed in the following format: "N days, hh:mm:ss".

Dependent item proxmox.lxc.uptime[{#LXC.ID}]

Preprocessing

  • JSON Path: $.data.uptime

Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Status Dependent item proxmox.lxc.vmstatus[{#LXC.ID}]

Preprocessing

  • JSON Path: $.data.status

Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Disk write, rate

Disk write.

Dependent item proxmox.lxc.diskwrite[{#LXC.ID}]

Preprocessing

  • JSON Path: $.data.diskwrite

  • Change per second
  • Discard unchanged with heartbeat: 10m

Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Disk read, rate

Disk read.

Dependent item proxmox.lxc.diskread[{#LXC.ID}]

Preprocessing

  • JSON Path: $.data.diskread

  • Change per second
  • Discard unchanged with heartbeat: 10m

Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Memory usage

Used memory in bytes.

Dependent item proxmox.lxc.mem[{#LXC.ID}]

Preprocessing

  • JSON Path: $.data.mem

  • Discard unchanged with heartbeat: 10m

Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Memory total

The total memory expressed in bytes.

Dependent item proxmox.lxc.maxmem[{#LXC.ID}]

Preprocessing

  • JSON Path: $.data.maxmem

  • Discard unchanged with heartbeat: 10m

Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Incoming data, rate

Incoming data rate.

Dependent item proxmox.lxc.netin[{#LXC.ID}]

Preprocessing

  • JSON Path: $.data.netin

  • Change per second
  • Custom multiplier: 8

  • Discard unchanged with heartbeat: 10m

Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Outgoing data, rate

Outgoing data rate.

Dependent item proxmox.lxc.netout[{#LXC.ID}]

Preprocessing

  • JSON Path: $.data.netout

  • Change per second
  • Custom multiplier: 8

  • Discard unchanged with heartbeat: 10m

Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: CPU usage

CPU load.

Dependent item proxmox.lxc.cpu[{#LXC.ID}]

Preprocessing

  • JSON Path: $.data.cpu

  • Custom multiplier: 100

  • Discard unchanged with heartbeat: 10m

Trigger prototypes for LXC discovery

Name Description Expression Severity Dependencies and additional info
Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME}]: has been restarted

Uptime is less than 10 minutes.

last(/Proxmox VE by HTTP/proxmox.lxc.uptime[{#LXC.ID}])<10m Info Manual close: Yes
Depends on:
  • Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Not running
Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})]: Not running

LXC state is not "running".

last(/Proxmox VE by HTTP/proxmox.lxc.vmstatus[{#LXC.ID}])<>"running" Average
Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})] high memory usage

Memory usage.

min(/Proxmox VE by HTTP/proxmox.lxc.mem[{#LXC.ID}],5m) / last(/Proxmox VE by HTTP/proxmox.lxc.maxmem[{#LXC.ID}]) * 100 >{$PVE.LXC.MEMORY.PUSE.MAX.WARN:"{#LXC.ID}"} Warning
Proxmox: LXC [{#NODE.NAME}/{#LXC.NAME} ({#LXC.ID})] high CPU usage

CPU usage.

min(/Proxmox VE by HTTP/proxmox.lxc.cpu[{#LXC.ID}],5m) > {$PVE.LXC.CPU.PUSE.MAX.WARN:"{#LXC.ID}"} Warning

Feedback

Please report any issues with the template at https://support.zabbix.com

You can also provide feedback, discuss the template, or ask for help at ZABBIX forums