Skip to content

Keonik1/zabbix-proxmox-backup-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Proxmox Backup Server

Overview

Template for monitoring Proxmox Backup Server (PBS) 3.1.

PBS uses an API, the documentation can be found here: https://pbs.proxmox.com/docs/api-viewer/index.html

Requirements

Zabbix 6.4 and higher

Tested versions

This template has been tested on Proxmox Backup Server 3.1

Author

nikosch86

Setup

Create a monitoring user and a corresponding API Token.

Set the following access levels for the User and the Token:

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

Use the resulting Token ID and Secret in the host macros.

Macros used

Name Description Default
{$PBS.HOST}

The Hostname of the PBS server. Defaults to the HOST.CONN of the configured host.

{HOST.CONN}
{$PBS.PORT}

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

8007
{$PBS.TOKEN.ID}

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

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

Secret key.

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
{$PBS.DATASTORE.AVAILABLE.MIN}

Minimum available space in datastore in bytes (defaults to 10Gb).

10737418240
{$PBS.TASKS.DAYS}

Age of tasks to consider when looking for failed tasks (days) (defaults to 2).

2

Items

Name Description Type Key and additional info
PBS: Get disks

Get all disks status.

HTTP agent pbs.disks

Preprocessing

  • Check for not supported value

    ⛔️Custom on fail: Set value to: Error getting data

  • JSONPath: $.body.data

PBS: Get datastore status

Get datastore status information.

HTTP agent pbs.datastore.status

Preprocessing

  • Check for not supported value

    ⛔️Custom on fail: Set value to: Error getting data

  • JSONPath: $.body.data

PBS: API service status

Get API service status.

Script pbs.api.available

Preprocessing

  • Discard unchanged with heartbeat: 12h

PBS: Get failed tasks

Get erroneuous tasks.

HTTP agent pbs.tasks.error

Preprocessing

  • Check for not supported value

    ⛔️Custom on fail: Set value to: Error getting data

  • JSONPath: $.body.data

  • JavaScript (filters tasks by age)

Triggers

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

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

last(/Proxmox Backup Server by HTTP/pbs.api.available) <> 200 High
PBS: Failed tasks found

Erroneus tasks that occured within the last {$PBS.TASKS.DAYS} days have been found.

last(/Proxmox Backup Server by HTTP/pbs.tasks.error)<>"[]" High

LLD rule Datastore discovery

Name Description Type Key and additional info
PBS: Datastore discovery Dependent item pbs.datastore.discovery

Item prototypes for Datastore discovery

