將 Windows 電腦連線至 Azure 監視器Connect Windows computers to Azure Monitor

若要使用 Azure 監視器來監視及管理本機資料中心或其他雲端環境中的虛擬機器或實體電腦, 您需要部署 Log Analytics 代理程式 (也稱為 Microsoft Monitoring Agent (MMA)), 並將它設定為向一或多個 Log Analytics 工作區報告。In order to monitor and manage virtual machines or physical computers in your local datacenter or other cloud environment with Azure Monitor, you need to deploy the Log Analytics agent (also referred to as the Microsoft Monitoring Agent (MMA)) and configure it to report to one or more Log Analytics workspaces. 此代理程式也支援 Azure 自動化的混合式 Runbook 背景工作角色。The agent also supports the Hybrid Runbook Worker role for Azure Automation.

在受監視的 Windows 電腦上,會將此代理程式列為 Microsoft Monitoring Agent 服務。On a monitored Windows computer, the agent is listed as the Microsoft Monitoring Agent service. Microsoft Monitoring Agent 服務會從記錄檔和 Windows 事件記錄檔、效能資料及其他遙測收集事件。The Microsoft Monitoring Agent service collects events from log files and Windows event log, performance data, and other telemetry. 即使代理程式無法與報告的 Azure 監視器通訊, 代理程式仍會繼續執行, 並將收集到的資料排入受監視電腦的磁片上。Even when the agent is unable to communicate with Azure Monitor it reports to, the agent continues to run and queues the collected data on the disk of the monitored computer. 當連線恢復時,Microsoft Monitoring Agent 服務會將收集的資料傳送給服務。When the connection is restored, the Microsoft Monitoring Agent service sends collected data to the service.

可以使用下列其中一種方法安裝代理程式。The agent may be installed by using one of the following methods. 大部分安裝會使用這些方法的組合,視需要為不同的電腦集合進行安裝。Most installations use a combination of these methods to install different sets of computers, as appropriate. 使用每種方法的詳細資料會在本文稍後提供。Details on using each method are provided later in the article.

  • 手動安裝。Manual installation. 在電腦上執行手動安裝可使用安裝精靈、從命令列、或使用現有的軟體發佈工具部署。Setup is manually run on the computer using the setup wizard, from the command line, or deployed using an existing software distribution tool.
  • Azure 自動化期望狀態設定 (DSC)。Azure Automation Desired State Configuration (DSC). 針對已在環境中部署的 Windows 電腦,利用指令碼使用 Azure 自動化中的 DSC。Using DSC in Azure Automation with a script for Windows computers already deployed in your environment.
  • PowerShell 指令碼。PowerShell script.
  • 針對 Azure Stack 中執行內部部署 Windows 的虛擬機器,使用 Resource Manager 範本。Resource Manager template for virtual machines running Windows on-premises in Azure Stack.

注意

Azure 資訊安全中心 (ASC) 取決於 Microsoft Monitoring Agent (也稱為 Log Analytics Windows 代理程式), 並會安裝並設定它, 以在其部署過程中向 Log Analytics 工作區報告。Azure Security Center (ASC) depends on the Microsoft Monitoring Agent (also referred to as the Log Analytics Windows agent) and will install and configure it to report to a Log Analytics workspace as part of its deployment. ASC 包含自動布建選項, 可讓您在訂用帳戶中的所有 Vm 上自動安裝 Log Analytics Windows 代理程式, 並將其設定為向特定工作區報告。ASC includes an automatic provisioning option which enables automatic installation of the Log Analytics Windows agent on all VMs in your subscription and configures it to report to a specific workspace. 如需此選項的詳細資訊, 請參閱啟用 Log Analytics 代理程式的自動布建。For more information about this option, see Enable automatic provisioning of Log Analytics agent.

如果您需要將代理程式設定為向多個工作區報告, 這在初始設定期間無法執行, 只有在更新 [控制台] 或 PowerShell 中的設定 (如新增或移除工作區中所述) 之後。If you need to configure the agent to report to more than one workspace, this cannot be performed during initial setup, only afterwards by updating the settings from Control Panel or PowerShell as described in Adding or removing a workspace.

