部署 Microsoft Teams Rooms 管理 Azure MonitorDeploy Microsoft Teams Rooms management with Azure Monitor

本文將討論如何使用設定及部署裝置的整合端對端管理 Microsoft Teams Rooms Azure Monitor 。This article discusses how to set up and deploy integrated, end-to-end management of Microsoft Teams Rooms devices by using Azure Monitor.

您可以 Log Analytics 在內部 Azure Monitor 進行設定,以提供可協助您管理會議室裝置的基本遙測及警示 Microsoft Teams Rooms 。You can configure Log Analytics within Azure Monitor to provide basic telemetry and alerts that will help you manage Microsoft Teams Rooms meeting room devices. 隨著您的管理解決方案逐漸成熟,您可能會決定要部署其他資料和管理功能來建立更詳細的裝置可用性與效能的視圖。As your management solution matures, you might decide to deploy additional data and management capabilities to create a more detailed view of device availability and performance.

透過遵循本指南,您可以使用類似下列範例的儀表板,來取得裝置可用性、應用程式和硬體健康情況,以及 Microsoft Teams Rooms 應用程式與作業系統版本發佈的詳細狀態報表。By following this guide, you can use a dashboard like the following example to get detailed status reporting for device availability, application and hardware health, and Microsoft Teams Rooms application and operating system version distribution.

Microsoft 團隊聊天室範例記錄分析視圖範例的螢幕擷取畫面Screenshot of sample Log Analytics view for Microsoft Teams Rooms

在較高的層次,您必須執行下列工作:At a high level, you need to perform the following tasks:

  1. 驗證 Log Analytics 配置Validate Log Analytics configuration
  2. 針對管理設定設定測試裝置 Log AnalyticsConfigure test devices for Log Analytics management setup
  3. 對應自訂欄位Map custom fields
  4. 中定義 Microsoft Teams Rooms 視圖 Log AnalyticsDefine the Microsoft Teams Rooms views in Log Analytics
  5. 定義警示Define alerts
  6. 設定所有要監視的裝置Configure all devices for Monitoring
  7. 設定其他 Azure Monitor 解決方案Configure additional Azure Monitor solutions

重要

雖然使用最低的設定,但 Azure Monitor Log Analytics 可以監視執行作業系統的電腦,但在 Windows Microsoft Teams Rooms 開始部署代理程式到所有裝置之前,仍需要採取一些特定步驟 Microsoft Teams Rooms 。Although with minimal configuration, Azure Monitor Log Analytics can monitor a computer running a Windows operating system, there are still some Microsoft Teams Rooms–specific steps that you need to take before you start deploying agents to all Microsoft Teams Rooms devices. 因此,我們強烈建議您以正確的循序執行所有設定步驟,以進行受控設定和設定。Therefore, we highly recommend you perform all configuration steps in the right order for a controlled setup and configuration. 最終結果的品質很高,取決於初始配置的品質。The quality of the end result very much depends on the quality of the initial configuration.

驗證 Log Analytics 配置Validate Log Analytics configuration

您必須具備 Log Analytics 工作區,才能開始從裝置收集記錄 Microsoft Teams Rooms 。You need to have a Log Analytics workspace to start collecting logs from Microsoft Teams Rooms devices. 工作區是一種獨特的 Log Analytics 環境,擁有自己的資料存放庫、資料來源及解決方案。A workspace is a unique Log Analytics environment with its own data repository, data sources, and solutions. 如果您已經有現有的 Log Analytics 工作區,您可以使用它來監視您的 Microsoft Teams Rooms 部署,或者,您也可以建立 Log Analytics 特定于您的監視需求的專用工作區 Microsoft Teams Rooms 。If you already have an existing Log Analytics workspace, you might use it to monitor your Microsoft Teams Rooms deployment or alternatively, you can create a dedicated Log Analytics workspace specific to your Microsoft Teams Rooms monitoring needs.

如果您需要建立新 Log Analytics 的工作區,請依照文章在 Log Analytics Azure 入口網站中建立工作區中的指示操作。If you need to create a new Log Analytics workspace, follow the instructions in the article Create a Log Analytics workspace in the Azure portal

注意

若要搭配使用 Log Analytics Azure Monitor ,您必須擁有有效的 Azure 訂閱。To use Log Analytics with Azure Monitor, you need to have an active Azure subscription. 如果您沒有 Azure 訂閱,您可以建立 免費試用訂閱 作為起始點。If you don't have an Azure subscription, you can create a free trial subscription as a starting point.

設定 Log Analytics 以收集 Microsoft Teams Rooms 事件記錄Configure Log Analytics to collect Microsoft Teams Rooms event logs

Log Analytics 僅收集 Windows 設定中指定的事件記錄中的事件。Log Analytics only collects events from the Windows event logs that are specified in the settings. 針對每個記錄,只會收集已選取嚴重性的事件。For each log, only the events with the selected severities are collected.

您需要設定 Log Analytics 以收集監視 Microsoft Teams Rooms 裝置和應用程式狀態所需的記錄。You need to configure Log Analytics to collect the logs required to monitor Microsoft Teams Rooms device and application status. Microsoft Teams Rooms 裝置會使用 Skype Room System 事件記錄。Microsoft Teams Rooms devices use the Skype Room System event log.

若要設定 Log Analytics 收集 Microsoft Teams Rooms 事件,請參閱 Windows 中的 Azure Monitor 事件記錄資料來源To configure Log Analytics to collect the Microsoft Teams Rooms events, see Windows event log data sources in Azure Monitor

事件記錄檔設定的螢幕擷取畫面Screenshot of event log settings

重要

設定 Windows 事件記錄的設定,並 Skype Room System 以事件記錄名稱的形式輸入,然後選取 [ 錯誤]、[ 警告] 及 [ 資訊 ] 核取方塊。Configure Windows Event Log settings and enter Skype Room System as event log name, and then select the Error, Warning, and Information check boxes.

針對 Azure 監視設定測試裝置Configure test devices for Azure Monitoring

您必須準備好 Log Analytics 監視 Microsoft Teams Rooms 相關事件。You need to prepare Log Analytics to be able to monitor Microsoft Teams Rooms–related events. 首先,您必須將 Microsoft Monitoring 代理部署到一個或兩個 Microsoft Teams Rooms 您有實際存取權的裝置,並讓這些測試裝置產生一些資料並將它推入 Log Analytics 工作區。To start with, you need to deploy Microsoft Monitoring agents to just one or two Microsoft Teams Rooms devices that you have physical access to, and get those test devices generate some data and push it to the Log Analytics workspace.