Name Description Type Key and additional info
PBS: Datastore [{#DATASTORE.NAME}]: Total Size

Total size of datastore in bytes.

Dependent item pbs.datastore.total[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].total.first()

  • Discard unchanged with heartbeat: 1h

PBS: Datastore [{#DATASTORE.NAME}]: Used Size

Used size of datastore in bytes.

Dependent item pbs.datastore.used[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].used.first()

  • Discard unchanged with heartbeat: 1h

PBS: Datastore [{#DATASTORE.NAME}]: Available Size

Available size of datastore in bytes.

Dependent item pbs.datastore.available[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].avail.first()

  • Discard unchanged with heartbeat: 1h

PBS: Datastore [{#DATASTORE.NAME}]: Error

Error status of datastore.

Dependent item pbs.datastore.error[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].error.first()

    ⛔️Custom on fail: Set value to: No Error

  • Discard unchanged with heartbeat: 1h

PBS: Datastore [{#DATASTORE.NAME}]: Estimated Seconds to Full

Estimation of the UNIX epoch when the storage will be full. It's calculated via a simple Linear Regression (Least Squares) over the RRD data of the last Month. Missing if not enough data points are available yet. An estimate in the past means that usage is declining or not changing.

Dependent item pbs.datastore.estimatedsecondstofull[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].['estimated-full-date'].first()

  • Javascript: var current_unixtime = Math.floor(Date.now() / 1000); var delta = Math.max(0, (value - current_unixtime)); return delta;

  • Discard unchanged with heartbeat: 1h

PBS: Datastore [{#DATASTORE.NAME}]: Estimated Full Date

Estimation of the Date Time Stamp when the storage will be full. It's calculated via a simple Linear Regression (Least Squares) over the RRD data of the last Month. Missing if not enough data points are available yet. An estimate in the past means that usage is declining or not changing.

Dependent item pbs.datastore.estimatedfulldate[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].['estimated-full-date'].first()

  • Javascript: too long, see template

  • Discard unchanged with heartbeat: 1h

PBS: Datastore [{#DATASTORE.NAME}]: Estimated Time to Full

Estimation of the Time until the storage will be full. It's calculated via a simple Linear Regression (Least Squares) over the RRD data of the last Month. Missing if not enough data points are available yet. An estimate in the past means that usage is declining or not changing.

Dependent item pbs.datastore.estimatedfulldate[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].['estimated-full-date'].first()

  • Javascript: too long, see template

  • Discard unchanged with heartbeat: 1h

Trigger prototypes for Datastore discovery

Name Description Expression Severity Dependencies and additional info
PBS: Datastore [{#DATASTORE.NAME}] Available Size

Datastore [{#DATASTORE.NAME}] has less than {$PBS.DATASTORE.AVAILABLE.MIN:"{#DATASTORE.NAME}"} bytes available.

min(/Proxmox Backup Server by HTTP/pbs.datastore.available[{#DATASTORE.NAME}],15m)<{$PBS.DATASTORE.AVAILABLE.MIN:"{#DATASTORE.NAME}"} High
PBS: Datastore [{#DATASTORE.NAME}] Error

Datastore [{#DATASTORE.NAME}] is reporting an error!

find(/Proxmox Backup Server by HTTP/pbs.datastore.error[{#DATASTORE.NAME}],,"like","No Error")=0 High
PBS: Datastore [{#DATASTORE.NAME}] filling up within one month

Datastore [{#DATASTORE.NAME}] is filling up.

last(/Proxmox Backup Server by HTTP/pbs.datastore.estimatedsecondstofull[{#DATASTORE.NAME}])<2419200 and last(/Proxmox Backup Server by HTTP/pbs.datastore.estimatedsecondstofull[{#DATASTORE.NAME}])>0 High
PBS: Datastore [{#DATASTORE.NAME}] filling up within one week

Datastore [{#DATASTORE.NAME}] is filling up.

last(/Proxmox Backup Server by HTTP/pbs.datastore.estimatedsecondstofull[{#DATASTORE.NAME}])<604800 and last(/Proxmox Backup Server by HTTP/pbs.datastore.estimatedsecondstofull[{#DATASTORE.NAME}])>0 High

LLD rule Disk discovery

Name Description Type Key and additional info
PBS: Disk discovery Dependent item pbs.disk.discovery

Item prototypes for Disk discovery

Name Description Type Key and additional info
PBS: Disk [{#DATASTORE.NAME}]: Size

Total Size of disk in bytes.

Dependent item pbs.disk.size[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.devpath == '{#DISK.PATH}')].size.first()

  • Discard unchanged with heartbeat: 1h

PBS: Disk [{#DATASTORE.NAME}]: Status

Disk status.

Dependent item pbs.disk.status[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].status.first()

  • Discard unchanged with heartbeat: 1h

PBS: Disk [{#DATASTORE.NAME}]: Name

Name of the disk.

Dependent item pbs.disk.name[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].name.first()

  • Discard unchanged with heartbeat: 1h

PBS: Disk [{#DATASTORE.NAME}]: Vendor

Vendor of the disk.

Dependent item pbs.disk.vendor[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].vendor.first()

  • Discard unchanged with heartbeat: 1h

PBS: Disk [{#DATASTORE.NAME}]: Model

Model of the disk.

Dependent item pbs.disk.model[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].model.first()

  • Discard unchanged with heartbeat: 1h

PBS: Disk [{#DATASTORE.NAME}]: Serial

Serial of the disk.

Dependent item pbs.disk.serial[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].serial.first()

  • Discard unchanged with heartbeat: 1h

PBS: Disk [{#DATASTORE.NAME}]: Used

Indicates where (and if) that disk is used by PBS.

Dependent item pbs.disk.used[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].used.first()

  • Discard unchanged with heartbeat: 1h

PBS: Disk [{#DATASTORE.NAME}]: Wearout

Wearout indicator.

Dependent item pbs.disk.wearout[{#DATASTORE.NAME}]

Preprocessing

  • JSONPath: $.[?(@.store == '{#DATASTORE.NAME}')].wearout.first()

  • Discard unchanged with heartbeat: 1h

Trigger prototypes for Datastore discovery

Name Description Expression Severity Dependencies and additional info
PBS: Disk [{#DATASTORE.NAME}] Model has changed

The model identifier has changed.

last(/Proxmox Backup Server by HTTP/pbs.disk.model[{#DISK.PATH}],#1)<>last(/Proxmox Backup Server by HTTP/pbs.disk.model[{#DISK.PATH}],#2) Warning
PBS: Disk [{#DATASTORE.NAME}] Serial has changed

The Serial number has changed.

last(/Proxmox Backup Server by HTTP/pbs.disk.serial[{#DISK.PATH}],#1)<>last(/Proxmox Backup Server by HTTP/pbs.disk.serial[{#DISK.PATH}],#2) Warning
PBS: Disk [{#DATASTORE.NAME}] Status indicates a problem

The Status indicator shows some different from 'unknown'.

find(/Proxmox Backup Server by HTTP/pbs.disk.status[{#DISK.PATH}],,"like","unknown")=0 Warning
PBS: Disk [{#DATASTORE.NAME}] Used has changed

The disk is being reported as used differently than before.

last(/Proxmox Backup Server by HTTP/pbs.disk.used[{#DISK.PATH}],#1)<>last(/Proxmox Backup Server by HTTP/pbs.disk.used[{#DISK.PATH}],#2) Warning

About

Zabbix Template for Proxmox Backup Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published