若要了解支援的組態,請檢閱支援的 Windows 作業系統網路防火牆組態To understand the supported configuration, review supported Windows operating systems and network firewall configuration.

取得工作區識別碼和金鑰Obtain workspace ID and key

安裝適用於 Windows 的 Log Analytics 代理程式之前,您需要 Log Analytics 工作區的工作區識別碼和金鑰。Before installing the Log Analytics agent for Windows, you need the workspace ID and key for your Log Analytics workspace. 在安裝過程中, 從每個安裝方法都需要這項資訊, 才能正確設定代理程式, 並確保它可以與 Azure 商業和美國政府雲端中的 Azure 監視器成功通訊。This information is required during setup from each installation method to properly configure the agent and ensure it can successfully communicate with Azure Monitor in Azure commercial and US Government cloud.

  1. 在 Azure 入口網站中,按一下 [所有服務]。In the Azure portal, click All services. 在資源清單中輸入 Log AnalyticsIn the list of resources, type Log Analytics. 當您開始輸入時,清單會根據您輸入的文字進行篩選。As you begin typing, the list filters based on your input. 選取 [Log Analytics]。Select Log Analytics.
  2. 在您的 Log Analytics 工作區清單中,選取您要設定讓代理程式向哪個工作區報告。In your list of Log Analytics workspaces, select the workspace you intend on configuring the agent to report to.
  3. 選取 [進階設定]。Select Advanced settings.

    Log Analytics 進階設定Log Analytics Advance Settings

  4. 選取 [連接的來源],然後選取 [Windows 伺服器]。Select Connected Sources, and then select Windows Servers.
  5. 將 [工作區識別碼] 和 [主要金鑰] 複製並貼到您最愛的編輯器。Copy and paste into your favorite editor, the Workspace ID and Primary Key.

設定代理程式以使用 TLS 1.2Configure Agent to use TLS 1.2

若要設定將 TLS 1.2 通訊協定用於 Windows 代理程式和 Log Analytics 服務之間的通訊,您可以遵循下列步驟,以在將代理程式安裝於虛擬機器之前或之後啟用此功能。To configure use of the TLS 1.2 protocol for communication between the Windows agent and the Log Analytics service, you can follow the steps below to enable before the agent is installed on the virtual machine or afterwards.

  1. 找出下列登錄子機碼:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\ProtocolsLocate the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols

  2. 在 TLS 1.2 HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2通訊協定底下建立子機碼Create a subkey under Protocols for TLS 1.2 HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2

  3. 在您先前所建立的 TLS 1.2 通訊協定版本子機碼底下,建立 Client 子機碼。Create a Client subkey under the TLS 1.2 protocol version subkey you created earlier. 例如, HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2 \ ClientFor example, HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client.

  4. HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2 \ 用戶端底下建立下列 DWORD 值:Create the following DWORD values under HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client:

    • Enabled [Value = 1]Enabled [Value = 1]
    • DisabledByDefault [Value = 0]DisabledByDefault [Value = 0]

設定 .NET Framework 4.6 或更新版本以支援安全密碼編譯,因為它預設為停用。Configure .NET Framework 4.6 or later to support secure cryptography, as by default it is disabled. 強式密碼編譯會使用如 TLS 1.2 等更加安全的網路通訊協定,並封鎖不安全的通訊協定。The strong cryptography uses more secure network protocols like TLS 1.2, and blocks protocols that are not secure.

  1. 找出下列登錄子機碼:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319Locate the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319.
  2. 在此子機碼底下建立 DWORD 值 SchUseStrongCrypto,並使其值為 1Create the DWORD value SchUseStrongCrypto under this subkey with a value of 1.
  3. 找出下列登錄子機碼:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319Locate the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319.
  4. 在此子機碼底下建立 DWORD 值 SchUseStrongCrypto,並使其值為 1Create the DWORD value SchUseStrongCrypto under this subkey with a value of 1.
  5. 重新啟動系統來使設定生效。Restart the system for the settings to take effect.

使用安裝精靈安裝代理程式Install the agent using setup wizard

