Agentless, cloud-native backup for Microsoft Azure
Post Reply
jorgedlcruz
Veeam Software
Posts: 345
Liked: 149 times
Joined: Jul 17, 2015 6:54 pm
Full Name: Jorge de la Cruz
Contact:

Grafana Dashboard using the new RestAPI

Post by jorgedlcruz » 6 people like this post

Hi guys,
I'm glad to share this community project over here, by leveraging the really powerful new RESTful API that Veeam Backup for Microsoft Azure brings, I have built a quick bash script that pulls the data out, send it to InfluxDB, and from there it is presented in a gorgeous Grafana Dashboard, please take a quick look to this URL to see it in action: The step-by-step can be found here - https://jorgedelacruz.uk/2020/04/30/loo ... oft-azure/

And as a quick example in image, here:
Image
Image
Jorge de la Cruz
Systems Engineer UKI @ Veeam Software

@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2020 / Nutanix Technology Champion 2018-2019 / InfluxAce

frankive
Service Provider
Posts: 945
Liked: 108 times
Joined: May 14, 2013 8:35 pm
Full Name: Frank Iversen
Location: Norway
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by frankive » 1 person likes this post

That was a very good looking dashboard :)

@jorgedlcruz , Is it possible to use Grafana to integrate with VAC and VBR in the same way for a UNIFIED single pane of glass for all Veeam related jobs?

Mike Resseler
Product Manager
Posts: 6130
Liked: 714 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by Mike Resseler »

Hey @frankive I'm sure @jorgedlcruz will reply here, but what exactly are you looking for, so we understand it better. One single grafana dashboard that connects to the different solutions and merges data? Or a dashboard that will have multiple "pages" with information for each solution separately?

frankive
Service Provider
Posts: 945
Liked: 108 times
Joined: May 14, 2013 8:35 pm
Full Name: Frank Iversen
Location: Norway
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by frankive »

We always look for the best way to get an overview of all of our backup jobs, regarding its VAC og Azure backup.
It seems like Grafana really can make this great. Not sure whats the best approach regarding multiple pages for each solution VS one page with multiple sources.
For a monitor on the wall we can easy switch between tabs automatically with Chrome so different solutions in each tab would work nice.

As a MSP we have always tried to achive a monitor solution which covers all of our backup jobs in a Singel Pane of View on a wall-monitor.

jorgedlcruz
Veeam Software
Posts: 345
Liked: 149 times
Joined: Jul 17, 2015 6:54 pm
Full Name: Jorge de la Cruz
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by jorgedlcruz »

Hello Frank,
The short answer is, yes this is possible, as within the years I have wrote different scripts to parse from all Veeam RESTFul API, and from there save it into "tables" to InfluxDB, last step from there is show them in Grafana, something like this:
Image

Can you create a simple Dashboard for a specific Customer you are offering him: VBO, VBA, and VBR? YES, I was building something like this:
Image

I am very close to having all Veeam products into a single Dashboard, for some specific cases like the ones you are mentioning, but all of this work is in my free time, for fun, and as you can guess, not officially supported. All the work is on VeeamHub - https://github.com/VeeamHub/grafana and it is MIT licensed, so feel free to grab it, edit it, make it better.

Ideas and feedback are all welcome.
Jorge de la Cruz
Systems Engineer UKI @ Veeam Software

@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2020 / Nutanix Technology Champion 2018-2019 / InfluxAce

frankive
Service Provider
Posts: 945
Liked: 108 times
Joined: May 14, 2013 8:35 pm
Full Name: Frank Iversen
Location: Norway
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by frankive »

This is just a fantastic piece of work!

Veeam should include this out-of-the-box for us backup operators which does not have the skill for scripting.. :)

jorgedlcruz
Veeam Software
Posts: 345
Liked: 149 times
Joined: Jul 17, 2015 6:54 pm
Full Name: Jorge de la Cruz
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by jorgedlcruz »

Hi Frank,
Well, Veeam does in fact include the RESTful API by default in almost all the products, and all that years of work of saving that into a DB are already available, on Grafana, which is 100% visual, you can just take what you want and show it in different places, etc. It is just a matter of pick what it is more important, an example of a query:
Image

I get your point though, but I tend to like Veeam giving the REST API, and everyone building, and integrating on their workflows, either with Grafana, Elastic, Graylog, Splunk, etc. :)
Jorge de la Cruz
Systems Engineer UKI @ Veeam Software

@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2020 / Nutanix Technology Champion 2018-2019 / InfluxAce

frankive
Service Provider
Posts: 945
Liked: 108 times
Joined: May 14, 2013 8:35 pm
Full Name: Frank Iversen
Location: Norway
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by frankive »

Hi.
I have setup telegraf and influx and can successfully query the local pi system in Grafana.
We have a Veeam Office 365 server with enabled restful api which I can browse trough https://veeam365server:4443/swagger

I have downloaded your script for Veeam Office 365 and configured it, but when i try to run it i get this errro, any clue?
https://imgur.com/a/zUGrpPu

jorgedlcruz
Veeam Software
Posts: 345
Liked: 149 times
Joined: Jul 17, 2015 6:54 pm
Full Name: Jorge de la Cruz
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by jorgedlcruz »

Hello Frank,
Yes, please install jq.
With a simple sudo apt-get install jq - or - yum install jq if you have CentOS. Let me know
Jorge de la Cruz
Systems Engineer UKI @ Veeam Software

@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2020 / Nutanix Technology Champion 2018-2019 / InfluxAce

frankive
Service Provider
Posts: 945
Liked: 108 times
Joined: May 14, 2013 8:35 pm
Full Name: Frank Iversen
Location: Norway
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by frankive »

yup, i actually found it on this page a few seconds later.. :)
https://serbaserbi-os.blogspot.com/2019 ... ry-pi.html

frankive
Service Provider
Posts: 945
Liked: 108 times
Joined: May 14, 2013 8:35 pm
Full Name: Frank Iversen
Location: Norway
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by frankive »

How long does it take to download all the data with the script? i have a demo enviroment with 5 organization and 5 backup jobs.
been running for an hour (manual start), still it misses 1 backup jobb, and the "licensed users" does not correspond with the licensed users in Veeam 365 itself.

jorgedlcruz
Veeam Software
Posts: 345
Liked: 149 times
Joined: Jul 17, 2015 6:54 pm
Full Name: Jorge de la Cruz
Contact:

Re: Grafana Dashboard using the new RestAPI

Post by jorgedlcruz »

Hi Frank,
It does depend of the content in the line 232, you have 1000, then it will look for the last 1000 backup sessions, you can tune that later and reduce it. You can play with the time at the top, and put something like last 7 days or something, you should start seeing data. If you have teams, message me jorge.delacruzATveeamDOTcom
Jorge de la Cruz
Systems Engineer UKI @ Veeam Software

@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2020 / Nutanix Technology Champion 2018-2019 / InfluxAce

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest