From 85ebb47c7c3565119a4ed4962c2e581b8a0361ce Mon Sep 17 00:00:00 2001 From: smolkik-code Date: Thu, 16 Jul 2026 13:07:09 +0700 Subject: [PATCH] Reapply "Add aggregate Veeam jobs summary item" This reverts commit c8b6f4d31b2d38e0db5ba17c177ae2ed2db8ad8c. --- Monitor-VeeamJobs.ps1 | 27 +++++++++++++++++++++++++++ README.md | 14 +++++++++++++- zabbix-templete-veeam-jobs.xml | 28 ++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) diff --git a/Monitor-VeeamJobs.ps1 b/Monitor-VeeamJobs.ps1 index 590ed73..bbf48f8 100644 --- a/Monitor-VeeamJobs.ps1 +++ b/Monitor-VeeamJobs.ps1 @@ -506,6 +506,31 @@ function Format-VeeamJobDetailsTable { return ($lines -join [Environment]::NewLine) } +function Format-VeeamJobsSummary { + param( + [Parameter(Mandatory = $true)] + [object[]]$JobDetails + ) + + if ($JobDetails.Count -eq 0) { + return 'No Veeam jobs found' + } + + $lines = @('Job | Enabled | Last run | Next run | Result | Restore points') + + foreach ($job in ($JobDetails | Sort-Object -Property name)) { + $lines += ('{0} | {1} | {2} | {3} | {4} | {5}' -f + $job.name, + $job.enabled_text, + $job.last_run, + $job.next_run, + $job.result, + $job.restore_points_text) + } + + return ($lines -join [Environment]::NewLine) +} + function Format-ZabbixSenderValue { param( [object]$Value @@ -644,6 +669,7 @@ function Get-VeeamJobMetrics { error_names = Format-ZabbixTextValue -Values @($errorJobs | ForEach-Object { Get-VeeamJobName -Job $_ }) warning_names = Format-ZabbixTextValue -Values @($warningJobs | ForEach-Object { Get-VeeamJobName -Job $_ }) jobs_table = Format-VeeamJobDetailsTable -JobDetails $jobDetails + jobs_summary = Format-VeeamJobsSummary -JobDetails $jobDetails jobs_lld = [ordered]@{ data = $jobsLld } @@ -711,6 +737,7 @@ function Send-ZabbixMetrics { "`"$ZabbixHost`" veeam.jobs.error.names $(Format-ZabbixSenderValue -Value $Metrics.error_names)" "`"$ZabbixHost`" veeam.jobs.warning.names $(Format-ZabbixSenderValue -Value $Metrics.warning_names)" "`"$ZabbixHost`" veeam.jobs.table $(Format-ZabbixSenderValue -Value $Metrics.jobs_table)" + "`"$ZabbixHost`" veeam.jobs.summary $(Format-ZabbixSenderValue -Value $Metrics.jobs_summary)" ) | Set-Content -Path $senderInput -Encoding ASCII $failedEndpoints = @() diff --git a/README.md b/README.md index 1053e98..90cece2 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ This repository contains PowerShell scripts for Veeam Backup & Replication: "error_names": "Failed job", "warning_names": "Warning job", "jobs_table": "Name | Enabled | Last run | Next run | Result | Restore points\n...", + "jobs_summary": "Job | Enabled | Last run | Next run | Result | Restore points\nDaily backup | yes | 2026-07-16 01:00:00 | 2026-07-17 01:00:00 | Success | 14", "jobs_lld": { "data": [ { @@ -79,6 +80,17 @@ dashboard widgets can group or filter the discovered items by job name. The legacy `veeam.jobs.table` item remains available as a quick text overview, but the discovered items are the preferred way to build a dashboard. +If dashboard widgets cannot render discovered items as a table, use this single +aggregate item instead: + +```text +Veeam: Jobs summary +veeam.jobs.summary +``` + +It contains all jobs in one multiline value and is the most compatible dashboard +option for Zabbix 7.0. + For a compact dashboard list, use the discovered summary item: ```text @@ -105,7 +117,7 @@ Suggested widgets: | Top row | Item value | `veeam.jobs.disabled` | | Top row | Item value | `veeam.jobs.error` | | Top row | Item value | `veeam.jobs.warning` | -| Middle | Item list | discovered `Veeam job [*]: Summary` items | +| Middle | Item value or item history | `veeam.jobs.summary` | | Bottom left | Item value or item list | `veeam.jobs.error.names` | | Bottom center | Item value or item list | `veeam.jobs.warning.names` | | Bottom right | Item value or item list | `veeam.jobs.disabled.names` | diff --git a/zabbix-templete-veeam-jobs.xml b/zabbix-templete-veeam-jobs.xml index 1c6b964..3750652 100644 --- a/zabbix-templete-veeam-jobs.xml +++ b/zabbix-templete-veeam-jobs.xml @@ -364,6 +364,34 @@ + + a1fd086f2f2a46179d01636953e8a82d + Veeam: Jobs summary + DEPENDENT + veeam.jobs.summary + 0 + + veeam.scripts.monitor + + TEXT + Dashboard-friendly multiline summary with all Veeam jobs. + + + JSONPATH + + $.jobs_summary + + + + 90d + 0 + + + component + backup + + +