下列步驟會在您的電腦上, 使用安裝程式, 在 Azure 中安裝和設定 Log Analytics 代理程式, 並為您的代理程式 Azure Government 雲端。The following steps install and configure the Log Analytics agent in Azure and Azure Government cloud by using the setup wizard for the agent on your computer. 如果您想要了解如何設定代理程式,以同時回報至 System Center Operations Manager 管理群組,請參閱使用代理程式安裝精靈部署 Operations Manager 代理程式If you want to learn how to configure the agent to also report to a System Center Operations Manager management group, see deploy the Operations Manager agent with the Agent Setup Wizard.

  1. 在 Log Analyics 工作區中,從您稍早瀏覽的 [Windows 伺服器] 頁面,根據 Windows 作業系統的處理器架構,選取適當的 [下載 Windows 代理程式] 版本來下載。In your Log Analytics workspace, from the Windows Servers page you navigated to earlier, select the appropriate Download Windows Agent version to download depending on the processor architecture of the Windows operating system.
  2. 執行安裝程式以在您的電腦上安裝代理程式。Run Setup to install the agent on your computer.
  3. 在 [歡迎] 頁面中按 [下一步]。On the Welcome page, click Next.
  4. 閱讀 [授權條款] 頁面上的授權,然後按一下 [我接受]。On the License Terms page, read the license and then click I Agree.
  5. 在 [目的資料夾] 頁面上,變更或保留預設的安裝資料夾,然後按 [下一步]。On the Destination Folder page, change or keep the default installation folder and then click Next.
  6. 在 [代理程式安裝選項] 頁面上,選擇將代理程式連線到 Azure Log Analytics,然後按 [下一步]。On the Agent Setup Options page, choose to connect the agent to Azure Log Analytics and then click Next.
  7. 在 [Azure Log Analytics] 頁面上,執行下列操作:On the Azure Log Analytics page, perform the following:
    1. 貼上您先前複製的工作區識別碼工作區金鑰 (主要金鑰)Paste the Workspace ID and Workspace Key (Primary Key) that you copied earlier. 如果電腦應該向 Azure Government Cloud 中的 Log Analytics 工作區回報,請從 [Azure 雲端] 下拉式清單中選取 [Azure 美國政府]。If the computer should report to a Log Analytics workspace in Azure Government cloud, select Azure US Government from the Azure Cloud drop-down list.
    2. 如果電腦需要透過 Proxy 伺服器與 Log Analytics 服務進行通訊,請按一下 [進階],然後提供 Proxy 伺服器的 URL 和連接埠號碼。If the computer needs to communicate through a proxy server to the Log Analytics service, click Advanced and provide the URL and port number of the proxy server. 如果您的 Proxy 伺服器會要求驗證,請輸入要向 Proxy 伺服器進行驗證的使用者名稱和密碼,然後按 [下一步]。If your proxy server requires authentication, type the username and password to authenticate with the proxy server and then click Next.
  8. 提供完必要的組態設定之後,按 [下一步]。Click Next once you have completed providing the necessary configuration settings.

    貼上工作區識別碼和主索引鍵paste Workspace ID and Primary Key

  9. 在 [安裝準備就緒] 頁面上,檢閱您的選擇,然後按一下 [安裝]。On the Ready to Install page, review your choices and then click Install.
  10. 在 [設定成功完成] 頁面上,按一下 [完成]。On the Configuration completed successfully page, click Finish.

完成時,[Microsoft 監視代理程式] 會出現在 [控制台] 中。When complete, the Microsoft Monitoring Agent appears in Control Panel. 若要確認它有向 Log Analytics 報告,請檢閱確認代理程式能夠連線到 Log AnalyticsTo confirm it is reporting to Log Analytics, review Verify agent connectivity to Log Analytics.

使用命令列安裝代理程式Install the agent using the command line

為代理程式下載的檔案是獨立安裝套件。The downloaded file for the agent is a self-contained installation package. 套件中包含代理程式的安裝程式和支援檔案,這些檔案需要先解壓縮,才能使用命令列正確安裝,如下列範例所示。The setup program for the agent and supporting files are contained in the package and need to be extracted in order to properly install using the command line shown in the following examples.

注意

