AzStackHciSoftware/AzStackHci.Software.Helpers.psm1

Import-LocalizedData -BindingVariable lswTxt -FileName AzStackHci.Software.Strings.psd1

class HealthModel
{
    # Attributes for Azure Monitor schema
    [string]$Name #Name of the individual test/rule/alert that was executed. Unique, not exposed to the customer.
    [string]$Title #User-facing name; one or more sentences indicating the direct issue.
    [string]$Severity #Severity of the result (Critical, Warning, Informational, Hidden) - this answers how important the result is. Critical is the only update-blocking severity.
    [string]$Description #Detailed overview of the issue and what impact the issue has on the stamp.
    [psobject]$Tags #Key-value pairs that allow grouping/filtering individual tests. For example, "Group": "ReadinessChecks", "UpdateType": "ClusterAware"
    [string]$Status #The status of the check running (i.e. Failed, Succeeded, In Progress) - this answers whether the check ran, and passed or failed.
    [string]$Remediation #Set of steps that can be taken to resolve the issue found.
    [string]$TargetResourceID #The unique identifier for the affected resource (such as a node or drive).
    [string]$TargetResourceName #The name of the affected resource.
    [string]$TargetResourceType #The type of resource being referred to (well-known set of nouns in infrastructure, aligning with Monitoring).
    [datetime]$Timestamp #The Time in which the HealthCheck was called.
    [psobject[]]$AdditionalData #Property bag of key value pairs for additional information.
    [string]$HealthCheckSource #The name of the services called for the HealthCheck (I.E. Test-AzureStack, Test-Cluster).
}

class AzStackHciSoftwareTarget : HealthModel {}

function Test-OSVersion
{
    <#
    .SYNOPSIS
        Test OS Version is correct
    .DESCRIPTION
        Get OS Version from local machine to use as minimum core count
        Expecting data from PsSessions to include local machine indicating ECE.
    #>

    [CmdletBinding()]
    param (
        [Parameter()]
        [System.Management.Automation.Runspaces.PSSession[]]
        $PsSession
    )
    try
    {
        # Get All OS versions
        $OsVersion = @()
        $OsVersion = GetOSVersion -PsSession $PsSession

        # Get OS Version from local machine to use as desired OS version
        # Expecting data from PsSessions to include local machine indicating ECE.
        $localOs = $OsVersion | Where-Object ComputerName -EQ $ENV:COMPUTERNAME
        if ($localOs)
        {
            # Check local machine for minimum OS
            $instanceResults = @()
            $instanceResults += TestOsMinimumVersion -Version $localOs
            # Check other nodes for consistency against local node
            $localOsVersion = $localOs | Select-Object -ExpandProperty OSVersion

            foreach ($version in ($OsVersion | Where-Object ComputerName -NE $ENV:COMPUTERNAME))
            {
                $detail = $lswTxt.OSVersion -f $version.OSVersion, $localOsVersion
                if ($version.OSVersion -eq $localOsVersion)
                {
                    $status = 'Succeeded'
                    Log-Info ("Checking {0}. {1}" -f $version.ComputerName, $detail)
                }
                else
                {
                    $status = 'Failed'
                    Log-Info ("Checking {0}. {1}" -f $version.ComputerName, $detail) -type Warning
                }

                $instanceResult = New-Object AzStackHciSoftwareTarget
                $instanceResult.Name = 'AzStackHci_Software_OperatingSystem_Version'
                $instanceResult.Title = 'Test Operating System Version'
                $instanceResult.Severity = 'Warning'
                $instanceResult.Description = "Checking Operating System Version matches existing cluster"
                $instanceResult.Remediation = 'https://learn.microsoft.com/en-us/azure-stack/hci/deploy/deployment-tool-install-os'
                $instanceResult.TargetResourceType = 'OperatingSystem'
                $instanceResult.Timestamp = [datetime]::UtcNow
                $instanceResult.HealthCheckSource = $ENV:EnvChkrId
                $instanceResult.TargetResourceID = $version.ComputerName
                $instanceResult.TargetResourceName = $version.ComputerName
                $AdditionalData = @()
                $AdditionalData += New-Object -TypeName PSObject -Property @{
                    Source    = $version.ComputerName
                    Resource  = 'OS Version'
                    Detail    = $detail
                    Status    = $status
                    TimeStamp = [datetime]::UtcNow
                }
                $instanceResult.AdditionalData = $AdditionalData
                $instanceResult.Status = $AdditionalData.Status
                $instanceResults += $instanceResult
            }
            return $instanceResults
        }
        else
        {
            Log-Info $lswTxt.OSVersionSkip
        }
    }
    catch
    {
        throw $_
    }
}