安裝 Microsoft Monitoring 代理程式以測試裝置Install Microsoft Monitoring agents to test devices

Microsoft Monitoring使用[將 Windows 電腦連線至 Log Analytics Azure 服務]中提供的指示,將代理部署到測試裝置。Deploy the Microsoft Monitoring agent to the test devices by using the instructions provided in Connect Windows computers to the Log Analytics service in Azure. 本文提供有關部署代理程式之步驟的詳細資訊 Microsoft Monitoring Windows 、取得 Log Analytics * 工作區識別碼 的指示,以及 *用來* 取得 Microsoft Teams Rooms 連接到您部署的裝置的 Azure Monitor 步驟,以及驗證 Agent 連線至實例的步驟 Log Analytics 。This article provides detailed information about the steps for deploying Microsoft Monitoring Agent for Windows, instructions for obtaining the Log Analytics Workspace ID _ and the _primary key*_ to get Microsoft Teams Rooms devices connected to your Azure Monitor deployment, and steps to verify agent connectivity to Log Analytics instance.

產生範例 Microsoft Teams Rooms 事件Generate sample Microsoft Teams Rooms events

將 Microsoft Monitoring 代理部署到測試裝置之後,請確認已收集所需的事件記錄資料 Azure Monitor 。After the Microsoft Monitoring agent is deployed onto the test devices, verify that the required event log data is collected by Azure Monitor.

注意

安裝完代理程式後重新開機裝置 Microsoft Monitoring ,並確定 Microsoft Teams Rooms 會議 app 已啟動,讓它能夠在事件記錄中產生新的事件。Reboot the device after the installation of the Microsoft Monitoring agent, and make sure that Microsoft Teams Rooms Meeting app is started, so that it can generate new events into the Event Log.

  1. 登入 Microsoft Azure 入口網站,然後前往 Log Analytics 並選取您的工作區。Sign in to the Microsoft Azure portal and go to Log Analytics and select your workspace.

  2. 列出裝置產生的心跳事件 Microsoft Teams Rooms :List the heartbeat events generated by a Microsoft Teams Rooms device:

    1. 選取您的工作區並移至 _ [*記錄**],然後使用查詢來檢索將有自訂欄位的心跳記錄 Microsoft Teams Rooms 。Select your workspace and go to _ Logs* and use a query to retrieve the heartbeat records that will have the custom fields for Microsoft Teams Rooms.
    2. 範例查詢: Event | where Source == "SRS-App" and EventID == 2000Sample query: Event | where Source == "SRS-App" and EventID == 2000
  3. 確認查詢傳回包含會議 app 所產生之事件的記錄記錄 Microsoft Teams Rooms 。Make sure that the query returns log records that include events generated by the Microsoft Teams Rooms meetings app.

  4. 產生硬體問題,並驗證所需的事件已登入 Azure Log Analytics 。Generate a hardware issue, and validate that the required events are logged in Azure Log Analytics.

    1. 在測試系統上拔掉其中一個週邊裝置 Microsoft Teams Rooms 。Unplug one of the peripheral devices on the test Microsoft Teams Rooms system. 這可能是相機、免提、麥克風或前置房間顯示器This could be the camera, speakerphone, microphone, or Front Room Display
    2. 等待10分鐘,以填入事件記錄檔 Azure Log Analytics 。Wait 10 minutes for the event log to be populated in Azure Log Analytics.
    3. 使用查詢列出硬體錯誤事件: Event | where Source == "SRS-App" and EventID == 3001Use a query to list hardware error events: Event | where Source == "SRS-App" and EventID == 3001
  5. 產生應用程式問題,並驗證所需的事件已記錄。Generate an application issue, and validate that the required events are logged.

    1. [修改 Microsoft Teams Rooms 應用程式設定],然後輸入不正確的會話初始通訊協定 (SIP) 位址/密碼對。Modify Microsoft Teams Rooms application configuration, and type an incorrect Session Initiation Protocol (SIP) address/password pair.
    2. 等待10分鐘,以填入事件記錄檔 Azure Log Analytics 。Wait 10 minutes for the event log to be populated in Azure Log Analytics.
    3. 使用查詢來列出應用程式錯誤事件: Event | where Source == "SRS-App" and EventID == 2001 and EventLevel == 1Use a query to list application error events: Event | where Source == "SRS-App" and EventID == 2001 and EventLevel == 1

重要

在可以設定自訂欄位之前,必須先進行這些範例事件記錄。These sample event logs are required before custom fields can be configured. 請不要繼續進行下一個步驟,直到您收集到所需的事件記錄為止。Don't proceed to the next step until you have collected the required event logs.

對應自訂欄位Map custom fields

您可以使用自訂欄位來提取事件記錄中的特定資料。You use custom fields to extract specific data from the event logs. 您需要定義自訂欄位,稍後會在您的磚、儀表板視圖和通知中使用。You need to define custom fields that will be used later with your tiles, dashboard views, and alerts. 在開始建立自訂欄位之前,請參閱中 Log Analytics 的自訂欄位,並熟悉這些概念。See Custom fields in Log Analytics and become familiar with the concepts before you start creating your custom fields.

若要將自訂欄位從捕獲的事件記錄提取出來,請依照下列步驟進行:To extract your custom fields out of the captured event logs, follow these steps:

  1. 登入 Microsoft Azure 入口網站,然後前往 Log Analytics 並選取您的工作區。Sign in to the Microsoft Azure portal and go to Log Analytics and select your workspace.

  2. 列出裝置產生的事件 Microsoft Teams Rooms :List the events generated by a Microsoft Teams Rooms device:

    1. 移至 [ 記錄 ] 並使用查詢來檢索將擁有自訂欄位的記錄。Go to Logs and use a query to retrieve the records that will have the custom field.
    2. 範例查詢: Event | where Source == "SRS-App" and EventID == 2000Sample query: Event | where Source == "SRS-App" and EventID == 2000
  3. 選取其中一個記錄,選取左側的按鈕,然後啟動欄位提取嚮導。Select one of the records, select the button to the left, and start the field extraction wizard.

  4. 醒目提示您想要從 RenderedDescription 提取的資料,並提供欄位標題。Highlight the data you'd like to extract from the RenderedDescription and provide a Field Title. 您應該使用的功能變數名稱會在資料表1中提供。The field names that you should use are provided in Table 1.

  5. 使用 資料表 1 中所示的對應。Use the mappings shown in Table 1. Log Analytics當您定義新欄位時,會自動附加 _ CF 字串。Log Analytics will automatically append the _CF string when you define the new field.

重要

請記住,所有 JSON 和 Log Analytics 欄位都區分大小寫。Remember that all JSON and Log Analytics fields are case-sensitive.

請注意下表中每個自訂欄位所需的查詢。Pay attention to the queries required for each custom field in the table below. 您必須使用正確的查詢, Log Analytics 才能成功地提取自訂欄位值。You need to use the correct queries for Log Analytics to successfully extract custom field values.

表格1Table 1

JSON 欄位JSON field Log Analytics 自訂欄位Log Analytics custom field 事件識別碼Event ID 要與提取搭配使用的查詢Query to use with the extraction
描述Description SRSEventDescriptionSRSEventDescription 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
ResourceStateResourceState SRSResourceStateSRSResourceState 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
EndOperationName SRSOperationNameSRSOperationName 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
OperationResultOperationResult SRSOperationResultSRSOperationResult 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
OSOS SRSOSVersionSRSOSVersion 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
OSVersionOSVersion SRSOSLongVersionSRSOSLongVersion 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
昵稱Alias SRSAliasSRSAlias 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
DisplayNameDisplayName SRSDisplayNameSRSDisplayName 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
AppVersionAppVersion SRSAppVersionSRSAppVersion 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
IPv4AddressIPv4Address SRSIPv4AddressSRSIPv4Address 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
IPv6AddressIPv6Address SRSIPv6AddressSRSIPv6Address 20002000 |來源 = = "SRS-App" 和 EventID = = 2000 的事件Event | where Source == "SRS-App" and EventID == 2000
會議麥克風狀態Conference Microphone status SRSConfMicrophoneStatusSRSConfMicrophoneStatus 30013001 |來源 = = "SRS-App" 和 EventID = = 3001 的事件Event | where Source == "SRS-App" and EventID == 3001
會議演講者狀態Conference Speaker status SRSConfSpeakerStatusSRSConfSpeakerStatus 30013001 |來源 = = "SRS-App" 和 EventID = = 3001 的事件Event | where Source == "SRS-App" and EventID == 3001
預設演講者狀態Default Speaker status SRSDefaultSpeakerStatusSRSDefaultSpeakerStatus 30013001 |來源 = = "SRS-App" 和 EventID = = 3001 的事件Event | where Source == "SRS-App" and EventID == 3001
相機狀態Camera status SRSCameraStatusSRSCameraStatus 30013001 |來源 = = "SRS-App" 和 EventID = = 3001 的事件Event | where Source == "SRS-App" and EventID == 3001
房間顯示狀態的正面Front of Room Display status SRSFORDStatusSRSFORDStatus 30013001 |來源 = = "SRS-App" 和 EventID = = 3001 的事件Event | where Source == "SRS-App" and EventID == 3001
動作感應器狀態Motion Sensor status SRSMotionSensorStatusSRSMotionSensorStatus 30013001 |來源 = = "SRS-App" 和 EventID = = 3001 的事件Event | where Source == "SRS-App" and EventID == 3001
HDMI 攝取狀態HDMI Ingest status SRSHDMIIngestStatusSRSHDMIIngestStatus 30013001 |來源 = = "SRS-App" 和 EventID = = 3001 的事件Event | where Source == "SRS-App" and EventID == 3001

中定義 Microsoft Teams Rooms 視圖 Log AnalyticsDefine the Microsoft Teams Rooms views in Log Analytics

收集資料並對應自訂欄位之後,您可以使用 [視圖設計工具] 來開發包含各種磚的儀表板,以監視 Microsoft Teams Rooms 事件。After data is collected and custom fields are mapped, you can use View Designer to develop a dashboard containing various tiles to monitor Microsoft Teams Rooms events. 使用 [視圖設計工具] 建立下列磚。Use View Designer to create the following tiles. 如需詳細資訊,請參閱使用視圖設計 Log Analytics 工具建立自訂視圖For more information, see Create custom views by using View Designer in Log Analytics

注意

本指南中的上述步驟應該已完成,儀表板磚才能正常運作。Previous steps in this guide should have been completed for the dashboard tiles to work properly.

使用 import 方法建立 Microsoft 團隊聊天室儀表板Create a Microsoft Teams Rooms dashboard by using the import method

您可以匯入 Microsoft Teams Rooms 儀表板並快速開始監控您的裝置。You can import an Microsoft Teams Rooms dashboard and start monitoring your devices quickly. 請採取下列步驟匯入儀表板:Take the following steps to import the dashboard:

  1. 取得 SkypeRoomSystems_v2 的 omsview 儀表板檔案。Get the SkypeRoomSystems_v2.omsview dashboard file.
  2. 登入 Microsoft Azure 入口網站,然後前往 Log Analytics 並選取您的工作區。Sign in to the Microsoft Azure portal and go to Log Analytics and select your workspace.
  3. 開啟 [ 視圖設計 工具]。Open View Designer.
  4. 選取 [匯 ],然後選取 SkypeRoomSystems_v2 的 omsview 檔案。Select Import, and then select the SkypeRoomSystems_v2.omsview file.
  5. 選取 [ 儲存]。Select Save.

手動建立 Microsoft 團隊聊天室儀表板Create a Microsoft Teams Rooms dashboard manually

或者,您也可以建立自己的儀表板,然後只新增您想要監視的磚。Alternatively, you can create your own dashboard and add only the tiles that you wish to monitor.

設定 [概覽] 磚Configure the Overview Tile

  1. 開啟 [ 視圖設計 工具]。Open View Designer.
  2. 選取 [一覽磚],然後從圖庫中選取 兩個數字Select Overview Tile, and then select Two numbers from the gallery.
  3. 為磚命名 Microsoft Teams RoomsName the tile Microsoft Teams Rooms.
  4. 定義 第一個磚Define the First Tile:
    圖例: 在上個月內至少傳送過一次心跳的裝置Legend: Devices that sent a heartbeat at least once within the last month
    Query:Event | where EventLog == "Skype Room System" and TimeGenerated > ago(30d) | summarize TotalSRSDevices = dcount(Computer)Query: Event | where EventLog == "Skype Room System" and TimeGenerated > ago(30d) | summarize TotalSRSDevices = dcount(Computer)
  5. 定義 第二個磚Define the Second Tile:
    圖例: 在過去一個小時內傳送心跳的活動裝置Legend: Active devices that sent a heartbeat within the last hour
    Query:Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" and TimeGenerated > ago(1h) | summarize TotalSRSDevices = dcount(Computer)Query: Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" and TimeGenerated > ago(1h) | summarize TotalSRSDevices = dcount(Computer)
  6. 選取 [ 套用]。Select Apply.

建立顯示活動裝置的磚Create a tile that displays active devices

  1. 選取 [ 查看儀表板 ] 以開始新增您的磚。Select View Dashboard to start adding your tiles.
  2. 從圖庫選取 [編號] & 清單Select Number & list from the gallery
  3. 定義 一般 屬性:Define the General properties:
    [群組標題]: 心跳狀態Group Title: Heartbeat Status
    [新增] 群組: 選定New Group: Selected
  4. 定義 屬性:Define the Tile properties:
    圖例: 在過去20分鐘內傳送 (心跳的活動裝置) Legend: Active devices (heartbeat sent in the last 20 minutes)
    磚查詢:Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" and TimeGenerated > ago(20m) | summarize AggregatedValue = count() by Computer | countTile Query: Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" and TimeGenerated > ago(20m) | summarize AggregatedValue = count() by Computer | count
  5. 定義 清單 屬性:Define the List properties:
    清單查詢:Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" and TimeGenerated > ago(20m) | summarize TimeGenerated = max(TimeGenerated) by Computer | order by TimeGeneratedList Query: Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" and TimeGenerated > ago(20m) | summarize TimeGenerated = max(TimeGenerated) by Computer | order by TimeGenerated
  6. 定義 欄標題Define Column Titles:
    名稱: 電腦名稱稱Name: Computer Name
    值: 上次心跳Value: Last Heartbeat
  7. 定義 導覽查詢Define Navigation Query.
    search {selected item} | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize arg_max(TimeGenerated, *) by Computer | project TimeGenerated, Computer, SRSAlias_CF, SRSAppVersion_CF, SRSOSVersion_CF, SRSOSLongVersion_CF, SRSIPv4Address_CF, SRSIPv6Address_CF, SRSOperationName_CF, SRSOperationResult_CF, SRSResourceState_CF, SRSEventDescription_CF
  8. 選取 [ 套用],然後按一下 [ 關閉]。Select Apply, and then Close.

建立顯示有連線問題之裝置的磚Create a tile that displays devices that have connectivity issues

  1. 從圖庫選取 [ 編號 & 清單 ],然後新增新的磚。Select Number & list from the gallery, and then add a new tile.
  2. 定義 一般 屬性:Define the General properties:
    [群組標題]: 留空Group Title: Leave empty
    [新增] 群組: 未選取New Group: Not Selected
  3. 定義 屬性:Define the Tile properties:
    圖例: 非作用中的裝置 (最近20分鐘內傳送的心跳訊息) Legend: Inactive Devices (no heartbeat message sent in the last 20 minutes)
    磚查詢:Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize LastHB = max(TimeGenerated) by Computer | where LastHB < ago(20m) | countTile Query: Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize LastHB = max(TimeGenerated) by Computer | where LastHB < ago(20m) | count
  4. 定義 清單 屬性:Define the List properties:
    清單查詢:Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize TimeGenerated = max(TimeGenerated) by Computer | where TimeGenerated < ago(20m) | order by TimeGeneratedList Query: Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize TimeGenerated = max(TimeGenerated) by Computer | where TimeGenerated < ago(20m) | order by TimeGenerated
  5. 定義 欄標題Define Column Titles:
    名稱: 電腦名稱稱Name: Computer Name
    值: 上次心跳Value: Last Heartbeat
  6. 定義 導覽查詢Define Navigation Query:
    search {selected item} | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize arg_max(TimeGenerated, *) by Computer | project TimeGenerated, Computer, SRSAlias_CF, SRSAppVersion_CF, SRSOSVersion_CF, SRSOSLongVersion_CF, SRSIPv4Address_CF, SRSIPv6Address_CF, SRSOperationName_CF, SRSOperationResult_CF, SRSResourceState_CF, SRSEventDescription_CF
  7. 選取 [ 套用],然後按一下 [ 關閉]。Select Apply, and then Close.

建立顯示有硬體錯誤之裝置的磚Create a tile that displays devices that have a hardware error

  1. 從圖庫選取 [ 編號 & 清單 ],然後新增新的磚。Select Number & list from the gallery, and then add a new tile.
  2. 定義 一般 屬性:Define the General properties:
    [群組標題]: 硬體狀態Group Title: Hardware Status
    [新增] 群組: 選定New Group: Selected
  3. 定義 屬性:Define the Tile properties:
    圖例: 過去一個小時內遇到硬體錯誤的裝置Legend: Devices that experienced a hardware error in the last hour
    磚查詢:Event | where EventLog == "Skype Room System" and EventLevelName == "Error" and EventID == "3001" and TimeGenerated > ago(1h) | summarize AggregatedValue = count() by Computer | countTile Query: Event | where EventLog == "Skype Room System" and EventLevelName == "Error" and EventID == "3001" and TimeGenerated > ago(1h) | summarize AggregatedValue = count() by Computer | count
  4. 定義 清單 屬性:Define the List properties:
    清單查詢:Event | where EventLog == "Skype Room System" and EventLevelName == "Error" and EventID == "3001" and TimeGenerated > ago(1h) | summarize TimeGenerated = max(TimeGenerated) by Computer | order by TimeGeneratedList Query: Event | where EventLog == "Skype Room System" and EventLevelName == "Error" and EventID == "3001" and TimeGenerated > ago(1h) | summarize TimeGenerated = max(TimeGenerated) by Computer | order by TimeGenerated
  5. 定義 欄標題Define Column Titles:
    名稱: 電腦名稱稱Name: Computer Name
    值: 上一個錯誤Value: Last Error
  6. 定義 導覽查詢Define Navigation Query:
    search {selected item} | where EventLog == "Skype Room System" and EventID == 3001 and EventLevelName == "Error" | summarize arg_max(TimeGenerated, *) by Computer | project TimeGenerated, Computer, SRSAlias_CF, SRSAppVersion_CF, SRSOSVersion_CF, SRSOSLongVersion_CF, SRSIPv4Address_CF, SRSIPv6Address_CF, SRSOperationName_CF, SRSOperationResult_CF, SRSResourceState_CF, SRSConfMicrophoneStatus_CF, SRSConfSpeakerStatus_CF, SRSDefaultSpeakerStatus_CF, SRSCameraStatus_CF, SRSFORDStatus_CF, SRSMotionSensorStatus_CF, SRSHDMIIngestStatus_CF, SRSEventDescription_CF | sort by TimeGenerated desc
  7. 選取 [ 套用],然後按一下 [ 關閉]。Select Apply, and then Close.

