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

Getting an Unsupported RESTAPI version when attempting to run against a Veeam B&R 12 install.  Any ideas?

 

After changing the x-api-version: 1.1-rev1 to rev0 it worked fine.  Must be missing an update or something.

Userlevel 7
Badge +6

Hello, full reference can be found here:

If you have any FR, please go to the Forums and contact Oleg :)

 

I do not think this is possible today

Userlevel 1

Well, do you have any special character in the password that can escape the double quotes?, if so, you can always can try creating a local admin in VBR server, give it access in the console with an easier pass and give it a go.

Hi @jorge.delacruz after using a simple password, it can push some data to influx dB. there is a new error as below

 

Hi @jorge.delacruz after a retry it is now working okay.

Thank so much.

Is it possible to pull and display data for: surebackup, cloud failover plans and cloud connect repository?

Userlevel 7
Badge +6

Well, do you have any special character in the password that can escape the double quotes?, if so, you can always can try creating a local admin in VBR server, give it access in the console with an easier pass and give it a go.

Hi @jorge.delacruz after using a simple password, it can push some data to influx dB. there is a new error as below

 

Hello, you can omit that, it is just a job that is in progress.

Cheers

Userlevel 1

Well, do you have any special character in the password that can escape the double quotes?, if so, you can always can try creating a local admin in VBR server, give it access in the console with an easier pass and give it a go.

Hi @jorge.delacruz after using a simple password, it can push some data to influx dB. there is a new error as below

 

Userlevel 7
Badge +6

Well, do you have any special character in the password that can escape the double quotes?, if so, you can always can try creating a local admin in VBR server, give it access in the console with an easier pass and give it a go.

Userlevel 1

@jorge.delacruz yes I can connect with the same user/password in swagger

Hi @jorge.delacruz  I am getting the “Unauthorized: Authentication failed” Error when executing the bash script. I am using the local Administrator account to access the API. It works well with swagger. Which credentials should be used from the bash script to access the API?

Userlevel 7
Badge +6

Thanks for sharing with us, @jorge.delacruz !👍🏻

Userlevel 7
Badge +6

Hello, please remove the file and download the new file from github, change your user/pass, and run it, hopefully we will have more clarity on the issue.

 

Thanks!

Userlevel 1

@jorge.delacruz yes I can connect with the same user/password in swagger

Userlevel 7
Badge +6

Hi @jorge.delacruz any ideas with the following error: 

Writing veeam_vbr_info to InfluxDB
Error: failed to write data: 400 Bad Request: unable to parse 'veeam_vbr_info,veeamVBRId=,veeamVBRName=,veeamVBRVersion=,veeamVBR=192.168.0.54,veeamDatabaseVendor= vbr=1': missing tag value

Veeam Version: 12.1.1.56, License: Enterprise Plus, NFR License.

 

Hello, not getting any data, most likely is user/pass problem, please verify you can connect with the same user/pass in your swagger.

Userlevel 1

Hi @jorge.delacruz any ideas with the following error: 

Writing veeam_vbr_info to InfluxDB
Error: failed to write data: 400 Bad Request: unable to parse 'veeam_vbr_info,veeamVBRId=,veeamVBRName=,veeamVBRVersion=,veeamVBR=192.168.0.54,veeamDatabaseVendor= vbr=1': missing tag value

Veeam Version: 12.1.1.56, License: Enterprise Plus, NFR License.

 

Hi.

Great job!!!! Thank you very much!

I have some problems with jobs on vSphere only. When the script is working Hyper-V jobs are well processed - but when it comes from vSphere i get this error:

Writing veeam_vbr_backupobjects to InfluxDB
Writing veeam_vbr_backupobjects to InfluxDB
Writing veeam_vbr_backupobjects to InfluxDB
Writing veeam_vbr_backupobjects to InfluxDB
Writing veeam_vbr_backupobjects to InfluxDB
Writing veeam_vbr_backupobjects to InfluxDB
Error: failed to write data: 400 Bad Request: unable to parse 'veeam_vbr_backupobjects,veeamVBR=10.x.x.x,veeamVBRBobjectName=WACOM-SRV,veeamVBRBobjecttype=VM,veeamVBRBobjectPlatform=VMware,veeamVBRBobjectviType=VirtualMachine,veeamVBRBobjectObjectId=vm-12082,veeamVBRBobjectPath=VCENTER2-VM\DC HUAWEI\KLASTER5\WACOM-SRV restorePointsCount=5': invalid field format

 

Effect is I can’t see any of Veeam jobs on the dashboard ;((

 

Could you help me please?

Debian 12, InfluxDB 2.7.4-1

Userlevel 7
Badge +22

Hi Jonyrock,  I might also run a pre-backup script in the Veeam job as well using the builtin utility

https://docs.influxdata.com/influxdb/v1/administration/backup_and_restore/

 

cheers

@jorge.delacruz

Many thanks for sharing this much appreciate.

While discussing this with my team, one query was raised for Linux-InfulxDB Server Protection. I hope the daily VM backup in Veeam should be enough.

Userlevel 7
Badge +20

@jorge.delacruz can you supply multiple VBR servers in the script file?  Still working on the VEM one with no results so far.  Maybe this would work as an alternative.

Hello, well yes, you can create different .sh and schedule them. I am not sure if managing multiple VBRs within one script is a good idea. Maybe if I tune it to specify VBRs and credentials on different files.

Sounds good.  I will test this out and see.

Userlevel 7
Badge +6

Appears I’m a bit stuck and haven’t been able to resolve the issue. Upon running the script I get the following errors

Writing veeam_vbr_info to InfluxDB
./veeam_backup_and_replication.sh: line 63: influx: command not found
Writing veeam_vbr_sessions to InfluxDB
./veeam_backup_and_replication.sh: line 112: influx: command not found

 

Both lines reference “influx write \” . Any ideas what I might be missing here?

You need the InfluxDB Client, if running the script from an InfluxDB server, that is installed, if not, it is required: https://docs.influxdata.com/influxdb/cloud/tools/influx-cli/?t=Linux

Userlevel 7
Badge +6

I’m running Influx, Telegraf, and Grafana on a windows box. It was MUCH easier to get it setup in Linux, especially because I wanted it to have automatic windows updates/reboot, and have it start itself and display on a dashboard without any intervention. I got it going but if you follow a Linux Grafana tutorial it just seems to be so much easier. 

 

That being said, I need to try this dashboard out. It looks great.  What permissions are needed to gather the data? Can I create a read only account for this? 

 

Hello, there is not such thing as readonly API accounts today I am afraid, so you will need an administrator account. That being said, I am expecting your VBR is already hardened enough to have MFA for RDP, all ports secured, etc. You can enable the API port incoming only from the Linux box, etc.

Userlevel 7
Badge +6

Hello everyone, does the sh code also work with Veeam B&R v12? Build 12.0.0.1420

Yes of course, the code works with v11, v11a, v12, and v12 patches

Userlevel 7
Badge +6

Is it possible to monitor multiple VBR with this system or is limited to the one specified in the configuration?

Hello, it is one VBR per file for now. But very easy to create more, just have different .sh Not much different that what Veeam ONE does today, polling every VBR.

Userlevel 7
Badge +6

@jorge.delacruz can you supply multiple VBR servers in the script file?  Still working on the VEM one with no results so far.  Maybe this would work as an alternative.

Hello, well yes, you can create different .sh and schedule them. I am not sure if managing multiple VBRs within one script is a good idea. Maybe if I tune it to specify VBRs and credentials on different files.

Userlevel 7
Badge +20

@jorge.delacruz can you supply multiple VBR servers in the script file?  Still working on the VEM one with no results so far.  Maybe this would work as an alternative.

Userlevel 7
Badge +20

Is it possible to monitor multiple VBR with this system or is limited to the one specified in the configuration?

I would think if you have multiple VBR servers connected to VEM then you can monitor more than one system.  I am just trying to get it to work with one at the moment.

Is it possible to monitor multiple VBR with this system or is limited to the one specified in the configuration?

Userlevel 7
Badge +6

Thanks @jorge.delacruz !

Comment