PowerShell script exchange
Post Reply
grigatkis
Influencer
Posts: 14
Liked: 2 times
Joined: Nov 30, 2020 11:29 am
Contact:

Get status of VBR Health Check through API - V12

Post by grigatkis »

Hi,

with the changes from V11 to V12, a failed health check no longer causes the overall backup job to fail, given that it now runs as its own system job.

As such I'm trying to figure out what powershell command I can use to check the status of the last health check(s).
I can find cmdlets to change the healthcheckoptions, but none that can give me a status on the jobs.

Can anyone help me query the success of health checks through the API? I consider them passing/failing to be kind of important information...

Thanks.
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Get status of VBR Health Check through API - V12

Post by david.domask » 1 person likes this post

Hi!

Try

Get-VBRSession -Type HealthCheck

It will be unordered list so probably you should pass to Sort-Object by CreationTime property (-Descending to have most recent on top)
David Domask | Product Management: Principal Analyst
grigatkis
Influencer
Posts: 14
Liked: 2 times
Joined: Nov 30, 2020 11:29 am
Contact:

Re: Get status of VBR Health Check through API - V12

Post by grigatkis »

That works, thanks.
This should be plenty good enough for the monitoring.
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Get status of VBR Health Check through API - V12

Post by david.domask »

Always welcome good luck with scripting. Glad it helps.

An addendum: Get-VBRSession returns fairly "concise" information -- for basic reporting it should be plenty as you noted, but you can get a more detailed object by passing the Id from the resulting VBRBackupSession object to Get-VBRBackupSession on the -Id flag for a more detailed object.
David Domask | Product Management: Principal Analyst
grigatkis
Influencer
Posts: 14
Liked: 2 times
Joined: Nov 30, 2020 11:29 am
Contact:

Re: Get status of VBR Health Check through API - V12

Post by grigatkis »

The 'fairly concise' information should be plenty to judge if it needs to be manually checked by a backup admin.

Still - thanks for the heads up. I'm sure I'll find a use for it at some point.
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests