本文說明可用來監控 Managed Spark 叢集和工作健康狀態與效能的工具和技術。
開放原始碼網頁介面
許多 Managed Service for Apache Spark 叢集開放原始碼元件 (例如 Apache Hadoop 和 Apache Spark) 都提供網頁介面。這些介面可用於監控叢集資源和工作效能。舉例來說,您可以使用 YARN Resource Manager UI,查看 Managed Service for Apache Spark 叢集上的 YARN 應用程式資源分配情形。
永久記錄伺服器
叢集執行時,叢集上執行的開放原始碼網頁介面會處於可用狀態,但刪除叢集時,這些介面會終止。如要在叢集刪除後查看叢集和工作資料,可以建立永久記錄伺服器 (PHS)。
範例:您遇到工作錯誤或速度變慢,想要分析原因。停止或刪除工作叢集,然後使用 PHS 查看及分析工作歷來資料。
建立 PHS 後,您可以在建立叢集或提交批次工作負載時,在 Managed Service for Apache Spark 叢集或 Managed Service for Apache Spark 批次工作負載上啟用 PHS。PHS 可存取在多個叢集上執行的工作歷來資料,讓您監控專案中的工作,而不必監控在不同叢集上執行的個別 UI。
Managed Service for Apache Spark 記錄
Managed Service for Apache Spark 會收集 Apache Hadoop、Spark、Hive、ZooKeeper 和其他在叢集上執行的開放原始碼系統產生的記錄,並傳送至 Logging。這些記錄會依據來源分組,方便您選取及查看感興趣的記錄,例如叢集產生的 YARN NodeManager 和 Spark Executor 記錄會分別加上標籤。如要進一步瞭解 Managed Service for Apache Spark 記錄內容和選項,請參閱「Managed Service for Apache Spark 記錄」。
Cloud Logging
Logging 是全代管的即時記錄管理系統,這項服務可儲存從 Cloud de Confiance 服務擷取的記錄,並提供工具,可大規模搜尋、篩選及分析記錄。Managed Service for Apache Spark 叢集會產生多種記錄,包括 Managed Service for Apache Spark 服務代理記錄、叢集啟動記錄,以及 OSS 元件記錄 (例如 YARN NodeManager 記錄)。
根據預設,Managed Service for Apache Spark 叢集和 Managed Service for Apache Spark 批次工作負載會啟用記錄功能。記錄會定期匯出至 Logging,並在叢集刪除或工作負載完成後保留。
Managed Service for Apache Spark 指標
Managed Service for Apache Spark 叢集和工作指標:前置字串為 dataproc.googleapis.com/,由時間序列資料組成,可提供叢集效能的深入分析,例如 CPU 使用率或工作狀態。Managed Service for Apache Spark 自訂指標的前置字串為 custom.googleapis.com/,包含在叢集上執行的開放原始碼系統所發出的指標,例如 YARN running applications 指標。深入瞭解 Managed Service for Apache Spark 指標,有助於有效率地設定叢集。設定指標型快訊,有助於快速辨識及因應問題。
系統預設會收集 Managed Service for Apache Spark 叢集和工作指標,不收取任何費用。收集自訂指標會向客戶收費。您可以在建立叢集時啟用自訂指標收集功能。根據預設,Spark 批次工作負載會啟用 Managed Service for Apache Spark Spark 指標收集功能。
Cloud Monitoring
Monitoring 會使用叢集中繼資料和指標 (包括 HDFS、YARN、工作和作業指標),讓您瞭解 Managed Service for Apache Spark 叢集和工作的健康狀態、效能和可用性。您可以使用 Monitoring 探索指標、新增圖表、建立資訊主頁和快訊。
Metrics Explorer
您可以使用 Metrics Explorer 查看 Managed Service for Apache Spark 指標。Managed Service for Apache Spark 叢集、工作和 Managed Service for Apache Spark 批次指標會列在 Cloud Managed Service for Apache Spark Cluster、Cloud
Managed Service for Apache Spark Job 和 Cloud Managed Service for Apache Spark
Batch 資源下方。Managed Service for Apache Spark 自訂指標會列在 VM Instances 資源的 Custom 類別下方。
圖表
您可以使用 Metrics Explorer 建立圖表,以視覺化方式呈現 Managed Service for Apache Spark 指標。
範例:您建立圖表來查看叢集上執行的活躍 Yarn 應用程式數量,然後新增篩選器,依叢集名稱或區域選取視覺化指標。
資訊主頁
您可以建構資訊主頁,使用多個專案和不同 Cloud de Confiance 產品的指標,監控 Managed Service for Apache Spark 叢集和工作。您可以在 Cloud de Confiance 控制台的「Dashboards Overview」(資訊主頁總覽) 頁面中,點選、建立並儲存「Metrics Explorer」頁面中的圖表,藉此建立資訊主頁。
快訊
您可以建立 Managed Service for Apache Spark 指標警告,及時收到叢集或工作問題的通知。