REST API knowledge exchange
Post Reply
steve-block
Novice
Posts: 9
Liked: 2 times
Joined: Apr 19, 2022 3:42 pm
Full Name: Stephen Brown
Contact:

Best way to retrieve data from Veeam using a Linux host

Post by steve-block »

Hi All,

I'm working on gathering statistics for backup health. I'm trying several methods, and had previously written a script in Powershell 5.1 using the PSSnapin.

In an effort to move to remote working, I've looked at trying to get Powershell Core working (doesn't) and also VeeamEM API (can get some info. Jobs and Backups reporting 403 Forbidden.)

Is there any way of doing this presently?
Andreas Neufert
VP, Product Management
Posts: 7077
Liked: 1510 times
Joined: May 04, 2011 8:36 am
Full Name: Andreas Neufert
Location: Germany
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by Andreas Neufert »

Independant of Veeam, did you managed to open a remote powershell connection from Linux to your Windows environment and run some generic powershell commands?
steve-block
Novice
Posts: 9
Liked: 2 times
Joined: Apr 19, 2022 3:42 pm
Full Name: Stephen Brown
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by steve-block »

I've not managed to get WinRM based working, and was trying to avoid installing Powershell Core on the remote for now as wanted as light a touch solution as possible. Obviously, Powershell Core 7 with rights ports open should allow remote ps session over SSH.
jorgedlcruz
Veeam Software
Posts: 1493
Liked: 655 times
Joined: Jul 17, 2015 6:54 pm
Full Name: Jorge de la Cruz
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by jorgedlcruz » 1 person likes this post

Hello Stephen,
I am a huge Linux advocate, all the work I do around API is always Linux-based. Since Veeam Backup and Replication v11, Veeam includes a native RESTful API, on port 9419/swagger.

The API, which of course is still a work in progress, includes already a lot of useful endpoints, to create jobs, repositories, see job sessions, etc. Better for you to take a look: If in doubt about how to get to start using this, wrote a whitepaper with a fellow Solutions Architect, link here.

An example of what you can achieve with Veeam APIs + Linux + other OSE Monitoring Projects, is here.

Please ping me if you have any doubt.
Jorge de la Cruz
Senior Product Manager | Veeam ONE @ Veeam Software

@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2024 / InfluxAce / Grafana Champion
rennerstefan
Veeam Software
Posts: 688
Liked: 150 times
Joined: Jan 22, 2015 2:39 pm
Full Name: Stefan Renner
Location: Germany
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by rennerstefan » 1 person likes this post

steve-block wrote: Apr 19, 2022 8:42 pm Obviously, Powershell Core 7 with rights ports open should allow remote ps session over SSH.
The only way really is REST as explained perfectly by Jorge.
As for Powershell core there are limitations in place which won’t really allow you to run what you need.

Details in this thread: powershell-f26/veeam-11-powershell-modu ... 75751.html
Stefan Renner

Veeam PMA
steve-block
Novice
Posts: 9
Liked: 2 times
Joined: Apr 19, 2022 3:42 pm
Full Name: Stephen Brown
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by steve-block » 1 person likes this post

I have direct messaged Jorge, and in addition we now have a case open for our issue, as I suspect we may have a fault with the installation / configuration somewhere.
steve-block
Novice
Posts: 9
Liked: 2 times
Joined: Apr 19, 2022 3:42 pm
Full Name: Stephen Brown
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by steve-block »

For reference, the raised case is: 05398629
steve-block
Novice
Posts: 9
Liked: 2 times
Joined: Apr 19, 2022 3:42 pm
Full Name: Stephen Brown
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by steve-block »

Still not resolved, but now able to get connectivity out to veeam.com from the VBR Enterprise Manager, so continuing the case with support.
steve-block
Novice
Posts: 9
Liked: 2 times
Joined: Apr 19, 2022 3:42 pm
Full Name: Stephen Brown
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by steve-block »

New support case ID raised as old was closed: 05486713

Same issue being observed.
jorgedlcruz
Veeam Software
Posts: 1493
Liked: 655 times
Joined: Jul 17, 2015 6:54 pm
Full Name: Jorge de la Cruz
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by jorgedlcruz »

Thank you,
Let me take a look at the notes. No firewall or anything blocking the curl?

An API it is really an HTTP call and it will behave similar, in terms of responses, with a 200 response if okay, or 400, 500, etc.

Let me check the case.
Jorge de la Cruz
Senior Product Manager | Veeam ONE @ Veeam Software

@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2024 / InfluxAce / Grafana Champion
steve-block
Novice
Posts: 9
Liked: 2 times
Joined: Apr 19, 2022 3:42 pm
Full Name: Stephen Brown
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by steve-block »

Thanks Jorge. I've got logs ready for upload, but need customer or support to create the SFTP.
steve-block
Novice
Posts: 9
Liked: 2 times
Joined: Apr 19, 2022 3:42 pm
Full Name: Stephen Brown
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by steve-block »

jorgedlcruz wrote: Jun 15, 2022 6:49 pm ...
No firewall or anything blocking the curl?

An API it is really an HTTP call and it will behave similar, in terms of responses, with a 200 response if okay, or 400, 500, etc.
...
API calls for other functions work as expected, so absolutely certain no firewall issues. We get 200 responses for certain requests, and 403 for other ones.
steve-block
Novice
Posts: 9
Liked: 2 times
Joined: Apr 19, 2022 3:42 pm
Full Name: Stephen Brown
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by steve-block » 1 person likes this post

Logs are now on the case, and I am seeking allocation of an engineer to investigate.
jorgedlcruz
Veeam Software
Posts: 1493
Liked: 655 times
Joined: Jul 17, 2015 6:54 pm
Full Name: Jorge de la Cruz
Contact:

Re: Best way to retrieve data from Veeam using a Linux host

Post by jorgedlcruz » 1 person likes this post

Good news then Stephen, appreciated all the work on the issue.

Let's see what the Engineers can find.
Jorge de la Cruz
Senior Product Manager | Veeam ONE @ Veeam Software

@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2024 / InfluxAce / Grafana Champion
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests