Obs/bin/GMA/GetTelemetryStatusAndEditConfigs.ps1

##------------------------------------------------------------------
## <copyright file="GetTelemetryStatusAndEditConfigs.ps1" company="Microsoft">
## Copyright (C) Microsoft. All rights reserved.
## </copyright>
##------------------------------------------------------------------

Param (
    [Parameter(Mandatory=$true)]
    [System.String] $TaskName,

    [Parameter(Mandatory = $true)]
    [System.String] $GMACacheFolderPath,

    [Parameter(Mandatory = $true)]
    [System.String] $GmaPackageContentPath,

    [Parameter(Mandatory=$false)]
    [System.String] $TranscriptFolderPath = "$env:SystemDrive\Observability\ObsScheduledTaskTranscripts"
)

$functionName = $MyInvocation.MyCommand.Name

$transcriptFileName = "{0}.{1:yyyy-MM-dd}.log" -f $TaskName, $(Get-Date)
$transcriptFilePath = Join-Path -Path $TranscriptFolderPath -ChildPath $transcriptFileName
Start-Transcript -Path $transcriptFilePath -Append

Import-Module (Join-Path -Path $GmaPackageContentPath -ChildPath 'GMATenantJsonHelper.psm1') `
    -DisableNameChecking `
    -Verbose:$false

function Set-RegistryKeyLocal {
    Param (
        [Parameter(Mandatory=$True)]
        [System.Collections.Hashtable] $IdParamsToUpdate
    )
    $functionName = $MyInvocation.MyCommand.Name
    Write-ObservabilityGMAEventSource "[$functionName] Entering. Params: {IdParamsToUpdate = $($IdParamsToUpdate | ConvertTo-Json) }."

    $regPath = [Microsoft.AzureStack.Observability.ObservabilityCommon.TenantConfigGenerator.Constants]::CommonConfigRegistryPath
    Write-ObservabilityGMAEventSource "[$functionName] RegPath value is $regPath."
    
    foreach ($regKey in $IdParamsToUpdate.Keys) {
        $regValue = $IdParamsToUpdate[$regKey]
        if (Confirm-IsStringNotEmpty $regValue) {
            [Microsoft.AzureStack.Observability.ObservabilityCommon.TenantConfigGenerator.RegistryUtility]::SetRegistryKey($regPath, $regKey, $regValue)
            Write-ObservabilityGMAEventSource -Message "[$functionName] Successfully updated $regKey value ($regValue) in registry."
        }
        else {
            Write-ObservabilityGMAEventSource -Message "[$functionName] $regKey value is either null or empty. Registry value won't be updated."
        }
    }
    Write-ObservabilityGMAEventSource "[$functionName] Exiting."
}

function Set-LastWriteTimeOfFile {
    Param (
        [Parameter(Mandatory=$True)]
        [System.IO.FileInfo] $FileObj
    )
    $functionName = $MyInvocation.MyCommand.Name
    Write-ObservabilityGMAEventSource "[$functionName] Entering. Params: {FileObj = $($FileObj.Name)}."

    $FileObj.LastWriteTime = (Get-Date)
    Write-ObservabilityGMAEventSource -Message "[$functionName] Modified the LastWriteTime of $($FileObj.FullName) to $($FileObj.LastWriteTime)."
    
    Write-ObservabilityGMAEventSource "[$functionName] Exiting."
}