建立顯示 Microsoft Teams Rooms 作業系統版本的磚Create a tile that displays Microsoft Teams Rooms Operating System versions

  1. 從圖庫中選取 [ 同心圓 & 清單 ],然後新增新的磚。Select Donut & list from the gallery, and then add a new tile.
  2. 定義 一般 屬性:Define the General properties:
    [群組標題]: 作業系統詳細資料Group Title: Operating System details
    [新增] 群組: 選定New Group: Selected
  3. 定義 標頭 屬性:Define the Header properties:
    標題: 作業系統版本Title: Operating System versions
    副標題: 運行特定作業系統版本的裝置Subtitle: Devices running specific OS versions
  4. 定義 同心圓 屬性:Define the Donut properties:
    Query:Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize OS_Version = max(SRSOSLongVersion_CF) by Computer | summarize AggregatedValue = count() by OS_Version | sort by OS_Version ascQuery: Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize OS_Version = max(SRSOSLongVersion_CF) by Computer | summarize AggregatedValue = count() by OS_Version | sort by OS_Version asc
    文字置中:Center Text: Devices
    操作: 總計Operation: Sum
  5. 定義 清單 屬性。Define the List properties.
    清單查詢:Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize SRSOSLongVersion_CF = max(SRSOSLongVersion_CF) by Computer | sort by Computer ascList Query: Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize SRSOSLongVersion_CF = max(SRSOSLongVersion_CF) by Computer | sort by Computer asc
    隱藏圖形: 選定Hide Graph: Selected
    啟用 走勢圖:未選取Enable Sparklines: Not selected
  6. 定義 欄標題Define Column Titles.
    名稱: 電腦名稱稱Name: Computer Name
    值: 留空Value: Leave Empty
  7. 定義 導覽查詢Define Navigation Query.
    search {selected item} | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize arg_max(TimeGenerated, *) by Computer | project TimeGenerated, Computer, SRSDisplayName_CF, SRSAlias_CF, SRSAppVersion_CF, SRSOSVersion_CF, SRSOSLongVersion_CF, SRSIPv4Address_CF, SRSIPv6Address_CF, SRSOperationName_CF, SRSOperationResult_CF, SRSResourceState_CF, SRSEventDescription_CF
  8. 選取 [套用] 然後按一下 [ 關閉]。Select Apply and then Close.

建立顯示 Microsoft Teams Rooms 應用程式版本的磚Create a tile that displays Microsoft Teams Rooms application versions

  1. 從圖庫中選取 [ 同心圓 & 清單 ],然後新增新的磚。Select Donut & list from the gallery, and then add a new tile.
  2. 定義 一般 屬性:Define the General properties:
    [群組標題]: Microsoft Teams Rooms應用程式詳細資料Group Title: Microsoft Teams Rooms application details
    [新增] 群組: 選定New Group: Selected
  3. 定義 標頭 屬性:Define the Header properties:
    標題: 應用程式版本Title: Application versions
    副標題: 運行特定應用程式版本的裝置Subtitle: Devices running specific application versions
  4. 定義 同心圓 屬性:Define the Donut properties:
    Query:Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize App_Version = max(SRSAppVersion_CF) by Computer | summarize AggregatedValue = count() by App_Version | sort by App_Version ascQuery: Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize App_Version = max(SRSAppVersion_CF) by Computer | summarize AggregatedValue = count() by App_Version | sort by App_Version asc
    文字置中:Center Text: Devices
    操作: 總計Operation: Sum
  5. 定義 清單 屬性。Define the List properties.
    清單查詢:Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize SRSAppVersion_CF = max(SRSAppVersion_CF) by Computer | sort by Computer ascList Query: Event | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize SRSAppVersion_CF = max(SRSAppVersion_CF) by Computer | sort by Computer asc
    隱藏圖形: 選定Hide Graph: Selected
    啟用 走勢圖:未選取Enable Sparklines: Not selected
  6. 定義 欄標題Define Column Titles.
    名稱: 電腦名稱稱Name: Computer Name
    值: 留空Value: Leave Empty
  7. 定義 導覽查詢Define Navigation Query.
    search {selected item} | where EventLog == "Skype Room System" and SRSOperationName_CF == "Heartbeat" | summarize arg_max(TimeGenerated, *) by Computer | project TimeGenerated, Computer, SRSAlias_CF, SRSAppVersion_CF, SRSOSVersion_CF, SRSOSLongVersion_CF, SRSIPv4Address_CF, SRSIPv6Address_CF, SRSOperationName_CF, SRSOperationResult_CF, SRSResourceState_CF, SRSEventDescription_CF
  8. 選取 [套用] 然後按一下 [ 關閉]。Select Apply and then Close.

