Grafana Dashboard for Veeam Backup & Replication


Userlevel 7
Badge +6

Greetings, friends! I want to share with you the new Grafana Dashboard for Veeam Backup & Replication, no Enterprise Manager is needed, and it uses 100% VBR API.

Small note: For those familiar with the data protection scene, you might recall that we’ve already got a Grafana Dashboard dedicated to the Veeam Enterprise Manager API since 2020.

 

Grafana Dashboard for Veeam Backup & Replication API

 

When you finish this article, if you follow all the steps, you should have something similar to this. It might be different according to your environment, number of days you select, protected workloads, jobs, etc.

Dashboard – Summary

  • Job Historical Information – The very first graph. The most important one in my opinion. Grouped by 24 hours, get to know the status of your policies per day, on a range in time.
  • Job Historical Information Table – Very similar to the previous panel, but this time with more details about job name, status, date, etc.
  • Job Historical Information Duration – Very similar to previous panels, but this time showing in a bubble way, how much every job has taken to execute. A very cool way to see what jobs are taking the longer, trends, etc.
  • Job Last Result – BIG COLORED PANELS, what everyone I talk about is asking for. Get to know the last status across all jobs, and focus only on the ones are yellow/red.
  • Infrastructure – A few tables that shows some Infrastructure data across the Veeam Backup & Replication. A lot to improve here, but so far the VBR API doesn't give us much more details.
  • Restore Points – More big panels in colors. The more points, the darker the green becomes. This is a list of all your workloads, or the selected workload on top, with the amount of restore points to date.

Topology with all logical components

Very simple way of working, we will use a bash shell script that connects to our Veeam Backup & Replication Servers, using the REST API, and then it will send the metrics to InfluxDB, and visualize them with Grafana. The design would be something similar to this:

 

Download and configure the veeam_backup_and_replication.sh script

We have almost everything ready, we have one last step, the script that will make all this work, we will download the latest version from the Github repository:

You will need jq, so please go ahead and install it first (apt-get install jq, or yum install jq)

This shell script can be downloaded and run from the telegraf server, InfluxDB, or any other Linux. We will have to edit the configuration parameters:

##
# Configurations
##
# Endpoint URL for InfluxDB
veeamInfluxDBURL="http://YOURINFLUXSERVERIP" #Your InfluxDB Server, http://FQDN or https://FQDN if using SSL
veeamInfluxDBPort="8086" #Default Port
veeamInfluxDBBucket="veeam" # InfluxDB bucket name (not ID)
veeamInfluxDBToken="TOKEN" # InfluxDB access token with read/write privileges for the bucket
veeamInfluxDBOrg="ORG NAME" # InfluxDB organisation name (not ID)

# Endpoint URL for login action
veeamJobSessions="1000"
veeamUsername="YOURVBRUSER"
veeamPassword="YOURVBRPASSWORD"
veeamBackupServer="YOURVBRAPIPORT"
veeamBackupPort="9419" #Default Port

Once the changes are done, make the script executable with chmod:

chmod +x veeam_backup_and_replication.sh

The output of the command should be something like the next, without errors:

Writing veeam_vbr_info to InfluxDB
Writing veeam_vbr_sessions to InfluxDB
Writing veeam_vbr_sessions to InfluxDB
Writing veeam_vbr_sessions to InfluxDB
Writing veeam_vbr_sessions to InfluxDB
Writing veeam_vbr_sessions to InfluxDB

If so, please now add this script to your crontab, like for example every 30 minutes:

*/30 * * * * /home/oper/veeam_backup_and_replication.sh >> /var/log/veeam_backup_and_replication.log 2>&1

Grafana Dashboards

I have already spend the time building all the queries, variables etc for you. Just go to Grafana and download it, or use the ID:

Import Grafana Dashboards easily

Knowing the Grafana dashboard ID, we can just import it:18854:

And that’s it. With the menus on the top you can display and adjust the Dashboard to your different choices, like jobs, workloads, etc.:

Please leave your feedback in the comments, or on GitHub.


58 comments

Userlevel 7
Badge +17

Nice concise yet explanative write-up @jorge.delacruz . Really appreciate you sharing. I’ve of course known about this for a while, but have never used...maybe because it was always needed to be with EM? And, now that it seems it isn’t, I may give it a go. Does Grafana need to be installed on a linux server?...or, just the script? Just a little perplexed on the install process is all.

Thanks!

Userlevel 7
Badge +6

Grafana, and InfluxDB can be installed on Windows. The dashboard will work, what it requires Linux is the bash shell script. I guess if I port all my scripts to PS all of this can be Windows some day.

 

Let me know if you ended giving it a try. :)

Userlevel 7
Badge +17

Ah ok. I’ll for sure let you know Jorge. Thanks!

Userlevel 7
Badge +21

This is great to see no EM required.  Thanks for sharing this Jorge as I am definitely going to give this a go to try to do some monitoring and automation stuff. 👍

Userlevel 7
Badge +10

Another excellent project, @jorge.delacruz ! Muchas gracias!

Userlevel 7
Badge +6