如果您想要升級代理程式,您需要使用 Log Analytics 指令碼 API。If you want to upgrade an agent, you need to use the Log Analytics scripting API. 如需更多資訊,請參閱管理和維護適用於 Windows 和 Linux 的 Log Analytics 代理程式See the topic Managing and maintaining the Log Analytics agent for Windows and Linux for further information.

下表特別列出代理程式安裝支援的特定參數,包括使用 Automation DSC 部署時的參數。The following table highlights the specific parameters supported by setup for the agent, including when deployed using Automation DSC.

MMA 專屬選項MMA-specific options 注意Notes
NOAPM=1NOAPM=1 選擇性參數。Optional parameter. 安裝代理程式但不包括 .NET 應用程式效能監控。Installs the agent without .NET Application Performance Monitoring.
ADD_OPINSIGHTS_WORKSPACEADD_OPINSIGHTS_WORKSPACE 1 = 將代理程式設定為向工作區報告1 = Configure the agent to report to a workspace
OPINSIGHTS_WORKSPACE_IDOPINSIGHTS_WORKSPACE_ID 要新增之工作區的工作區識別碼 (guid)Workspace ID (guid) for the workspace to add
OPINSIGHTS_WORKSPACE_KEYOPINSIGHTS_WORKSPACE_KEY 用來向工作區進行初始驗證的工作區金鑰Workspace key used to initially authenticate with the workspace
OPINSIGHTS_WORKSPACE_AZURE_CLOUD_TYPEOPINSIGHTS_WORKSPACE_AZURE_CLOUD_TYPE 指定工作區所在的雲端環境Specify the cloud environment where the workspace is located
0 = Azure 商業雲端 (預設值)0 = Azure commercial cloud (default)
1 = Azure Government1 = Azure Government
OPINSIGHTS_PROXY_URLOPINSIGHTS_PROXY_URL 要使用的 Proxy URIURI for the proxy to use
OPINSIGHTS_PROXY_USERNAMEOPINSIGHTS_PROXY_USERNAME 要存取已驗證 Proxy 的使用者名稱Username to access an authenticated proxy
OPINSIGHTS_PROXY_PASSWORDOPINSIGHTS_PROXY_PASSWORD 要存取已驗證 Proxy 的密碼Password to access an authenticated proxy
  1. 若要解壓縮代理程式安裝檔案,請從提升權限的命令提示字元執行 MMASetup-<platform>.exe /c,它會提示檔案解壓縮的路徑。To extract the agent installation files, from an elevated command prompt run MMASetup-<platform>.exe /c and it will prompt you for the path to extract files to. 或者,您可以傳遞 MMASetup-<platform>.exe /c /t:<Full Path> 引數來指定路徑。Alternatively, you can specify the path by passing the arguments MMASetup-<platform>.exe /c /t:<Full Path>.

  2. 若要以無訊息方式安裝代理程式,並設定它向 Azure 商業雲端中的工作區報告,在您解壓縮安裝檔案的資料夾中輸入:To silently install the agent and configure it to report to a workspace in Azure commercial cloud, from the folder you extracted the setup files to type:

    setup.exe /qn NOAPM=1 ADD_OPINSIGHTS_WORKSPACE=1 OPINSIGHTS_WORKSPACE_AZURE_CLOUD_TYPE=0 OPINSIGHTS_WORKSPACE_ID="<your workspace ID>" OPINSIGHTS_WORKSPACE_KEY="<your workspace key>" AcceptEndUserLicenseAgreement=1
    

    或者,若要設定代理程式向 Azure 美國政府雲端報告,請輸入:or to configure the agent to report to Azure US Government cloud, type:

    setup.exe /qn NOAPM=1 ADD_OPINSIGHTS_WORKSPACE=1 OPINSIGHTS_WORKSPACE_AZURE_CLOUD_TYPE=1 OPINSIGHTS_WORKSPACE_ID="<your workspace ID>" OPINSIGHTS_WORKSPACE_KEY="<your workspace key>" AcceptEndUserLicenseAgreement=1
    

    注意

    OPINSIGHTS_WORKSPACE_IDOPINSIGHTS_WORKSPACE_KEY參數的字串值必須以雙引號封裝, 以指示 Windows Installer interprit 為封裝的有效選項。The string values for the parameters OPINSIGHTS_WORKSPACE_ID and OPINSIGHTS_WORKSPACE_KEY need to be encapsulated in double-quotes to instruct Windows Installer to interprit as valid options for the package.

