本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
從 CloudWatch 主控台安裝、設定及管理應用程式以進行監控
本節提供安裝、設定和管理應用程式以從 CloudWatch 主控台進行監控的步驟。
新增並設定應用程式
從 CloudWatch 主控台新增和設定應用程式
若要從 CloudWatch 主控台開始使用 CloudWatch Application Insights,請遵循以下步驟。
-
啟動。開啟 CloudWatch 主控台登陸頁面
。從左側導覽窗格中,選擇 Insights 下的 Application Insights。開啟的頁面會顯示 CloudWatch Application Insights 監控的應用程式清單,以及它們的監控狀態。 -
新增應用程式。若要設定應用程式的監控,請選擇 Add an application (新增應用程式)。當您選擇 Add an application (新增應用程式) 時,系統會提示您 Choose Application Type (選擇應用程式類型)。
-
以資源群組為基礎的應用程式。選取此選項時,您可以選擇此帳戶中要監控的資源群組。若要在元件上使用多個應用程式,您必須使用資源群組型監控。
-
以帳戶為基礎的應用程式。選取此選項時,您可以監控此帳戶中的所有資源。如果您想要監控帳戶中的所有資源,建議使用此選項,而不是以資源群組為基礎的選項,因為應用程式上架程序會更快。
注意
您無法使用 Application Insights,將以資源群組為基礎的監控與以帳戶為基礎的監控結合。若要變更應用程式類型,您必須刪除所有受監控的應用程式,並 Choose Application Type (選擇應用程式類型)。
當您新增第一個應用程式進行監控時,CloudWatch Application Insights 會在您的帳戶中建立服務連結角色,以授予 Application Insights 代表您呼叫其他 AWS 服務的許可。如需 Application Insights 在您帳戶中所建服務連結角色的詳細資訊,請參閱 針對 CloudWatch Application Insights 使用服務連結角色。
-
-
-
在您提交應用程式監控組態之後,您會來到應用程式的詳細資訊頁面,您可以在此檢視 Application summary (應用程式摘要)、Monitored components (受監控元件) 清單和 Unmonitored components (未受監控元件),以及透過選取 Components (元件)、Configuration history (組態歷史記錄)、Log patterns (日誌模式) 和任何已套用 Tags (標籤) 旁的索引標籤檢視。
若要檢視應用程式的洞察,請選擇 View Insights (檢視洞察)。
您可以選擇編輯,以更新 CloudWatch Events 監控和與 AWS Systems Manager OpsCenter 整合的選擇。
在 Components (元件) 下,您可以選取 Actions (動作) 選單建立、修改或解除執行個體群組。
您可以管理元件的監控,包括應用程式層、日誌群組、事件日誌、指標和自訂警示,方法是選取元件旁的項目符號並選擇 Manage monitoring (管理監控)。
啟用 Application Insights 進行 Amazon ECS 和 Amazon EKS 資源監控
您可以從 Container Insights 主控台啟用 Application Insights 以監控容器化應用程式和微型服務。Application Insights 支援監控下列資源:
-
Amazon ECS 叢集
-
Amazon ECS 服務
-
Amazon ECS 任務
-
Amazon EKS 叢集
啟用 Application Insights 後,它會提供建議的指標和日誌、偵測潛在問題、產生 CloudWatch Events,以及為您的容器化應用程式和微型服務建立自動儀表板。
您可以從 Container Insights 或 Application Insights 主控台為容器化資源啟用 Application Insights。
從 Container Insights 主控台啟用 Application Insights
從 Container Insights 主控台的 Container Insights Performance monitoring (效能監控) 儀表板,選擇 Auto-configure Application Insights (自動設定 Application Insights)。啟用 Application Insights 時,會顯示偵測到問題的詳細資訊。
從 Application Insights 主控台啟用 Application Insights
當 ECS 叢集出現在元件清單中時,Application Insights 會自動啟用具有 Container Insights 的其他容器監控。
對於 EKS 叢集,您可以啟用具有 Container Insights 的其他監控,以提供診斷資訊,例如容器重新啟動故障,協助您隔離和解決問題。設定 EKS 的 Container Insights 需要其他步驟。如需相關資訊,請參閱設定 EKS 上 Container Insights 的 在 Amazon EKS 和 Kubernetes 上設定 Container Insights 步驟。
使用 EKS 的 Linux 執行個體支援對具有 Container Insights 的 EKS 進行額外監控。
如需 ECS 和 EKS 叢集 Container Insights 支援的詳細資訊,請參閱 Container Insights。
停用應用程式元件的監控
若要停用應用程式元件的監控,請從應用程式詳細資訊頁面選取您要停用監控的元件。選擇 Actions (動作),然後 Remove from monitoring (從監控移除)。
刪除應用程式
若要偵測應用程式,請從 CloudWatch 儀表板的左側導覽窗格,選擇 Insights 下的 Application Insights。選取您要刪除的應用程式。在 Actions (動作) 下,選擇 Delete application (刪除應用程式)。這會刪除監控並刪除所有已儲存的應用程式元件監控。不會刪除應用程式資源。