Update of the existing template in Virtualization/template_proxmox-ve-rest-api-zabbix/7.0/. - #797
Closed
Garfieldttt wants to merge 13 commits into
Closed
Update of the existing template in Virtualization/template_proxmox-ve-rest-api-zabbix/7.0/.#797Garfieldttt wants to merge 13 commits into
Virtualization/template_proxmox-ve-rest-api-zabbix/7.0/.#797Garfieldttt wants to merge 13 commits into
Conversation
…tus endpoint and item error handling
Updated the Zabbix template documentation for Proxmox VE REST API to include additional details on monitoring capabilities, requirements, and installation steps.
…d rebuilt dashboard
Updated the Zabbix template for Proxmox VE REST API with community additions, corrected URLs, and rebuilt the dashboard. Added new macros, discovery rules, and triggers for enhanced monitoring.
This Zabbix template enables full monitoring of a Proxmox VE environment via the official REST API. It includes metrics for hosts, clusters, VMs, containers, backup jobs, and more, with a rebuilt dashboard and corrected URLs.
Updated README to reflect community template modifications and added detailed instructions for rebuilding and API token creation.
This Zabbix template enables full monitoring of a Proxmox VE environment via the official REST API, collecting various metrics without requiring a Zabbix agent. It includes updated URLs, a rebuilt dashboard, and new discovery rules for enhanced functionality.
- guest stopped triggers used min(...,24h)=1 and could never fire
- task and backup alerts never cleared; bounded by new *.ALERT.WINDOW
macros, with the Proxmox error text in the event name
- undefined {#NODE_ID}, missing =1 in the backup trigger, byte/bytes
mismatch in the task status regex, unresolved macro in a trigger name
- dropped vm.balloonmin, it reads a field the API never returns
- disk temperature for ATA and NVMe, health as a dependent item,
missing-disk trigger, dashboard cell
- README macro tables now match the template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update of the existing template in
Virtualization/template_proxmox-ve-rest-api-zabbix/7.0/.Template UUID and template name are unchanged and the existing object UUIDs are preserved, so
this is an in-place update: existing installations keep their item history when importing with
Update existing. The template group changes from
TemplatestoTemplates/Virtualizationto follow the official guideline that requires a category after the
Templates/prefix.Cluster support
This is the main change. Guest discovery previously read
/nodes/{node}/qemuand/nodes/{node}/lxc, so only guests on the single node given by{$PVE_NODE}were monitored,and a live migration made every item of the migrated guest unsupported.
discover.qemuanddiscover.lxcare now dependent on/cluster/resources. VMs andcontainers on every node of the cluster are discovered from one Zabbix host, and migrations
no longer break their items.
{#NODE}and{#TEMPLATE}.vm.node[{#VMID}]andlxc.node[{#VMID}]report the node a guest currently runson, with an informational trigger that fires when the value changes, which indicates a
migration.
/cluster/resourcesand are still read from the node givenby
{$PVE_NODE}: QEMUballoon,balloon_minandrunning-machine, LXCswapandmaxswap. For guests on other nodes they stay empty instead of turning unsupported.read per node. Monitoring several nodes in that depth means one Zabbix host per PVE node.
New monitoring areas
Three new discovery rules and sixteen new items:
/nodes/{node}/disks/list/nodes/{node}/network/cluster/ha/status/current/cluster/status/nodes/{node}/timeTwo calculated items were added so that percentage values exist as items instead of only inside
trigger expressions:
pve.memory.utilandpve.rootfs.util.Standalone installations are handled explicitly:
pve.cluster.namereportsstandalone,pve.cluster.quorumreports1, and the HA discovery finds nothing without turningunsupported, so none of these produce false alarms on a single node.
The interface-down trigger requires the interface to have been active before and skips
interfaces without
autostart, and{$IFACE.NOT_MATCHES}drops the per-guest interfaces thatProxmox creates and destroys together with a VM or container.
Rebuilt dashboard
The dashboard was rebuilt around the widgets introduced in Zabbix 7.0 and now uses widget
communication, so the previous 22 graph-prototype widgets are replaced by five pages that can be
navigated interactively.
vmidtag, Honeycomb of VM states, plus Item value and Graph that follow the selectionThe drill-down uses the documented data source mechanism:
itemnavigatorandhoneycombbroadcast
_itemid, anditem,gaugeandgraphconsume it through a<field>._referencefield.Consistent item tags
Every item and item prototype now carries a component tag and an instance tag. Previously eight
master items had no tags at all, and five discovery rules produced items without any instance
tag, so filtering by a single storage, node, user or task was impossible.
vmidon all guest, task and backup items, which makes it possible toselect one guest and see all of its values, and which is what the dashboard groups by.
Usertag namespace was folded intoPVE.PVE: Raw.Bug fixes
/cluster/ha/status, which isonly a directory index and carries no status. Every poll fell through to the error handler.
On a production host the item had written 1429 consecutive fallback values. The source is now
/cluster/ha/status/current, and the manager status is taken from the entry withtype=master.vm.baloontovm.balloon,vm.baloonmintovm.balloonmin,user.exourationtouser.expiration.{$ENABLE_BACKUP_ALER},{$ENABLE_STORAGE_AVAILABLE_ALER}and{$ENABLE_TASK_ALER}now end inALERT.vm.vcpuwas missing.first()on its JSONPath and relied on trimming the array bracketsinstead.
{$STORAGE.UTIL.WARN}and{$STORAGE.UTIL.CRIT}.opdatafields shortened to stay within the 255 character limit.template_proxmox-ve-rest-api.yaml.yamlwith a duplicatedextension. This pull request renames it to
template_proxmox-ve-rest-api.yaml.Reliability
Error handlers on JSONPath steps went from 13 of 82 to 59 of 98. This matters because in the
Proxmox API schema for
/nodes/{node}/qemuonlyvmidandstatusare non-optional; everyother field may be absent. Previously a guest that disappeared between a discovery run and the
next poll, or a single missing optional field, turned items unsupported. Now such a value is
discarded, or replaced by the LLD macro for name items, and the item stays supported.
New macros
{$CLUSTER.NODES.OFFLINE.MAX},{$DISK.WEAROUT.MIN},{$IFACE.ACTIVE.WINDOW},{$IFACE.NOT_MATCHES},{$LXC.CPU.WARN},{$LXC.CPU.HIGH},{$MEMORY.UTIL.MAX},{$PVE.USER.EXPIRE.TIME},{$ROOTFS.UTIL.WARN},{$ROOTFS.UTIL.CRIT},{$STORAGE.UTIL.WARN},{$STORAGE.UTIL.CRIT}, plus the three renamedENABLE_*macros.Verification
Proxmox VE API schema (
api-viewer/apidoc.js, 452 endpoints)./cluster/resourcesoutput of a production Proxmox VE host with 20 VMs and one container.7.0 frontend sources, including the widget manifests that declare which widget broadcasts and
accepts which type.
maximum dependent-item nesting depth 1, every trigger, graph, calculated item and dashboard
reference resolves to an existing item key.