使用 Azure 自動化中的 DSC 安裝代理程式Install the agent using DSC in Azure Automation

您可以用下列指令碼範例,使用 Azure Automation DSC 安裝代理程式。You can use the following script example to install the agent using Azure Automation DSC. 如果您沒有自動化帳戶,請參閱開始使用 Azure 自動化,以了解使用 Automation DSC 所需的自動化帳戶的建立需求和步驟。If you do not have an Automation account, see Get started with Azure Automation to understand requirements and steps for creating an Automation account required before using Automation DSC. 如果您不熟悉 Automation DSC,請檢閱開始使用 Automation DSCIf you are not familiar with Automation DSC, review Getting started with Automation DSC.

以下範例會安裝 64 位元代理程式,可由 URI 值識別。The following example installs the 64-bit agent, identified by the URI value. 您也可以取代 URI 值改為使用 32 位元版本。You can also use the 32-bit version by replacing the URI value. 這兩個版本的 URI 分別是︰The URIs for both versions are:

注意

此程序和指令碼範例不支援將已部署到 Windows 電腦的代理程式升級。This procedure and script example does not support upgrading the agent already deployed to a Windows computer.

代理程式套件的 32 位元和 64 位元版本具有不同的產品代碼,新發行的版本也都會有唯一代碼值。The 32-bit and 64-bit versions of the agent package have different product codes and new versions released also have a unique value. 產品代碼是唯一識別碼,為應用程式或產品的主要識別,在 Windows 安裝程式中以 ProductCode 屬性表示。The product code is a GUID that is the principal identification of an application or product and is represented by the Windows Installer ProductCode property. MMAgent.ps1 指令碼中的 ProductId 值必須符合 32 位元或 64 位元代理程式安裝程式套件的產品代碼。The ProductId value in the MMAgent.ps1 script has to match the product code from the 32-bit or 64-bit agent installer package.

