RESTful knowledge exchange
Post Reply
Mildur
Product Manager
Posts: 8549
Liked: 2223 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Getting Workload per SOBR

Post by Mildur »

Hi :)

I‘m trying to find a way to get workload per SOBR.
I want to know, how many of each workload is in my SOBR:
- Nutanix AHV VMs
- vSphere VMs
- Windows Server Agents
- Linux Server Agents

We will have a SOBR per each Customer on the same Backup Server. I already have scripted the output „space usages per SOBR“ in a nice table.
Now I need to get the workload per Customer. This is the only way for us, that billing can be automated.
Veeam One cannot be used because of minimal support and we want to use rest API (or powershell) to get the usage data in our customer management system.

Thanks for some input to get me on the right path :)
Product Management Analyst @ Veeam Software
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Getting Workload per SOBR

Post by oleg.feoktistov » 1 person likes this post

Hi Fabian,

Try the following way:
- Get specific SOBR through /repositories/{id}.
- Get all backups in it using BackupReferenceList link.
- Query each backup through /backups/{id} and use Platform property as a key discriminator for a workload. Though, 'CustomPlatform' value might lead to uncertain results if you have other custom platforms plugged in to VBR besides Nutanix, like Veeam Backup for AWS/Azure/Google.
- If other information like machine names or backup file size is needed, you could use RestorePointReferenceList and BackupFileReferenceList links in backup model correspondingly and parse it from there.

Let me know if it helps,
Oleg
Mildur
Product Manager
Posts: 8549
Liked: 2223 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Getting Workload per SOBR

Post by Mildur »

Hi Oleg

Thanks for your help, i will try that this week :)
Product Management Analyst @ Veeam Software
Mildur
Product Manager
Posts: 8549
Liked: 2223 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Getting Workload per SOBR

Post by Mildur »

oleg.feoktistov wrote: Jun 20, 2021 10:47 pm - Query each backup through /backups/{id} and use Platform property as a key discriminator for a workload.
I have a list now with
--> backups
--> RepoName
--> Platform Type
--> Backuptype

Agents and Nutanix are from the backuptype = ChildBackup. I can already use that to create a Usage number.
But VmWare Jobs are from type Standard Backup. Next task for me:
- Find a way to expand the vmware Backups into single workloads :D
- Find a way to count only workloads which have a backup in the last 31 days.
Product Management Analyst @ Veeam Software
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Getting Workload per SOBR

Post by oleg.feoktistov »

Find a way to expand the vmware Backups into single workloads
I'm not quite sure what you mean. You can define workload type by Platform property, like in the example below, where Platform = Vmware:

Code: Select all

curl --location --request GET 'https://localhost:9398/api/backups/{id}?format=Entity' \
--header 'Accept: application/json' \
--header 'Cookie: X-RestSvcSessionId={sessionId}'

{
    "Ref": null,
    "Platform": "VMware",
    "BackupType": "Standard",
    "Name": "Backup to SOBR with Azure",
    "UID": "uid"
}
Find a way to count only workloads which have a backup in the last 31 days.
If I understand the required counter correctly, for that you would need to:
- Expand backups' restore points following RestorePointReferenceList link in backup entity model.
- Filter them by Name property, where Name = CreationTime and see whether the backup you query has restore points created in the last month.

Let me know if I understood your goal correctly, and if you need any further help.

Thanks,
Oleg
Mildur
Product Manager
Posts: 8549
Liked: 2223 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Getting Workload per SOBR

Post by Mildur »

hi Oleg
Thanks. I will be on vacation tomorrow for 2.5 weeks.
Unfortunetly, I don't have time to test the next steps until after my vacation.
I will test the next steps as you proposed as soon I am back.
Product Management Analyst @ Veeam Software
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Getting Workload per SOBR

Post by oleg.feoktistov » 1 person likes this post

Hi Fabian,

Have a good one!
Sure thing, let me know after if it helps.

Best regards,
Oleg
Mildur
Product Manager
Posts: 8549
Liked: 2223 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Getting Workload per SOBR

Post by Mildur »

Hi Oleg

I will definetly to that.
Thank you very much. :)
Product Management Analyst @ Veeam Software
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest