# Veeam Backup and Replication by HTTP ## Overview This template is designed to monitor Veeam Backup and Replication. It works without any external scripts and uses the script item. ***NOTE:*** Since the RESTful API may not be available for some editions, the template will only work with the following editions of Veeam Backup and Replication: 1. Veeam Universal License (VUL) editions: * Foundation * Advanced * Premium 2. Veeam Socket License editions: * Enterprise Plus Socket > See [Veeam Data Platform Feature Comparison](https://www.veeam.com/licensing-pricing.html) for more details. ## Requirements Zabbix version: 7.0 and higher. ## Tested versions This template has been tested on: - Veeam Backup and Replication, version 11.0 ## Configuration > Zabbix should be configured according to the instructions in the [Templates out of the box](https://www.zabbix.com/documentation/7.0/manual/config/templates_out_of_the_box) section. ## Setup 1. Create a user to monitor the service or use an existing read-only account. > See [Veeam Help Center](https://helpcenter.veeam.com/docs/backup/vbr_rest/reference/vbr-rest-v1-rev2.html?ver=110#tag/Login/operation/CreateToken!path=grant_type&t=request) for more details. 2. Link the template to a host. 3. Configure the following macros: `{$VEEAM.API.URL}`, `{$VEEAM.USER}`, and `{$VEEAM.PASSWORD}`. ### Macros used |Name|Description|Default| |----|-----------|-------| |{$VEEAM.API.URL}|
The Veeam API endpoint is a URL in the format `
Sets the HTTP proxy to `http_proxy` value. If this parameter is empty, then no proxy is used.
|| |{$VEEAM.PASSWORD}|The `password` of the Veeam Backup and Replication account. It is used to obtain an access token.
|| |{$VEEAM.USER}|The `username` of the Veeam Backup and Replication account. It is used to obtain an access token.
|| |{$VEEAM.DATA.TIMEOUT}|A response timeout for the API.
|`10`| |{$CREATED.AFTER}|Returns sessions that are created after chosen days.
|`7`| |{$SESSION.NAME.MATCHES}|This macro is used in discovery rule to evaluate sessions.
|`.*`| |{$SESSION.NAME.NOT_MATCHES}|This macro is used in discovery rule to evaluate sessions.
|`CHANGE_IF_NEEDED`| |{$SESSION.TYPE.MATCHES}|This macro is used in discovery rule to evaluate sessions.
|`.*`| |{$SESSION.TYPE.NOT_MATCHES}|This macro is used in discovery rule to evaluate sessions.
|`CHANGE_IF_NEEDED`| |{$PROXIES.NAME.MATCHES}|This macro is used in proxies discovery rule.
|`.*`| |{$PROXIES.NAME.NOT_MATCHES}|This macro is used in proxies discovery rule.
|`CHANGE_IF_NEEDED`| |{$PROXIES.TYPE.MATCHES}|This macro is used in proxies discovery rule.
|`.*`| |{$PROXIES.TYPE.NOT_MATCHES}|This macro is used in proxies discovery rule.
|`CHANGE_IF_NEEDED`| |{$REPOSITORIES.NAME.MATCHES}|This macro is used in repositories discovery rule.
|`.*`| |{$REPOSITORIES.NAME.NOT_MATCHES}|This macro is used in repositories discovery rule.
|`CHANGE_IF_NEEDED`| |{$REPOSITORIES.TYPE.MATCHES}|This macro is used in repositories discovery rule.
|`.*`| |{$REPOSITORIES.TYPE.NOT_MATCHES}|This macro is used in repositories discovery rule.
|`CHANGE_IF_NEEDED`| |{$JOB.NAME.MATCHES}|This macro is used in discovery rule to evaluate the states of jobs.
|`.*`| |{$JOB.NAME.NOT_MATCHES}|This macro is used in discovery rule to evaluate the states of jobs.
|`CHANGE_IF_NEEDED`| |{$JOB.TYPE.MATCHES}|This macro is used in discovery rule to evaluate the states of jobs.
|`.*`| |{$JOB.TYPE.NOT_MATCHES}|This macro is used in discovery rule to evaluate the states of jobs.
|`CHANGE_IF_NEEDED`| |{$JOB.STATUS.MATCHES}|This macro is used in discovery rule to evaluate the states of jobs.
|`.*`| |{$JOB.STATUS.NOT_MATCHES}|This macro is used in discovery rule to evaluate the states of jobs.
|`CHANGE_IF_NEEDED`| ### Items |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |Veeam: Get metrics|The result of API requests is expressed in the JSON.
|Script|veeam.get.metrics| |Veeam: Get errors|The errors from API requests.
|Dependent item|veeam.get.errors**Preprocessing**
JSON Path: `$.error`
⛔️Custom on fail: Set value to
Discard unchanged with heartbeat: `1h`
Zabbix has received errors in response to API requests.
|`length(last(/Veeam Backup and Replication by HTTP/veeam.get.errors))>0`|Average|| ### LLD rule Proxies discovery |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |Proxies discovery|Discovery of proxies.
|Dependent item|veeam.proxies.discovery**Preprocessing**
JSON Path: `$.proxies.data`
Discard unchanged with heartbeat: `6h`
Gets raw data collected by the proxy server.
|Dependent item|veeam.proxy.server.raw[{#NAME}]**Preprocessing**
JSON Path: `$.managedServers.data.[?(@.id=='{#HOSTID}')].first()`
Gets raw data collected by the proxy with the name `[{#NAME}]`, `[{#TYPE}]`.
|Dependent item|veeam.proxy.raw[{#NAME}]**Preprocessing**
JSON Path: `$.proxies.data.[?(@.id=='{#ID}')].first()`
The maximum number of concurrent tasks.
|Dependent item|veeam.proxy.maxtask[{#NAME}]**Preprocessing**
JSON Path: `$.server.maxTaskCount`
The name of the proxy server.
|Dependent item|veeam.proxy.server.name[{#NAME}]**Preprocessing**
JSON Path: `$.name`
The type of the proxy server.
|Dependent item|veeam.proxy.server.type[{#NAME}]**Preprocessing**
JSON Path: `$.type`
Discovery of repositories.
|Dependent item|veeam.repositories.discovery**Preprocessing**
JSON Path: `$.repositories_states.data`
Discard unchanged with heartbeat: `6h`
Gets raw data from repository with the name: `[{#NAME}]`, `[{#TYPE}]`.
|Dependent item|veeam.repositories.raw[{#NAME}]**Preprocessing**
JSON Path: `$.repositories_states.data.[?(@.id=='{#ID}')].first()`
Used space by repositories expressed in gigabytes (GB).
|Dependent item|veeam.repository.capacity[{#NAME}]**Preprocessing**
JSON Path: `$.usedSpaceGB`
Free space of repositories expressed in gigabytes (GB).
|Dependent item|veeam.repository.free.space[{#NAME}]**Preprocessing**
JSON Path: `$.freeGB`
Discovery of sessions.
|Dependent item|veeam.sessions.discovery**Preprocessing**
JSON Path: `$.sessions.data`
JavaScript: `The text is too long. Please see the template.`
Discard unchanged with heartbeat: `6h`
Gets raw data from session with the name: `[{#NAME}]`, `[{#TYPE}]`.
|Dependent item|veeam.sessions.raw[{#ID}]**Preprocessing**
JSON Path: `$.sessions.data.[?(@.id=='{#ID}')].first()`
⛔️Custom on fail: Discard value
The state of the session. The enums used: `Stopped`, `Starting`, `Stopping`, `Working`, `Pausing`, `Resuming`, `WaitingTape`, `Idle`, `Postprocessing`, `WaitingRepository`, `WaitingSlot`.
|Dependent item|veeam.sessions.state[{#ID}]**Preprocessing**
JSON Path: `$.state`
The result of the session. The enums used: `None`, `Success`, `Warning`, `Failed`.
|Dependent item|veeam.sessions.result[{#ID}]**Preprocessing**
JSON Path: `$.result.result`
A message that explains the session result.
|Dependent item|veeam.sessions.message[{#ID}]**Preprocessing**
JSON Path: `$.result.message`
The progress of the session expressed as percentage.
|Dependent item|veeam.sessions.progress.percent[{#ID}]**Preprocessing**
JSON Path: `$.progressPercent`
Discovery of the jobs states.
|Dependent item|veeam.job.state.discovery**Preprocessing**
JSON Path: `$.jobs_states.data`
Discard unchanged with heartbeat: `6h`
Gets raw data from the job states with the name `[{#NAME}]`.
|Dependent item|veeam.jobs.states.raw[{#ID}]**Preprocessing**
JSON Path: `$.jobs_states.data.[?(@.id=='{#ID}')].first()`
The current status of the job. The enums used: `running`, `inactive`, `disabled`.
|Dependent item|veeam.jobs.status[{#ID}]**Preprocessing**
JSON Path: `$.status`
The result of the session. The enums used: `None`, `Success`, `Warning`, `Failed`.
|Dependent item|veeam.jobs.last.result[{#ID}]**Preprocessing**
JSON Path: `$.lastResult`