try
{
    Write-ObservabilityGMAEventSource -Message "[$functionName] Entering."

    $jsonDropLocation = Join-Path $GMACacheFolderPath -ChildPath "JsonDropLocation"

    $configTypesToNotUpdateAsTheyAreStatic = @(
        $MiscConstants.ConfigTypes.Diagnostics,
        $MiscConstants.ConfigTypes.Health
    )

    ## Set telemetry to always be enabled.
    $telemetryEnabled = $true
    
    try {
        ## Set the Proactive Log collection status to always be enabled.
        $diagnosticLevel = $MiscConstants.HciDiagnosticLevel.Enhanced
        Set-ProactiveLogCollectionStatus -DiagnosticLevel $diagnosticLevel
    }
    catch {
        Write-ObservabilityGMAEventSource -Message "[$functionName] Enabling Proactive log collection failed. Continuing."
    }

    $maRestarted = $false

    ## Keep track of which configs need to be updated
    $configsToBeUpdated = @{}
    $configFilePaths = @{}
    $MiscConstants.ConfigTypes.Values | ForEach-Object {
        $configType = $_
        $jsonConfigFileName = "AEO" + $configType + ".json"
        $configsToBeUpdated[$configType] = $true
        $configFilePaths[$configType] = Join-Path $jsonDropLocation -ChildPath $jsonConfigFileName
    } 

    if (Confirm-ClusterCmdletsAreAvailable) {
        Write-ObservabilityGMAEventSource -Message "[$functionName] As cluster cmdlets are available, evaluate whether the values are changed, if yes then update the reg keys as well as Tenant jsons."

        ## Fetch respective values from cluster cmdlets.
        $azureStackHciDetails = Get-AzureStackHCI
        $deviceArmResourceUri = $azureStackHciDetails.AzureResourceUri
        $stampId = $azureStackHciDetails.AzureResourceName
        $clusterName = (Get-Cluster).Name
        $osBuildVersion = Get-OSBuildVersion
        $assemblyBuild = Get-AssemblyVersion
        $nodeId = $StampId + "-" + (Get-ClusterNode(hostname)).Id

        $arcAgentResourceInfo = Get-ArcAgentResourceInfo
        $arcAgentVmId = Get-ArcAgentVmId -ArcAgentInfo $arcAgentResourceInfo

        $valuesFromClusterCmdlets = [ordered] @{
            $MiscConstants.TenantJsonPropertyNames.MONITORING_AEO_DEVICE_ARM_RESOURCE_URI = $deviceArmResourceUri
            $MiscConstants.TenantJsonPropertyNames.MONITORING_AEO_STAMPID = $stampId 
            $MiscConstants.TenantJsonPropertyNames.MONITORING_AEO_CLUSTER_NAME = $clusterName
            $MiscConstants.TenantJsonPropertyNames.MONITORING_AEO_OSBUILD = $osBuildVersion
            $MiscConstants.TenantJsonPropertyNames.MONITORING_AEO_ASSEMBLYBUILD = $assemblyBuild
            $MiscConstants.TenantJsonPropertyNames.MONITORING_AEO_NODEID = $nodeId
            $MiscConstants.TenantJsonPropertyNames.MONITORING_AEO_NODE_ARC_VMID = $arcAgentVmId
        }

        Write-ObservabilityGMAEventSource "[$functionName] Values from cluster cmdlets are as follows: $($valuesFromClusterCmdlets | ConvertTo-Json)"

        ## Check Diagnostics tenant json and evaluate whether any of the ID params have changed, if yes, then update the registry keys and all the json files.
        $diagTenantJsonFilePath = $configFilePaths[$MiscConstants.ConfigTypes.Diagnostics]

        if (-not (Test-Path -Path $diagTenantJsonFilePath))
        {
            Set-TenantConfigJsonFile -ConfigType $MiscConstants.ConfigTypes.Diagnostics -FilePath $diagTenantJsonFilePath
        }

        $jsonFiles = Get-ChildItem $jsonDropLocation
        $diagTenantJsonContent = Get-ContentAsJson $diagTenantJsonFilePath
        $currentJsonIdParams = $diagTenantJsonContent.ConstantVariables

        ## Track the idParams that are to be updated.
        $idParamsToBeUpdated = @{}

        foreach ($idParam in $valuesFromClusterCmdlets.Keys) {
            if ($valuesFromClusterCmdlets.$idParam -ne $currentJsonIdParams.$idParam) {
                $idParamsToBeUpdated.Add($idParam, $valuesFromClusterCmdlets.$idParam)
                Write-ObservabilityGMAEventSource "[$functionName] Value for $idParam is updated, registry will be updated. Current json value = $($currentJsonIdParams.$idParam), New value = $($valuesFromClusterCmdlets.$idParam)."
            }
            else {
                Write-ObservabilityGMAEventSource "[$functionName] Value for $idParam hasn't changed, registry won't be updated."
            }
        }

        ## Update the registry keys with latest values.
        if ($idParamsToBeUpdated.Count -gt 0) {
            Set-RegistryKeyLocal -IdParamsToUpdate $idParamsToBeUpdated
        }
        else {
            Write-ObservabilityGMAEventSource "[$functionName] All the Id params are latest, nothing to update."
        }
        $configTypesToRemoveJsonIfTelemetryIsDisabled = @(
            $MiscConstants.ConfigTypes.Telemetry,
            $MiscConstants.ConfigTypes.Metrics
        )
        foreach ($configType in $MiscConstants.ConfigTypes.Values) {
            Write-ObservabilityGMAEventSource "[$functionName] ConfigType to evaluate is $configType"
            $tenantJsonFilePath = $configFilePaths[$configType]
            
            ## If configType is the one whose json is to be removed based on Telemetry status and Telemetry is actually disabled, then delete the json if it exists.
            if ($configType -in $configTypesToRemoveJsonIfTelemetryIsDisabled -and (-not $telemetryEnabled)) {
                if ((Confirm-IsStringNotEmpty $tenantJsonFilePath) -and (Test-Path $tenantJsonFilePath)) {
                    Write-ObservabilityGMAEventSource "[$functionName] Telemetry is disabled, however $configType tenant json file exists. Thus, removing the file."
                    Remove-Item $tenantJsonFilePath -Verbose
                }
                else {
                    Write-ObservabilityGMAEventSource "[$functionName] Tenant json for $configType does not exists already, nothing to remove."
                }
                $configsToBeUpdated[$configType] = $false
            }
            else {
                if (Confirm-IsStringEmpty $tenantJsonFilePath) {
                    ## If the json for either telemetry or metrics is not present and telemetry is enabled, then generate the config.
                    Write-ObservabilityGMAEventSource "[$functionName] Tenant json for $configType does not exists, creating config file."
                    $tenantJsonFilePath = "$jsonDropLocation\AEO$configType.json"
                    & "$GmaPackageContentPath\NewMultiTenantJsonForObservabilityGMA.ps1" `
                        -ConfigType $configType `
                        -TelemetryEnabled $telemetryEnabled `
                        -TenantJsonFilePath $tenantJsonFilePath
                    $maRestarted = $true
                }
                else {
                    ## Update the json, only if Id param values are changed. Don't update security as that is done on-demand.
                    if ($idParamsToBeUpdated.Count -gt 0 -and $configType -ne $MiscConstants.ConfigTypes.Security) {
                        Write-ObservabilityGMAEventSource "[$functionName] Updating tenant json for $configType with latest id param values at location $tenantJsonFilePath."
                        Set-TenantConfigJsonFile -ConfigType $ConfigType -FilePath $tenantJsonFilePath
                        $maRestarted = $true
                    }
                    elseif ($configType -notin $configTypesToNotUpdateAsTheyAreStatic -and (Test-Path -Path $tenantJsonFilePath)) {
                        ## If no id params are changed, then just update the LastWriteTime so GMA downloads the latest config.
                        Write-ObservabilityGMAEventSource "[$functionName] Tenant json for $configType already has latest id params. So just updating the LastWriteTime of the file, so GMA downloads latest config."
                        Set-LastWriteTimeOfFile -FileObj $(Get-Item $tenantJsonFilePath)
                        $maRestarted = $true
                    }
                    else {
                        ## Do nothing
                        Write-ObservabilityGMAEventSource "[$functionName] Tenant json for $configType already has latest id param values, so it won't be updated."
                    }
                }
            }
        }
    }
    else {
        Write-ObservabilityGMAEventSource "[$functionName] As cluster cmdlets are not available, we will just modify the LastWriteTime of Tenant json files."
        ## Modify the LastWriteTime of Json files (except some), so that the latest MA configs are pulled down.
        foreach ($tenantJsonFile in $jsonFiles) {
            $isTenantJsonToBeUpdated = $True

            foreach ($configType in $configTypesToNotUpdateAsTheyAreStatic)
            {
                if ($tenantJsonFile.Name -match $configType)
                {
                    Write-ObservabilityGMAEventSource "[$functionName] Not updating LastWriteTime of $($tenantJsonFile.FullName) as config is static."
                    $isTenantJsonToBeUpdated = $False
                }
            }
            
            if ($isTenantJsonToBeUpdated) {
                Set-LastWriteTimeOfFile -FileObj $tenantJsonFile
                $maRestarted = $true
            }
        }
    }

    foreach ($configType in $MiscConstants.ConfigTypes.Values) {
        if($configsToBeUpdated[$configType])
        {
            Sync-TenantRegKeysAndConfigFile -ConfigType $configType -FilePath $configFilePaths[$configType]
        }
    }

    if ($maRestarted)
    {
        Write-ObservabilityGMAEventSource "[$functionName] MA has restarted: restarting $($MiscConstants.ObsServiceDetails.DiagTrack.Name) service."
        try {
            $diagTrackService = Get-Service -Name $MiscConstants.ObsServiceDetails.DiagTrack.Name -ErrorAction SilentlyContinue
            if ($diagTrackService)
            {
                $diagTrackService | Restart-Service
                Write-ObservabilityGMAEventSource "[$functionName] Restarted $($MiscConstants.ObsServiceDetails.DiagTrack.Name) service."
            }
            else
            {
                Write-ObservabilityGMAEventSource "[$functionName] $($MiscConstants.ObsServiceDetails.DiagTrack.Name) service not found."
            }
        }
        catch {
            Write-ObservabilityGMAEventSource "[$functionName] Failed to restart $($MiscConstants.ObsServiceDetails.DiagTrack.Name) service with error $_."
        }
    }
    Write-ObservabilityGMAEventSource -Message "[$functionName] Exiting."
}
catch
{
    $exceptionDetails = Get-ExceptionDetails -ErrorObject $_
    Write-ObservabilityGMAEventSource -Message "[$functionName] $exceptionDetails" -Level "ERROR"
}

Stop-Transcript
# SIG # Begin signature block
# MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA/ZyAbvYo2ZzGI
# kGHuEw37o0hO8lf+XTUwlHbiebHo/qCCDXYwggX0MIID3KADAgECAhMzAAADrzBA
# DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBI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