建立顯示有應用程式錯誤之裝置的磚Create a tile that displays devices that have an application error

  1. 從圖庫選取 [ 編號 & 清單 ],然後新增新的磚。Select Number & list from the gallery, and then add a new tile.
  2. 定義 一般 屬性。Define the General properties.
    [群組標題]: 留空Group Title: Leave empty
    [新增] 群組: 未選取New Group: Not Selected
  3. 定義 屬性。Define the Tile properties.
    圖例: 過去一個小時內遇到應用程式錯誤的裝置Legend: Devices that experienced an application error in the last hour
    磚查詢:Event | where EventLog == "Skype Room System" and EventLevelName == "Error" and EventID == "2001" and TimeGenerated > ago(1h) | summarize AggregatedValue = count() by Computer | countTile Query: Event | where EventLog == "Skype Room System" and EventLevelName == "Error" and EventID == "2001" and TimeGenerated > ago(1h) | summarize AggregatedValue = count() by Computer | count
  4. 定義 清單 屬性。Define the List properties.
    清單查詢:Event | where EventLog == "Skype Room System" and EventLevelName == "Error" and EventID == "2001" and TimeGenerated > ago(1h) | summarize TimeGenerated = max(TimeGenerated) by Computer | order by TimeGeneratedList Query: Event | where EventLog == "Skype Room System" and EventLevelName == "Error" and EventID == "2001" and TimeGenerated > ago(1h) | summarize TimeGenerated = max(TimeGenerated) by Computer | order by TimeGenerated
  5. 定義 欄標題Define Column Titles.
    名稱: 電腦名稱稱Name: Computer Name
    值: 上一個錯誤Value: Last Error
  6. 定義 導覽查詢Define Navigation Query.
    search {selected item} | where EventLog == "Skype Room System" and EventID == 2001 and EventLevelName == "Error" | summarize arg_max(TimeGenerated, *) by Computer | project TimeGenerated, Computer, SRSAlias_CF, SRSAppVersion_CF, SRSOSVersion_CF, SRSOSLongVersion_CF, SRSIPv4Address_CF, SRSIPv6Address_CF, SRSOperationName_CF, SRSOperationResult_CF, SRSResourceState_CF, SRSEventDescription_CF | sort by TimeGenerated desc
  7. 選取 [套用] 然後按一下 [ 關閉]。Select Apply and then Close.

建立顯示已重新開機之裝置的磚Create a tile that displays devices that have been restarted

  1. 從圖庫選取 [ 編號 & 清單 ],然後新增新的磚。Select Number & list from the gallery, and then add a new tile.
  2. 定義 一般 屬性。Define the General properties.
    [群組標題]: 留空Group Title: Leave empty
    [新增] 群組: 未選取New Group: Not Selected
  3. 定義 屬性。Define the Tile properties.
    圖例: 在過去24小時內重新開機應用程式的裝置,以及重新開機的次數Legend: Devices where the application was restarted in the last 24 hours, and number of restarts
    磚查詢:Event | where EventLog == "Skype Room System" and EventID == "4000" and TimeGenerated > ago(24h) | summarize AggregatedValue = count() by Computer | countTile Query: Event | where EventLog == "Skype Room System" and EventID == "4000" and TimeGenerated > ago(24h) | summarize AggregatedValue = count() by Computer | count
  4. 定義 清單 屬性。Define the List properties.
    清單查詢:Event | where EventLog == "Skype Room System" and EventID == "4000" and TimeGenerated > ago(24h) | order by TimeGenerated | summarize AggregatedValue = count(EventID) by ComputerList Query: Event | where EventLog == "Skype Room System" and EventID == "4000" and TimeGenerated > ago(24h) | order by TimeGenerated | summarize AggregatedValue = count(EventID) by Computer
  5. 定義 欄標題Define Column Titles.
    名稱: 電腦名稱稱Name: Computer Name
    值: 重新開機次數Value: Number of Restarts
  6. 定義 導覽查詢Define Navigation Query.
    search {selected item} | where EventLog == "Skype Room System" and EventID == "4000" and TimeGenerated > ago(24h) | project TimeGenerated, Computer, SRSAlias_CF, SRSAppVersion_CF, SRSOSVersion_CF, SRSOSLongVersion_CF, SRSIPv4Address_CF, SRSIPv6Address_CF, SRSOperationName_CF, SRSOperationResult_CF, SRSResourceState_CF, SRSEventDescription_CF
  7. 選取 [套用] 然後按一下 [ 關閉]。Select Apply and then Close.
  8. 選取 [ 儲存 ] 以儲存您的儀表板。Select Save to save your dashboard.

現在您已經完成建立您的視圖了。Now you've completed creating your views.

中的 [設定警示] Azure MonitorConfigure Alerts in Azure Monitor

Azure Monitor 當主控台遇到問題時,可以提出通知來通知系統管理員 Microsoft Teams Rooms 。Azure Monitor can raise alerts to notify the administrators, when a Microsoft Teams Rooms console encounters an issue.

Azure Monitor 包含可透過定期時間間隔執行排程記錄搜尋的內建警示機制。Azure Monitor includes a built-in alerting mechanism that runs through scheduled log searches at regular intervals. 如果記錄搜尋的結果符合特定準則,就會建立警示記錄。If the results of the log search match some particular criteria, an alert record is created.

然後,規則會自動執行一或多個動作,主動通知您警報或喚醒呼叫另一個處理常式。The rule can then automatically run one or more actions to proactively notify you of the alert or invoke another process. 警報的可能選項如下:The possible options with alerts are:

  • 傳送電子郵件Sending an email
  • 透過 HTTP POST 要求喚醒操作外部程式Invoking an external process through an HTTP POST request
  • 在服務中啟動 runbook Azure AutomationStarting a runbook in Azure Automation service

請參閱中 Azure Monitor 的記錄警示,以深入瞭解中的警示 Azure Monitor 。See Log alerts in Azure Monitor to learn more about the alerts in Azure Monitor.

注意

下列範例會在 Microsoft Teams Rooms 裝置產生硬體或應用程式錯誤時,傳送電子郵件警示。The following examples send email alerts when a Microsoft Teams Rooms device generates a hardware or an application error.

針對硬體問題設定電子郵件通知 Microsoft Teams RoomsConfigure an email alert for Microsoft Teams Rooms hardware issues

設定警報規則,檢查 Microsoft Teams Rooms 在過去一個小時內遇到過硬體問題的裝置。Configure an alert rule that checks for Microsoft Teams Rooms devices that have encountered hardware issues within the last hour.

  1. 登入 Microsoft Azure 入口網站,然後前往 Log Analytics 並選取您的工作區。Sign in to the Microsoft Azure portal and go to Log Analytics and select your workspace.

  2. 流覽至您的 Log Analytics 工作區並選取 [通知],然後選取 [新增通知規則]。Navigate to your Log Analytics workspace and select Alerts and then select New alert rule

  3. 選取 [新增條件],然後選擇 [自訂記錄搜尋]。Select Add condition and then Custom log search

  4. 在 [搜尋查詢] 文字方塊中輸入下列查詢。Enter the following query to the Search query text box.

    Event
    | where EventLog == "Skype Room System" and EventLevelName == "Error" and EventID == "3001" and TimeGenerated > ago(1h)
    | summarize arg_max(TimeGenerated, *) by Computer
    | project TimeGenerated, Computer, SRSAlias_CF, SRSAppVersion_CF, SRSOSVersion_CF, SRSOSLongVersion_CF, SRSIPv4Address_CF, SRSIPv6Address_CF, SRSOperationName_CF, SRSOperationResult_CF, SRSResourceState_CF, SRSConfMicrophoneStatus_CF, SRSConfSpeakerStatus_CF, SRSDefaultSpeakerStatus_CF, SRSCameraStatus_CF, SRSFORDStatus_CF, SRSMotionSensorStatus_CF, SRSHDMIIngestStatus_CF, SRSEventDescription_CF
    |sort by TimeGenerated desc
    
  5. 設定警報邏輯設定:Configure the Alert logic settings:
    依據: 結果數Based on: Number of results
    條件: 較大的Condition: Greater then
    閾值: 0Threshold: 0

  6. 設定評估設定,然後選取 [ 完成]:Configure Evaluation settings and select Done:
    Period (分鐘) : 60Period (in minutes): 60
    Frequency (,以分鐘為單位) : 60Frequency (in minutes): 60

  7. 設定動作群組:Configure action groups:

    1. 選取 [建立新 的]Select Create New
    2. 針對 [ 動作組名稱 ] 和 [ 簡稱 ] 欄位提供適當的名稱。Provide suitable names for the Action group name and Short Name fields.
    3. 指定唯一的 動作名稱 ,然後選取 [ 電子郵件/SMS/推播/語音],然後選取 [ 編輯詳細資料]。Specify a unique Action Name and select Email/SMS/Push/Voice, and then select Edit details.
    4. 選取 [ 電子郵件 ] 核取方塊,並提供將接收通知之人員或群組的電子郵件地址。Select the Email checkbox and provide the email address of the person or group that will receive the alerts.
    5. 您也可以提供您的電話號碼,以取得 SMS、語音通話或兩者的通知。You may also provide your phone number to get notified with SMS, a voice call or both.
    6. 選取 [確定]Select OK.
  8. 如果您想要覆蓋提醒電子郵件的主旨行,請 自訂 [動作]。Customize Actions if you like to override the subject line of the alert emails.

  9. 指定 [規則名稱] 和 [描述]。Specify a rule name and description.
    規則名稱: Microsoft Teams Rooms 硬體失敗警示Rule Name: Microsoft Teams Rooms Hardware Failure Alert
    描述: 過去一個小時內遇到硬體問題的裝置清單Description: List of devices that encountered a hardware issue within the last hour

  10. 選取預期的嚴重性,並確認已啟用規則。Select the intended severity and make sure the rule is enabled.

  11. 選取 [ 建立警示規則]。Select Create alert rule.

針對應用程式問題設定電子郵件通知 Microsoft Teams RoomsConfigure an email alert for Microsoft Teams Rooms application issues

重複相同的程式,但使用下列查詢來列出在過去一個小時內遇到應用程式問題的裝置。Repeat the same procedure but use the following query to list devices that have encountered application issues within the last hour.

```
Event
| where EventLog == "Skype Room System" and EventLevelName == "Error" and EventID == "2001" and TimeGenerated > ago(1h)
| summarize arg_max(TimeGenerated, *) by Computer
| project TimeGenerated, Computer, SRSAlias_CF, SRSAppVersion_CF, SRSOSVersion_CF, SRSOSLongVersion_CF, SRSIPv4Address_CF, SRSIPv6Address_CF, SRSOperationName_CF, SRSOperationResult_CF, SRSResourceState_CF, SRSEventDescription_CF
| sort by TimeGenerated desc
```

您現在已完成定義通知。Now you've completed defining alerts. 您可以使用上述範例來定義其他警示。You can define additional alerts by using the examples above.

產生預警時,您會收到一封電子郵件,其中列出在過去一個小時內遇到問題的裝置。When an alert is generated, you'll get an email that lists the devices that encountered an issue within the last hour.

![示範 Azure Monitor 通知電子郵件] (。/media/Deploy-Azure-Monitor-6.png 「 Azure Monitor 通知電子郵件的範例」 ) ![Sample Azure Monitor alert email](../media/Deploy-Azure-Monitor-6.png "Sample Azure Monitor alert email")

設定所有裝置 Azure MonitoringConfigure all devices for Azure Monitoring

在儀表板和通知設定之後,您可以 Microsoft Monitoring 在所有裝置上設定和設定代理程式, Microsoft Teams Rooms 以完成您的監視部署。 After the dashboards and alerts are configured, you can set up and configure Microsoft Monitoring agent on all Microsoft Teams Rooms devices to complete your monitoring deployment.

雖然您可以 Microsoft Monitoring 在每個裝置上手動安裝及設定代理,但我們強烈建議您利用現有的軟體部署工具和方法。Although you can install and configure the Microsoft Monitoring agent manually on each device, we highly recommend you leverage existing software deployment tools and methods.

如果您是 Microsoft Teams Rooms 第一次建立裝置,您可能會想要在 Microsoft Monitoring 組建程式中包含代理設定和設定步驟。If you're building your Microsoft Teams Rooms devices for the first time, you might want to include the Microsoft Monitoring agent setup and configuration steps as part of your build process. 如需詳細資訊,請參閱 使用命令列安裝代理程式For more information, see Install the agent using the command line.

Microsoft Monitoring使用群組原則物件 (GPO) 部署代理程式Deploying Microsoft Monitoring agent by using a Group Policy Object (GPO)

