Timeline Visualisation Of Veeam Backup Job Sessions
Posted on May 20, 2024
- and tagged as
- veeam
I was recently going through an old SVN repo and found a small pet project I worked on. It was a simple way display Veeam job sessions in a timeline so I could visually see how long jobs were taking and how the Veeam scheduler was handling things. It also served to identify days where we hadn’t spread out the full backups across the week well enough.
Here’s an example screenshot:
Bars are colour coded based on the job result (success, warning, failure) and hovering over a bar shows data about the job, including any errors or warnings.
All the code and basic instructions are on GitHub but I wanted to add some context here.
The PowerShell script that exports the data from Veeam to a format understood by the graphing library starts days from 5:00PM instead of midnight. This means when viewing a graph for 20/05/2024 (as as in the screenshot above) you’re seeing Veeam jobs that started between 20/05/2024 5:00 PM and 21/05/2024 4:59:59 PM.
Most backup monitoring solutions use midnight, so reports for 20/05/2024 would include jobs that started at 1:00AM, and are backing up data changed the day before, assuming a company that operates during normal business hours.
The script is essentially skewed towards displaying data in a way that would be relevant to companies working standard business hours where backups are taken overnight. This is easily changed in the first few lines of the PowerShell script.
$Date = (Get-Date -Hour 17 -Minute 0 -Second 0).AddDays($_)
The script begins with 0..-7 | % {
which is used to pull the last 8 days of backup data. Once done the foreach
can be removed, the $Date
variable updated to delete the AddDays()
method call, and then configured to run on whatever schedule is desired.
Potential improvements and issues
There are a lot of improvements I wanted to add to this. Foremost is the splitting of each job session into the various steps. Currently the bar for each job starts when the job begins (i.e., when it is scheduled to run), but many jobs then sit idle waiting for Veeam Proxy or Backup Repository resources before they begin doing work. It would be nice to identify these job states within the timeline.
Another improvement would be the option to display the data in a different way: by job rather than by date. The whole timeline would be for a single job, but the Y
axis would be different dates. This could be used to identify where a job fails on specific days or at regular intervals.
Lastly would be adding a little bit of coupling between the PowerShell script and the website. Currently taking the generated JSON files and placing them in the correct path for the website is left to the user.
As a possible issue I have not tested this with Agent jobs, or anything other than vSphere backup, backup copy, and replication jobs for that matter.
That’s all for this one - I wanted to share this as I’ve seen a few requests for it on the Veeam forums over the years.