檢視並列出資料庫日誌檔案 - Amazon Aurora

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

檢視並列出資料庫日誌檔案

您可使用 AWS Management Console 來檢視 Amazon Aurora DB 引擎的資料庫日誌檔案。您可以使用 AWS CLI 或 Amazon RDS API 來列出可用於下載或監控的記錄檔案。

注意

您無法在 RDS 主控台中檢視 Aurora Serverless v1 資料庫叢集的日誌檔。然而,您可以在 https://console.aws.amazon.com/cloudwatch/ 的 Amazon CloudWatch 主控台進行檢視。

檢視資料庫日誌檔案
  1. 前往 https://console.aws.amazon.com/rds/,開啟 Amazon RDS 主控台。

  2. 在導覽窗格中,選擇 Databases (資料庫)

  3. 選擇您想檢視的日誌檔案所在的資料庫執行個體的名稱。

  4. 選擇 Logs & events (日誌與事件) 標籤。

  5. 向下捲動至 Logs (日誌) 區段。

  6. (選用) 輸入搜尋詞來篩選結果。

    下列範例列出由文字 error 篩選的日誌。

    列出資料庫日誌
  7. 選擇您想要檢視的日誌,然後選擇 View (檢視)

若要檢視資料庫執行個體的可用執行個體日誌檔案,請使用 AWS CLI describe-db-log-files 命令。

下列範例會回傳名為 my-db-instance 的資料庫執行個體之日誌檔案列表。

範例
aws rds describe-db-log-files --db-instance-identifier my-db-instance

若要列出資料庫執行個體的可用資料庫日誌檔案,請使用 Amazon RDS API DescribeDBLogFiles 動作。