如果您在 Microsoft Teams Rooms 實施前已部署裝置 Azure Monitoring ,您可以使用提供的腳本來設定和設定代理程式,方法是使用 Active Directory 群組原則物件。If you already deployed your Microsoft Teams Rooms devices before you implement Azure Monitoring, you can use the provided script to set up and configure the agents by using Active Directory group policy objects.

  1. 建立共用的網路路徑,並授予 [ 網域電腦 ] 群組的 [讀取存取權]。Create a shared network path and grant read access to Domain Computers group.

  2. 下載64位版本的 Microsoft Monitoring 代理程式, Windows 從 https://go.microsoft.com/fwlink/?LinkID=517476Download the 64-bit version of the Microsoft Monitoring Agent for Windows from https://go.microsoft.com/fwlink/?LinkID=517476

  3. 將安裝套件的內容解壓縮至網路共用。Extract the contents of the setup package into the network share.

    1. 開啟命令提示字元視窗,然後執行 MMASetup-AMD64.exe/cOpen a Command Prompt window, and then execute MMASetup-AMD64.exe /c
    2. 指定您剛建立的共用,並解壓縮內容。Specify the share you just created, and extract the content.
  4. 建立新的群組原則物件,然後將它指派給 Microsoft Teams Rooms 電腦帳戶所在的組織單位。Create a new Group Policy Object and assign it to the organizational unit where Microsoft Teams Rooms machine accounts are located.

  5. 設定 PowerShell 執行原則:Configure PowerShell execution policy:

    1. 編輯新建立的 [群組原則] 物件,然後流覽至 [電腦設定 \ 原則] \ 管理範本 \ Windows 元件 \Windows PowerShellEdit the newly created Group Policy Object and navigate to Computer Configuration \ Policies \ Administrative Templates \ Windows Components \ Windows PowerShell
    2. 啟用 [ 開啟腳本執行 ],並將 執行原則 設定為 [ 允許本機腳本]。Enable the Turn on Script Execution and set Execution Policy to Allow Local Scripts.
  6. 設定啟動腳本:Configure the startup script:

    1. 複製下列腳本並將其儲存為 Install-MMAgent.ps1。Copy the following script and save it as Install-MMAgent.ps1.
    2. 修改 WorkspaceId、WorkspaceKey 和 SetupPath 參數,以符合您的配置。Modify WorkspaceId, WorkspaceKey, and SetupPath parameters to match your configuration.
    3. 編輯相同的群組原則物件,然後流覽至 [電腦 \ 設定原則] \ Windows 設定 \ 腳本 (啟動/關閉) Edit the same Group Policy Object and navigate to Computer Configuration \ Policies \ Windows Settings \ Scripts (Startup/Shutdown)
    4. 按兩下以選取 [ 啟動],然後選取 [ PowerShell 腳本]。Double-click to select Startup, and then select PowerShell Scripts.
    5. 選取 [ 顯示 檔案],然後將 Install-MMAgent.ps1 檔案複製到該資料夾。Select Show Files, and then copy the Install-MMAgent.ps1 file to that folder.
    6. 選取 [ 新增],然後按一下 [流覽]Select Add, and then Browse.
    7. 選取您剛才複製的 ps1 腳本。Select the ps1 script you just copied.
  7. Microsoft Teams Rooms 裝置應該 Microsoft Monitoring 在第二次重新開機時安裝並設定代理程式。Microsoft Teams Rooms devices should install and configure the Microsoft Monitoring agent with the second reboot.

# Install-MMAgent.ps1
<#
Date:        04/20/2018
Script:      Install-MMAgent.ps1
Version:     1.0
#>

# Set the parameters
$WorkspaceId = "<your workspace id>"
$WorkspaceKey = "<your workspace key>"
$SetupPath = "\\Server\Share"

$SetupParameters = "/qn NOAPM=1 ADD_OPINSIGHTS_WORKSPACE=1 OPINSIGHTS_WORKSPACE_AZURE_CLOUD_TYPE=0 OPINSIGHTS_WORKSPACE_ID=$WorkspaceId OPINSIGHTS_WORKSPACE_KEY=$WorkspaceKey AcceptEndUserLicenseAgreement=1"

# $SetupParameters = $SetupParameters + " OPINSIGHTS_PROXY_URL=<Proxy server URL> OPINSIGHTS_PROXY_USERNAME=<Proxy server username> OPINSIGHTS_PROXY_PASSWORD=<Proxy server password>"

# Start PowerShell logging
Start-Transcript -Path C:\Temp\MMA-Install.Log

# Check if the Microsoft Monitoring Agent is installed
$mma = New-Object -ComObject 'AgentConfigManager.MgmtSvcCfg'

# Check if the Microsoft Monitoring agent is installed
if (!$mma)
{
    #Install agent
    Start-Process -FilePath "$SetupPath\Setup.exe" -ArgumentList $SetupParameters -ErrorAction Stop -Wait
}

# Check if the agent has a valid configuration
$CheckMMA = $mma.GetCloudWorkspace($WorkspaceId).AgentId
if (!$CheckMMA)
{
    # Apply new configuration
    $mma.AddCloudWorkspace($WorkspaceId, $WorkspaceKey)
    $mma.ReloadConfiguration()
}

Stop-Transcript

注意

您可以參閱 管理與維護 Log Analytics 代理程式 的文章,當您需要重新設定代理程式、將其移到不同的工作區,或在初始安裝之後修改 proxy 設定。You can refer to the article Managing and maintaining the Log Analytics agent when you need to reconfigure an agent, move it to a different workspace, or modify proxy settings after the initial installation.

其他解決方案Additional Solutions

Azure Monitor 透過其 方案庫 提供內建管理解決方案,進一步協助您監控您的環境。Azure Monitor provides built-in management solutions through its solution gallery to further help you monitor your environment. 我們強烈建議您同時在工作區中新增警報管理 Azure Log Analytics 代理程式健康方案。We highly recommend that you add Alert Management and Azure Log Analytics Agent Health solutions to your workspace as well.

注意

Agent 健康方案可協助您找出您的環境中過時或損毀的 Microsoft Monitoring 代理程式,且通知管理解決方案會提供在指定期間內所產生之警報的詳細資料。The Agent Health solution can help you identify outdated or broken Microsoft Monitoring agents within your environment, and the Alert Management solution provides details about the alerts that have been raised within a given period.

另請參閱See also

規劃 Microsoft Teams Rooms 管理 Azure MonitorPlan Microsoft Teams Rooms management with Azure Monitor

管理 Microsoft Teams Rooms 裝置 Azure MonitorManage Microsoft Teams Rooms devices with Azure Monitor