Added Windows Uptime metadata to Windows provider

This commit is contained in:
Lord Hepipud 2019-07-24 12:44:02 +02:00
parent 0453398ca8
commit 63ef374223

View file

@ -24,6 +24,10 @@ function Get-IcingaWindows()
'BuildNumber' = $WindowsInformations.BuildNumber;
'OSArchitecture' = $WindowsInformations.OSArchitecture;
'NumberOfUsers' = $WindowsInformations.NumberOfUsers;
'Uptime' = @{
'raw' = $WindowsInformations.LastBootUpTime;
'value' = ((Get-Date) - $WindowsInformations.LastBootUpTime).TotalSeconds;
};
'OSType' = @{
'raw' = $WindowsInformations.OSType;
'value' = $ProviderEnums.WindowsOSType[[int]$WindowsInformations.OSType];