Thanks for sharing.  I’m not using EM, so this is super helpful!

Userlevel 7
Badge +6

Thanks for sharing.  I’m not using EM, so this is super helpful!

I have seen already a few members of the Community with this dashboard added to their infrastructure, and it looks soooo fresh. Feel fresh to share yours as long as no private data is there :)

Userlevel 5
Badge

Sadly, it seems like you need an enterprise plus license to be able to use the Veeam REST API…. an I have enterprise….

Userlevel 7
Badge +6

Hello RonV,

Yes, RESTful API works only on Enterprise Plus, for both, VBR and EM. If I have time I might build something using Windows Events combined with PowerShell perhaps.

Userlevel 7
Badge +22

Hi Jorge, don’t know if you got this, I looked it up and maybe it is my version of influxdb. I will continue to search but wanted to run the error by you:

Writing veeam_vbr_info to InfluxDB
Error: failed to write data: 400 Bad Request: unable to parse 'veeam_vbr_info,veeamVBRId=,veeamVBRName=,veeamVBRVersion=,veeamVBR=mvm-ldc-vbr-01:9419 vbr=1': missing tag value

 

My guess is perhaps that my version of influxdb has some syntax changes? 

Userlevel 7
Badge +6

Thanks @jorge.delacruz 

Userlevel 7
Badge +22

Ok solved the issue. After trying the influx write commands on the cli I realized that there was no syntax issue. What was really happening was something was messed up with my authentication to the VBR server. Long story short I created a new user, tested it in swagger then used that in the script and everything worked. Just goes to show be careful with errors messages they can point you don’t the wrong road. On the positive side I know a lot more now about influx db and its commands :) 

Userlevel 7
Badge +22

Ok all good. Dashboard looks great Thanks Jorge!

Userlevel 7
Badge +22

Amateur Hour: I was wondering why I had no data ingested after a few days.. then remembered.. that I had forgot to setup the cronjob :) 

Userlevel 7
Badge +17

Sooo...what explicitly is the install process? I can put this on a Linux server (Ubuntu 22.04), so what prereq’s do I need to install on it? These instructions, at least to me, seem to be a bit erratic & non-structured. Need a Step by Step process. e.g. 1. Create a Linux Server; 2. Install this and/or this on the Linux server; 3. Go here and download this; 4. Install this; 5. Run this; etc, etc. I’m kind of simple-minded ...sorry 😉 But, I’d like to see what this can do. Thanks for the effort and the assist!

Userlevel 7
Badge +21

Sooo...what explicitly is the install process? I can put this on a Linux server (Ubuntu 22.04), so what prereq’s do I need to install on it? These instructions, at least to me, seem to be a bit erratic & non-structured. Need a Step by Step process. e.g. 1. Create a Linux Server; 2. Install this and/or this on the Linux server; 3. Go here and download this; 4. Install this; 5. Run this; etc, etc. I’m kind of simple-minded ...sorry 😉 But, I’d like to see what this can do. Thanks for the effort and the assist!

Yeah I would love this too Shane. Want to get Grafana going but need the dummies guide. 😜🤣

Userlevel 7
Badge +17

@Chris.Childerhose Right?? Phew...glad I wasn’t the only one 😊

Userlevel 7
Badge +22

Hi Guys, you can go to his previous install instructions for influx and grafana and then just add on this part. https://jorgedelacruz.uk/category/veeam/

You can also find a lot of them available on the web too. I had one setup already with prometheus (but did not have influxdb so added that.

 

 

Userlevel 7
Badge +22

Here is influxdb separate on the latest ubuntu

https://linux.how2shout.com/how-to-install-influxdb-on-ubuntu-22-04-to-create-database/

Userlevel 7
Badge +22

Grafana here. https://computingforgeeks.com/how-to-install-grafana-on-ubuntu-linux-2/

 

But again he has instructions from a while back combining them both. I don’t think that would have changed. If you have any issues ask here I try and help as well

Userlevel 7
Badge +21

Thanks for the links.  I will check them out.

Userlevel 7
Badge +17

Appreciate the links/info Geoff!

Userlevel 7
Badge +6

Hello guys, the initial steup, that is InfluxDB v2.0, and Grafana, plus telegraf optional can be found here:

https://jorgedelacruz.uk/2021/04/14/looking-for-the-perfect-dashboard-influxdb-telegraf-and-grafana-part-i-installing-influxdb-telegraf-and-grafana-on-ubuntu-20-04-lts/

It works on Ubuntu 22.04 as well.

Ping me if you need anything :)

Userlevel 7
Badge +21

Hello guys, the initial steup, that is InfluxDB v2.0, and Grafana, plus telegraf optional can be found here:

https://jorgedelacruz.uk/2021/04/14/looking-for-the-perfect-dashboard-influxdb-telegraf-and-grafana-part-i-installing-influxdb-telegraf-and-grafana-on-ubuntu-20-04-lts/

It works on Ubuntu 22.04 as well.

Ping me if you need anything :)

Thanks for sharing that Jorge.

Userlevel 7
Badge +17

Really appreciate the assist @jorge.delacruz !

Comment