若要直接從代理程式安裝套件擷取產品代碼,您可以使用適用於 Windows Installer 開發人員的 Windows SDK 元件 (Windows 軟體開發套件的元件之一) 中的 Orca.exe,或依循 Microsoft Valuable Professional (MVP) 撰寫的範例指令碼使用 PowerShell。To retrieve the product code from the agent install package directly, you can use Orca.exe from the Windows SDK Components for Windows Installer Developers that is a component of the Windows Software Development Kit or using PowerShell following an example script written by a Microsoft Valuable Professional (MVP). 針對任一方法,您都必須先從 MMASetup 安裝套件擷取 MOMagent.msi 檔案。For either approach, you first need to extract the MOMagent.msi file from the MMASetup installation package. 這在前面使用命令列安裝代理程式一節底下的第一個步驟中有所敘述。This is shown earlier in the first step under the section Install the agent using the command line.

  1. 將 xPSDesiredStateConfiguration DSC 模組從 https://www.powershellgallery.com/packages/xPSDesiredStateConfiguration 匯入 Azure 自動化。Import the xPSDesiredStateConfiguration DSC Module from https://www.powershellgallery.com/packages/xPSDesiredStateConfiguration into Azure Automation.

  2. 建立 Azure 自動化的 OPSINSIGHTS_WS_IDOPSINSIGHTS_WS_KEY 變數資產。Create Azure Automation variable assets for OPSINSIGHTS_WS_ID and OPSINSIGHTS_WS_KEY. 將 OPSINSIGHTS_WS_ID 設定為您的 Log Analytics 工作區識別碼,將 OPSINSIGHTS_WS_KEY 設定為您的工作區主索引鍵。Set OPSINSIGHTS_WS_ID to your Log Analytics workspace ID and set OPSINSIGHTS_WS_KEY to the primary key of your workspace.

  3. 複製指令碼,並將其儲存為 MMAgent.ps1。Copy the script and save it as MMAgent.ps1.

    Configuration MMAgent
    {
        $OIPackageLocalPath = "C:\Deploy\MMASetup-AMD64.exe"
        $OPSINSIGHTS_WS_ID = Get-AutomationVariable -Name "OPSINSIGHTS_WS_ID"
        $OPSINSIGHTS_WS_KEY = Get-AutomationVariable -Name "OPSINSIGHTS_WS_KEY"
    
        Import-DscResource -ModuleName xPSDesiredStateConfiguration
        Import-DscResource -ModuleName PSDesiredStateConfiguration
    
        Node OMSnode {
            Service OIService
            {
                Name = "HealthService"
                State = "Running"
                DependsOn = "[Package]OI"
            }
    
            xRemoteFile OIPackage {
                Uri = "https://go.microsoft.com/fwlink/?LinkId=828603"
                DestinationPath = $OIPackageLocalPath
            }
    
            Package OI {
                Ensure = "Present"
                Path  = $OIPackageLocalPath
                Name = "Microsoft Monitoring Agent"
                ProductId = "8A7F2C51-4C7D-4BFD-9014-91D11F24AAE2"
                Arguments = '/C:"setup.exe /qn NOAPM=1 ADD_OPINSIGHTS_WORKSPACE=1 OPINSIGHTS_WORKSPACE_ID=' + $OPSINSIGHTS_WS_ID + ' OPINSIGHTS_WORKSPACE_KEY=' + $OPSINSIGHTS_WS_KEY + ' AcceptEndUserLicenseAgreement=1"'
                DependsOn = "[xRemoteFile]OIPackage"
            }
        }
    }
    
    
  4. 使用稍早建議的方法,將指令碼中的 ProductId 值更新為從最新版代理程式安裝套件擷取的產品代碼。Update the ProductId value in the script with the product code extracted from the latest version of the agent install package using the methods recommended earlier.

  5. 將 MMAgent.ps1 設定指令碼匯入您的自動化帳戶。Import the MMAgent.ps1 configuration script into your Automation account.

  6. 為設定指派 Windows 電腦或節點Assign a Windows computer or node to the configuration. 在 15 分鐘內,節點會檢查其設定,然後系統會將代理程式推送至節點。Within 15 minutes, the node checks its configuration and the agent is pushed to the node.

確認代理程式能夠連線到 Log AnalyticsVerify agent connectivity to Log Analytics

代理程式的安裝一旦完成,可以兩種方式確認其連線成功和報告。Once installation of the agent is complete, verifying it is successfully connected and reporting can be accomplished in two ways.

在電腦的 [控制台] 中,找到 [Microsoft Monitoring Agent]。From the computer in Control Panel, find the item Microsoft Monitoring Agent. 選取它,然後代理程式應該會在 [Azure Log Analytics] 索引標籤上顯示訊息,指出:[Microsoft Monitoring Agent 已成功與 Microsoft Operations Management Suite 服務連線。]Select it and on the Azure Log Analytics tab, the agent should display a message stating: The Microsoft Monitoring Agent has successfully connected to the Microsoft Operations Management Suite service.

MMA 對 Log Analytics 的連線狀態MMA connection status to Log Analytics

您也可以在 Azure 入口網站中執行簡單的記錄查詢。You can also perform a simple log query in the Azure portal.

  1. 在 Azure 入口網站中,按一下 [所有服務]。In the Azure portal, click All services. 在資源清單中, 輸入Azure 監視器In the list of resources, type Azure Monitor. 當您開始輸入時,清單會根據您輸入的文字進行篩選。As you begin typing, the list filters based on your input. 選取 [ Azure 監視器]。Select Azure Monitor.

  2. 選取功能表中的 [記錄]。Select Logs in the menu.

  3. 在 [記錄檔] 窗格的 [查詢] 欄位中, 輸入:On the Logs pane, in the query field type:

    Heartbeat 
    | where Category == "Direct Agent" 
    | where TimeGenerated > ago(30m)  
    

在傳回的搜尋結果中,您應該會看到電腦的活動訊號記錄,指出它已連線並且向服務報告。In the search results returned, you should see heartbeat records for the computer indicating it is connected and reporting to the service.

後續步驟Next steps