• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
The Blog of Jorge de la Cruz

The Blog of Jorge de la Cruz

Everything about VMware, Veeam, InfluxData, Grafana, Zimbra, etc.

  • Home
  • VMWARE
  • VEEAM
    • Veeam Content Recap 2021
    • Veeam v11a
      • Veeam Backup and Replication v11a
    • Veeam Backup for AWS
      • Veeam Backup for AWS v4
    • Veeam Backup for Azure
      • Veeam Backup for Azure v3
    • VeeamON 2021
      • Veeam Announces Support for Red Hat Enterprise Virtualization (RHEV/KVM)
      • Veeam announces enhancements for new versions of Veeam Backup for AWS v4/Azure v3/GVP v2
      • VBO v6 – Self-Service Portal and Native Integration with Azure Archive and AWS S3 Glacier
  • Grafana
    • Part I (Installing InfluxDB, Telegraf and Grafana on Ubuntu 20.04 LTS)
    • Part VIII (Monitoring Veeam using Veeam Enterprise Manager)
    • Part XII (Native Telegraf Plugin for vSphere)
    • Part XIII – Veeam Backup for Microsoft Office 365 v4
    • Part XIV – Veeam Availability Console
    • Part XV – IPMI Monitoring of our ESXi Hosts
    • Part XVI – Performance and Advanced Security of Veeam Backup for Microsoft Office 365
    • Part XVII – Showing Dashboards on Two Monitors Using Raspberry Pi 4
    • Part XIX (Monitoring Veeam with Enterprise Manager) Shell Script
    • Part XXII (Monitoring Cloudflare, include beautiful Maps)
    • Part XXIII (Monitoring WordPress with Jetpack RESTful API)
    • Part XXIV (Monitoring Veeam Backup for Microsoft Azure)
    • Part XXV (Monitoring Power Consumption)
    • Part XXVI (Monitoring Veeam Backup for Nutanix)
    • Part XXVII (Monitoring ReFS and XFS (block-cloning and reflink)
    • Part XXVIII (Monitoring HPE StoreOnce)
    • Part XXIX (Monitoring Pi-hole)
    • Part XXXI (Monitoring Unifi Protect)
    • Part XXXII (Monitoring Veeam ONE – experimental)
    • Part XXXIII (Monitoring NetApp ONTAP)
    • Part XXXIV (Monitoring Runecast)
  • Nutanix
  • ZIMBRA
  • PRTG
  • LINUX
  • MICROSOFT

Veeam: How to get the Job Sessions History from Veeam Backup for Azure (GUI+RESTFul API)

1st July 2021 - Written in: veeam

Greetings everyone, I have demonstrated to you before the beauty, and use that is to get real-time visibility of the Veeam Backup for Azure, using Grafana. And not that long ago, I have as well gone and step forward and created a Detailed Daily HTML Report for all the workloads that you are protecting in Azure.

Today I wanted to show to you a truly simple way of getting a comfortable CSV (Comma Separated Values) file of your Job Sessions, so you can parse it to your taste, produce beautiful Excel Spreadsheets, and even sometimes include this file into some sort of application that does the parsing to you, of course in the case that you want to automate this, will show you today how to get it from the RESTful API.

How to Obtain the Job Sessions History in CSV/XML from the GUI

Ok, so the procedure could not be easier, as the Product Managers at Veeam had thought about it, from our Veeam Backup for Microsoft Azure Console, we go to Sessions Log:

And now on the top-right, we can see a comfortable button that will allow us to download the history on CSV, or XML:

From here, as you can expect, you will receive an XML, or CSV, file and you can do your magic on Excel, like for example converting it to a table:

And from there adding filters to the headers, so you can for example monitor just the PolicyBackup Jobs:

And from there, just filter by date and obtain, just the last seven days, for example:

That’s it, you have a full document, with all the history since the Veeam Backup for Azure Appliance was deployed, have fun with it!.

How to Obtain the Job Sessions History in CSV/XML from RESTful API

Alright, the GUI method is simple enough, but what about if you want to automate this somehow, and obtain a CSV every 24 hours, or something like that. For that, I will truly recommend to use the Veeam Backup for Azure RESTful API.

The specific call to run the export of the Job Sessions can be officially found here:

  • https://helpcenter.veeam.com/docs/vbazure/rest/stop_session.html?ver=20

Great news, I am always happy to find the API calls we need, properly documented, so let’s put them in practice, shall we? As you remember, any API call to Veeam Backup for Azure, it will require a Bearer Token, so you will need to obtain one running the next:

curl -X POST "https://YOURVBAIP/api/oauth2/token" -H  "accept: application/json" -H  "Content-Type: application/x-www-form-urlencoded" -d "Username=YOURVBAUSER&Password=YOURVBAPASSWORD"

This will give you a very long Bearer Token, grab that, and have it ready for the next API call:

After you have that token, you can now run any API call, but in this case, you want to CSV, right. And I guess you are in a Linux environment, so the final call will look something like this:

curl -X POST "https://YOURVBAIP/api/v2/jobSessions/export" -H  "accept: text/csv" -H  "Authorization: Bearer YOURBEARER" -d "" >> YOURJOBEXPORT.csv

This will generate a file called YOURJOBEXPORT.CSV, on the path you are running the line, if you want to change that, just add the path to the command. And with this, you can take that CSV, and start doing all the work you need, you can do your magic on Excel, like for example converting it to a table:

And from there adding filters to the headers, so you can for example monitor just the PolicyBackup Jobs:

And from there, just filter by date and obtain, just the last seven days, for example:

That’s it, you have a full document, with all the history since the Veeam Backup for Azure Appliance was deployed, have fun with it!.

I hope this is a simple way of getting job sessions and do some stuff with that information. Remember that if you are looking to obtain a Detailed Daily HTML Report you can follow this link, and to get a proper Dashboarding with a lot of information in real-time, you can follow this other link.

Filed Under: veeam Tagged With: veeam azure, veeam azure csv, veeam azure html, veeam azure reporting, veeam azure sessions

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

  • E-mail
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • YouTube

Posts Calendar

July 2021
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Jun   Aug »

Disclaimer

All opinions expressed on this site are my own and do not represent the opinions of any company I have worked with, am working with, or will be working with.

Copyright © 2025 · The Blog of Jorge de la Cruz