function GetOSVersion
{
    <#
    .SYNOPSIS
        Get OS Version from local or remote
    #>


    [CmdletBinding()]
    param (
        [System.Management.Automation.Runspaces.PSSession[]]
        $PsSession
    )
    $sb = {
        $osVersion = (Get-CimInstance -ClassName Win32_OperatingSystem -Property Version).Version
        $ntoskrnl = (Get-Item -Path (Join-Path -Path ([System.Environment]::SystemDirectory) -ChildPath 'ntoskrnl.exe')).VersionInfo.ProductVersion
        return New-Object PSObject -Property @{
            ComputerName = $ENV:COMPUTERNAME
            OSVersion    = [System.Version]("{0}.{1}" -f $osVersion,($ntoskrnl -Split '\.')[-1])
        }
    }
    $osVersion = if ($PsSession)
    {
        Invoke-Command -Session $PsSession -ScriptBlock $sb
    }
    else
    {
        Invoke-Command -ScriptBlock $sb
    }
    return $osVersion
}

function TestOsMinimumVersion
{
    <#
    .SYNOPSIS
        A short one-line action-based description, e.g. 'Tests if a function is valid'
    #>


    [CmdletBinding()]
    param (
        [Parameter()]
        [psobject]
        $Version,

        [Parameter()]
        [system.version]
        $MinVersion = '10.0.19045'

    )
    try {
        if ($version.OSVersion -ge $MinVersion)
        {
            $Status = 'Succeeded'
            $detail = $lswTxt.MinOSCheck -f $Version.OsVersion, $MinVersion
            Log-Info $detail -Type Info
        }
        else
        {
            $Status = 'Failed'
            $detail = $lswTxt.MinOSCheck -f $Version.OsVersion, $MinVersion
            Log-Info $detail -Type Warning
        }

        $instanceResult = New-Object AzStackHciSoftwareTarget
        $instanceResult.Name = 'AzStackHci_Software_OperatingSystem_Version'
        $instanceResult.Title = 'Test Operating System Version'
        $instanceResult.Severity = 'Critical'
        $instanceResult.Description = "Checking Operating System Version meets minimum version"
        $instanceResult.Remediation = 'https://learn.microsoft.com/en-us/azure-stack/hci/deploy/deployment-tool-install-os'
        $instanceResult.TargetResourceType = 'OperatingSystem'
        $instanceResult.Timestamp = [datetime]::UtcNow
        $instanceResult.HealthCheckSource = $ENV:EnvChkrId
        $instanceResult.TargetResourceID = $version.ComputerName
        $instanceResult.TargetResourceName = $version.ComputerName
        $AdditionalData = @()
        $AdditionalData += New-Object -TypeName PSObject -Property @{
            Source    = $version.ComputerName
            Resource  = 'OS Version'
            Detail    = $detail
            Status    = $status
            TimeStamp = [datetime]::UtcNow
        }
        $instanceResult.AdditionalData = $AdditionalData
        $instanceResult.Status = $AdditionalData.Status
        return $instanceResult
    }
    catch {
        throw $_
    }
}

function GetNTPServer
{
    <#
    .SYNOPSIS
        Get NTP server from local or remote
    #>


    [CmdletBinding()]
    param (
        [System.Management.Automation.Runspaces.PSSession[]]
        $PsSession
    )
    $sb = {
        $ntpSource = & w32tm.exe /query /source
        $ntpServer = ($ntpSource -split ',' | Select-Object -first 1).Trim()
        $stripchart = & w32tm.exe /stripchart /computer:$ntpServer /dataonly /samples:1
        return New-Object PSObject -Property @{
            ComputerName = $ENV:COMPUTERNAME
            NtpServer    = $ntpServer
            Stripchart   = $stripchart
        }
    }
    $ntpServer = if ($PsSession)
    {
        Invoke-Command -Session $PsSession -ScriptBlock $sb
    }
    else
    {
        Invoke-Command -ScriptBlock $sb
    }
    return $ntpServer
}

function Test-NtpServer
{
    <#
    .SYNOPSIS
        Test NTP Server is consistent across nodes and all nodes are in sync.
    #>

    [CmdletBinding()]
    param (
        [System.Management.Automation.Runspaces.PSSession[]]
        $PsSession
    )
    try {
        $ntpServerConfig = GetNTPServer -PsSession $PsSession
        $ntpStr = $ntpServerConfig | ForEach-Object { '{0}:{1}' -f $_.ComputerName, $_.ntpServer }
        $instanceResults = @()
        $AdditionalData = @()

        # localNtp should be read from local machine when running in ECE
        $localNtp = $ntpServerConfig | Where-Object ComputerName -EQ $ENV:COMPUTERNAME | Select-Object -ExpandProperty ntpServer

        # if it's not set to an external source return immediately with failure
        if ($localNtp -eq 'Local CMOS Clock')
        {
            $detail = $lswTxt.NTPServerNotSet -f $ENV:COMPUTERNAME, $localNtp
            Log-Info $detail -Type Warning

            $instanceResult = New-Object AzStackHciSoftwareTarget
            $instanceResult.Name = 'AzStackHci_Software_NTP_Server'
            $instanceResult.Title = 'Test NTP server'
            $instanceResult.Severity = 'Critical'
            $instanceResult.Description = "Checking NTP server is configured."
            $instanceResult.Remediation = 'https://learn.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-time-service-tools-and-settings'
            $instanceResult.TargetResourceType = 'OperatingSystem'
            $instanceResult.Timestamp = [datetime]::UtcNow
            $instanceResult.HealthCheckSource = $ENV:EnvChkrId
            $instanceResult.TargetResourceID = $ENV:COMPUTERNAME
            $instanceResult.TargetResourceName = $ENV:COMPUTERNAME
            $AdditionalData += New-Object -TypeName PSObject -Property @{
                Source    = $ENV:COMPUTERNAME
                Resource  = 'NTP Server'
                Detail    = $detail
                Status    = $status
                TimeStamp = [datetime]::UtcNow
            }
            $instanceResult.AdditionalData = $AdditionalData
            $instanceResult.Status = $AdditionalData.Status
            return $instanceResult
        }

        # if we found more than one node check for consistency
        if ($PsSession.Count -gt 1)
        {
            # if we found local ntp cfg, expect all nodes to be set to that.
            # if not, expect all nodes to be consistent with each other anyway.
            if ($localNtp)
            {
                Log-Info ("Checking all nodes are configured with NTP Server: {0}" -f $localNtp)
                foreach ($nodeNtp in $ntpServerConfig)
                {
                    $detail = $lswTxt.NTPServerCheck -f $nodeNtp.ComputerName, $nodeNtp.ntpServer, $localNtp
                    if ($nodeNtp.ntpServer -eq $localNtp)
                    {
                        $Status = 'Succeeded'
                        Log-Info $detail -Type Info
                    }
                    else
                    {
                        $Status = 'Failed'
                        Log-Info $detail -Type Warning
                    }

                    $AdditionalData += New-Object -TypeName PSObject -Property @{
                        Source    = $nodeNtp.ComputerName
                        Resource  = 'NTP Server'
                        Detail    = $detail
                        Status    = $status
                        TimeStamp = [datetime]::UtcNow
                    }
                }
            }
            else
            {
                if (($ntpServerConfig.ntpServer | Sort-Object | Get-Unique).Count -eq 1)
                {
                    $Status = 'Succeeded'
                    $detail = $lswTxt.NTPServerCheckPass -f ($ntpStr -join ', ')
                    Log-Info $detail -Type Info
                }
                else
                {
                    $Status = 'Failed'
                    $detail = $lswTxt.NTPServerCheckFail -f $ntpServerConfig.ntpServer
                    Log-Info $detail -Type Warning
                }

                $AdditionalData += New-Object -TypeName PSObject -Property @{
                    Source    = 'All Nodes'
                    Resource  = 'NTP Server'
                    Detail    = $detail
                    Status    = $status
                    TimeStamp = [datetime]::UtcNow
                }
            }

            $instanceResult = New-Object AzStackHciSoftwareTarget
            $instanceResult.Name = 'AzStackHci_Software_NTP_Server_Consistency'
            $instanceResult.Title = 'Test NTP server'
            $instanceResult.Severity = 'Warning'
            $instanceResult.Description = "Checking NTP server is consistent across nodes."
            $instanceResult.Remediation = 'https://learn.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-time-service-tools-and-settings'
            $instanceResult.TargetResourceType = 'OperatingSystem'
            $instanceResult.Timestamp = [datetime]::UtcNow
            $instanceResult.HealthCheckSource = $ENV:EnvChkrId
            $instanceResult.TargetResourceID = 'NTPServer'
            $instanceResult.TargetResourceName = 'All Nodes'
            $instanceResult.AdditionalData = $AdditionalData
            $instanceResult.Status = if ($AdditionalData.Status -contains 'Failed') { 'Failed' } else { 'Succeeded' }
            $instanceResults += $instanceResult
            Clear-Variable -Name AdditionalData, instanceResult -ErrorAction SilentlyContinue
        }

        foreach ($ntpCfg in $ntpServerConfig)
        {
            $stripChart = $ntpCfg.Stripchart
            if ($stripchart.Count -ge 4 -and (($stripchart[3] -like '*, +*') -or ($stripchart[3] -like '*, -*'))) {
                $status = 'Succeeded'
                $detail = $lswTxt.NtpStripChartPass -f $ntpCfg.ComputerName, $ntpCfg.NtpServer, $stripchart[3]
                Log-Info $detail
            }
            else {
                $status = 'Failed'
                $failureDetail = $stripchart | Select-String -Pattern 'error'
                $detail = $lswTxt.NtpStripChartFail -f $ntpCfg.ComputerName, $ntpCfg.NtpServer, $failureDetail
                Log-Info $detail -Type Warning
                $stripchart | ForEach-Object { Log-Info $_ -Type Warning }
            }

            $AdditionalData = New-Object -TypeName PSObject -Property @{
                Source    = $ntpCfg.ComputerName
                Resource  = 'NTP Server Sync'
                Detail    = $detail
                Status    = $status
                TimeStamp = [datetime]::UtcNow
            }

            $instanceResult = New-Object AzStackHciSoftwareTarget
            $instanceResult.Name = 'AzStackHci_Software_NTP_Server_Sync'
            $instanceResult.Title = 'Test NTP server sync'
            $instanceResult.Severity = 'Warning'
            $instanceResult.Description = "Checking nodes can sync with NTP server"
            $instanceResult.Remediation = 'https://learn.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-time-service-tools-and-settings'
            $instanceResult.TargetResourceType = 'OperatingSystem'
            $instanceResult.Timestamp = [datetime]::UtcNow
            $instanceResult.HealthCheckSource = $ENV:EnvChkrId
            $instanceResult.TargetResourceID = 'NTPServerSync'
            $instanceResult.TargetResourceName = $ntpCfg.ComputerName
            $instanceResult.AdditionalData = $AdditionalData
            $instanceResult.Status = $AdditionalData.Status
            $instanceResults += $instanceResult
        }
        return $instanceResults
    }
    catch {
        throw $_
    }
}

Export-ModuleMember -Function Test-*
# SIG # Begin signature block
# MIInvgYJKoZIhvcNAQcCoIInrzCCJ6sCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD59MV8hdKT4xNH
# EVw2hr2t8JXaxNZZuRp5yYr/dNzHI6CCDXYwggX0MIID3KADAgECAhMzAAADTrU8
# esGEb+srAAAAAANOMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI5WhcNMjQwMzE0MTg0MzI5WjB0MQsw
# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
# AQDdCKiNI6IBFWu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