Management reporting and documentation
Post Reply
Larry s
Influencer
Posts: 20
Liked: 4 times
Joined: Oct 25, 2013 7:29 pm
Contact:

Veeam One - Any way to see/report when the VM last rebooted/started?

Post by Larry s »

Hello,

We're trying not to reinvent the wheel and are looking for an existing method to report on the last time a virtual Windows server last rebooted? Not really uptime, per se - but from a high level, when was the server last rebooted or started?

PowerShell doesn't seem to have a built-in command or data element, we can use the old NET STAT WORKSTATION and parse back the output, but I was hoping someplace hiddedn in Veeam One the same data exists?

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

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by Mildur »

You can use the custom infrastructure report.
There is a property called „Runtime info: boot time“

That should help you to get the information you need.

https://helpcenter.veeam.com/docs/one/r ... ml?ver=110
Product Management Analyst @ Veeam Software
Larry s
Influencer
Posts: 20
Liked: 4 times
Joined: Oct 25, 2013 7:29 pm
Contact:

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by Larry s »

:( - I knew I should have said we converted from VMware to 100% Hyper-V years ago - in fact that's why we are using Veeam One, to help provide monitoring data that was built-in to vShpere.

So - now that you know we are all Hyper-V, anything in some property there that I could report on?

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

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by Mildur »

Sorry, i can‘t find anything similar for hyperv in veeam one. The „boot time“ is missing in the custom report for hyper vm objects. Looks like a FR.

I don‘t have an hyperv server, but could you do something like that?
https://richardspowershellblog.wordpres ... tart-time/

Code: Select all

$now = Get-Date
Get-VM | where State -eq 'Running' | select Name, @{N='StartTime'; E={$now -$_.Uptime}} | sort StartTime
Product Management Analyst @ Veeam Software
nikolaj
Expert
Posts: 164
Liked: 57 times
Joined: Mar 22, 2021 11:19 am
Contact:

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by nikolaj » 1 person likes this post

We had planned to implement a similar boot_time metric for Hyper-V VMs a while ago, but the core metric (OnTimeInMilliseconds) that was to be used to calculate the start time excluded the time the virtual machine was in the paused state. That could have lead to inaccurate results even if time variances would have been ultimately converging in the long run.
Be that as it may, the discrepancy would be negligible, so we might reconsider adding that column in the Hyper-V report.

Thanks.
Larry s
Influencer
Posts: 20
Liked: 4 times
Joined: Oct 25, 2013 7:29 pm
Contact:

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by Larry s »

Having you add that would be a nice addition. I'll remain hopeful that I'll see it in the relatively near future. Thanks so much...
wishr
Veteran
Posts: 3077
Liked: 453 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by wishr »

Hi Larry,

Are you fine having the limitations Nikolaj mentioned above?

Thanks
Larry s
Influencer
Posts: 20
Liked: 4 times
Joined: Oct 25, 2013 7:29 pm
Contact:

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by Larry s » 1 person likes this post

We almost never pause a virtual server - even if we did, I don't see that as a limitation based on what we are looking for. In essence, we are looking for other ways of double-checking how long a server has been running - or rebooted - as another way of cross-checking that our monthly patching cycles haven't somehow missed or failed on any servers.

Yes - our patching product offers numerous ways to also check, we just like to have multiple/different products/tools to be able to cross-check/verify each other.

Thanks...Larry
wishr
Veteran
Posts: 3077
Liked: 453 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by wishr »

Thanks for confirming. We'll try to add it back with a new property label in the future versions.
Chemosh
Lurker
Posts: 1
Liked: 1 time
Joined: Apr 28, 2016 1:40 pm
Contact:

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by Chemosh » 1 person likes this post

Hello Larry,

since the information you want is about windows servers and you have also considered powershell maybe you'll find this useful:

The WMI class Win32_OperatingSystem has a property called LastBootUpTime.

Code: Select all

Get-WmiObject -Class Win32_OperatingSystem | Select-Object -ExpandProperty LastBootUpTime
will get you something like

Code: Select all

20210819195232.500000+120
That's a bit difficult to read. You can convert that value with

Code: Select all

[Management.ManagementDateTimeConverter]::ToDateTime("20210819195232.500000+120")
to get a result like

Code: Select all

Donnerstag, 19. August 2021 19:52:32
or format it into whatever output you prefer with Get-Date.

Here is a simple powershell function that forgoes error handling and allows you to remotely query servers (if you have the neccessary permissions):

Code: Select all

Function Get-LastBootUpTime($ComputerName){
    $WMIobject = Get-WmiObject -Class Win32_OperatingSystem -ComputerName $ComputerName
    $WMIobject | Select-Object -Property @{Name="ComputerName";Expression={$_.PSComputerName}}, @{Name="OperatingSystem";Expression={$_.Caption}}, @{Name="LastBootUpTime";Expression={[Management.ManagementDateTimeConverter]::ToDateTime($_.LastBootUpTime)}}
}
Larry s
Influencer
Posts: 20
Liked: 4 times
Joined: Oct 25, 2013 7:29 pm
Contact:

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by Larry s » 1 person likes this post

Chemosh - much appreciated. We'd already found that WMI variable last week and now have a nice working PowerShell routine that is providing the data we need.

Still, I look forward to Veeam exposing that data element within Veeam One as that will be even more useful.

Thanks...Larry
wishr
Veteran
Posts: 3077
Liked: 453 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by wishr »

Hi guys,

Thank you both for the inputs.

@Larry s, would you prefer to have the "boot time/date" or the "time since the last boot time"?

Thanks
Larry s
Influencer
Posts: 20
Liked: 4 times
Joined: Oct 25, 2013 7:29 pm
Contact:

Re: Veeam One - Any way to see/report when the VM last rebooted/started?

Post by Larry s » 1 person likes this post

I'd prefer the "boot time/date" as then I could calculate anything else after exporting it into Excel. Thanks for asking :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests