

 **協助改進此頁面** 

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

若要為本使用者指南貢獻內容，請點選每個頁面右側面板中的**在 GitHub 上編輯此頁面**連結。

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

# 藉助 Prometheus 監控叢集指標
<a name="prometheus"></a>

 [Prometheus](https://prometheus.io/) 是湊集端點的監控和時間序列資料庫。它提供查詢、彙總和儲存收集之資料的能力。您也可以將其用於警示和警示彙總。本主題說明如何將 Prometheus 設定為受管或開放原始碼選項。監控 Amazon EKS 控制平面指標是常見的使用案例。

Amazon Managed Service for Prometheus 是與 Prometheus 相容的監控和提示服務，可讓您輕鬆地大規模監控容器化應用程式和基礎設施。這是一項全受管服務，既可自動擴展指標的擷取、儲存、查詢和提醒，也可以與 AWS 安全服務整合，以便快速且安全地存取資料。您可以使用開放原始碼 PromQL 查詢語言來查詢指標並根據指標發出提醒。此外，您還可藉助 Amazon Managed Service for Prometheus 中的提醒管理員，為關鍵提醒設定提醒規則。您隨後可將這些關鍵提醒作為通知傳送至 Amazon SNS 主題。

提供了多種不同的選項來將 Prometheus 與 Amazon EKS 配合使用：
+ 您可在首次建立 Amazon EKS 叢集時，開啟 Prometheus 指標，或者針對現有的叢集建立自己的 Prometheus 湊集器。本主題將介紹這兩個選項。
+ 您可使用 Helm 來部署 Prometheus。如需詳細資訊，請參閱 [使用 Helm 部署 Prometheus](deploy-prometheus.md)。
+ 您能夠以 Prometheus 格式來檢視控制平面原始指標。如需詳細資訊，請參閱 [擷取採用 Prometheus 格式的控制平面原始指標](view-raw-metrics.md)。

## 步驟 1：開啟 Prometheus 指標
<a name="turn-on-prometheus-metrics"></a>

**重要**  
叢集生命週期不包括適用於 Prometheus 的 Amazon Managed Service 資源，需要獨立於叢集進行維護。刪除叢集後，確認亦同時刪除任何適用的湊集器，以免產生適用的費用。如需詳細資訊，請參閱 *Amazon Managed Service for Prometheus 使用者指南*中的[尋找及刪除湊集器](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#AMP-collector-list-delete)。

Prometheus 透過稱為湊集的提取型模式，從您的叢集中探索並收集指標。湊集器的設定是為了從您的叢集基礎設施和容器化應用程式收集資料。當您開啟傳送 Prometheus 指標的選項時，Amazon Managed Service for Prometheus 會提供完全受管的無代理程式湊集器。

若尚未建立叢集，您可在首次建立叢集時，開啟將指標傳送至 Prometheus 的選項。在 Amazon EKS 主控台中，此選項位於建立新叢集的**設定可觀測性步驟**中。如需詳細資訊，請參閱 [建立 Amazon EKS 叢集](create-cluster.md)。

若目前已有叢集，您可建立自己的 Prometheus 湊集器。如需在 Amazon EKS 主控台執行此動作，導覽至叢集的**可觀測性**索引標籤，然後選擇**新增湊集器**按鈕。若您想透過 AWS API 或 AWS CLI 執行此動作，請參閱*適用於 Prometheus 的 Amazon Managed Service 使用者指南*中的[建立湊集器](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#AMP-collector-create)。

透過 Amazon EKS 主控台建立湊集器時，以下選項可供使用。

 **湊集器別名**   
(選用) 輸入湊集器的唯一別名。

 **目的地**   
選擇 Amazon Managed Service for Prometheus 工作區。工作區是專門用於儲存和查詢 Prometheus 指標的邏輯空間。使用此工作區，您能夠跨具有該工作區存取權的帳戶檢視 Prometheus 指標。**建立新工作區**選項會讓 Amazon EKS 知道可以使用您提供的**工作區別名**來代表您建立工作區。使用**選取現有工作區**選項，您可以從下拉式清單中選取現有的工作區。如需工作區的詳細資訊，請參閱《*Amazon Managed Service for Prometheus 使用者指南*》中的[管理工作區](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-manage-ingest-query.html)。

 **服務存取**   
本節總結您在傳送 Prometheus 指標時授予的許可：  
+ 允許 Amazon Managed Service for Prometheus 描述湊集的 Amazon EKS 叢集
+ 允許遠端寫入 Amazon 受管 Prometheus 工作區
如果 `AmazonManagedScraperRole` 已經存在，則湊集器會使用它。選擇 `AmazonManagedScraperRole` 連結以查看**許可詳細資訊**。如果 `AmazonManagedScraperRole` 尚未存在，請選擇**檢視許可詳細資訊**連結，以查看您透過傳送 Prometheus 指標來授予的特定許可。

 **子網路**   
修改湊集器會視需繼承的子網路。若您需要新增呈現灰色的子網路選項，請返回建立叢集**指定聯網**步驟。

 **湊集器組態**   
視需要修改 YAML 格式的湊集器組態。若要執行這項操作，請使用表單或上傳取代 YAML 檔案。如需詳細資訊，請參閱《*Amazon Managed Service for Prometheus 使用者指南*》中的[湊集器組態](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#AMP-collector-configuration)。

Amazon Managed Service for Prometheus 是指作為 AWS 受管收集器與叢集一起建立的無代理程式湊集器。若要了解 AWS 受管收集器的相關詳細資訊，請參閱*適用於 Prometheus 的 Amazon Managed Service 使用者指南*中的[透過 AWS 受管收集器來擷取指標](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector.html)。

**重要**  
若使用 AWS CLI 或 AWS API 建立 Prometheus 湊集器，需要調整其組態，以授予湊集器叢集內許可。如需詳細資訊，請參閱《*Amazon Managed Service for Prometheus 使用者指南*》中的[設定 Amazon EKS 叢集](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#AMP-collector-eks-setup)。
若在 2024 年 11 月 11 日之前建立 Prometheus 湊集器，且使用 `aws-auth` `ConfigMap` 而非存取項目，您需要進行更新，才可透過 Amazon EKS 叢集控制平面來存取額外的指標。若要了解更新的組態，請參閱*適用於 Prometheus 的 Amazon Managed Service 使用者指南*中的[手動設定 Amazon EKS 的湊集器存取權](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#AMP-collector-eks-manual-setup)。

## 步驟 2：使用 Prometheus 指標
<a name="use-prometheus-metrics"></a>

若要了解如何在為叢集開啟 Prometheus 指標後使用該指標的相關詳細資訊，請參閱[適用於 Prometheus 的 Amazon Managed Service 使用者指南](https://docs.aws.amazon.com/prometheus/latest/userguide/what-is-Amazon-Managed-Service-Prometheus.html)。

## 步驟 3：管理 Prometheus 湊集器
<a name="viewing-prometheus-scraper-details"></a>

如需管理湊集器，在 Amazon EKS 主控台中，選擇**可觀測性**索引標籤。表格會顯示叢集的湊集器清單，包含湊集器 ID、別名、狀態和建立日期等資訊。您可新增更多湊集器、編輯湊集器、刪除湊集器，或者檢視目前湊集器的相關詳細資訊。

如需檢視湊集器的相關詳細資訊，請選擇湊集器 ID 連結。舉例來說，您可檢視 ARN、環境、工作區 ID、IAM 角色、組態，以及聯網資訊。您可使用湊集器 ID 作為輸入到 Amazon Managed Service for Prometheus API 操作 (例如 [https://docs.aws.amazon.com/prometheus/latest/APIReference/API_DescribeScraper.html](https://docs.aws.amazon.com/prometheus/latest/APIReference/API_DescribeScraper.html)、[https://docs.aws.amazon.com/prometheus/latest/APIReference/API_UpdateScraper.html](https://docs.aws.amazon.com/prometheus/latest/APIReference/API_UpdateScraper.html) 及 [https://docs.aws.amazon.com/prometheus/latest/APIReference/API_DeleteScraper.html](https://docs.aws.amazon.com/prometheus/latest/APIReference/API_DeleteScraper.html))。若要了解使用 Prometheus API 的相關詳細資訊，請參閱[適用於 Prometheus 的 Amazon Managed Service API 參考](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-APIReference.html)。

# 使用 Helm 部署 Prometheus
<a name="deploy-prometheus"></a>

作為使用 Amazon Managed Service for Prometheus 的替代方案，您可以使用 Helm 將 Prometheus 部署到您的叢集中。如果您已經安裝了 Helm，可以使用 `helm version` 命令檢查您的版本。Helm 是 Kubernetes 叢集的套件管理工具。如需有關 Helm 及如何安裝它的詳細資訊，請參閱 [在 Amazon EKS 上，使用 Helm 部署應用程式](helm.md)。

在您為 Amazon EKS 叢集設定 Helm 之後，即可用它來依照下列步驟部署 Prometheus。

1. 建立 Prometheus 命名空間。

   ```
   kubectl create namespace prometheus
   ```

1. 新增 `prometheus-community` 圖表儲存庫。

   ```
   helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
   ```

1. 部署 Prometheus。

   ```
   helm upgrade -i prometheus prometheus-community/prometheus \
       --namespace prometheus \
       --set alertmanager.persistence.storageClass="gp2" \
       --set server.persistentVolume.storageClass="gp2"
   ```
**注意**  
如果執行此命令時收到錯誤 `Error: failed to download "stable/prometheus" (hint: running helm repo update may help)`，請執行 `helm repo update prometheus-community`，然後嘗試再次執行步驟 2 命令。

   如果收到錯誤 `Error: rendered manifests contain a resource that already exists`，請執行 `helm uninstall your-release-name -n namespace `，然後嘗試再次執行步驟 3 命令。

1. 確認 `prometheus` 命名空間中的所有裝置皆處於 `READY` 狀態。

   ```
   kubectl get pods -n prometheus
   ```

   範例輸出如下。

   ```
   NAME                                             READY   STATUS    RESTARTS   AGE
   prometheus-alertmanager-59b4c8c744-r7bgp         1/2     Running   0          48s
   prometheus-kube-state-metrics-7cfd87cf99-jkz2f   1/1     Running   0          48s
   prometheus-node-exporter-jcjqz                   1/1     Running   0          48s
   prometheus-node-exporter-jxv2h                   1/1     Running   0          48s
   prometheus-node-exporter-vbdks                   1/1     Running   0          48s
   prometheus-pushgateway-76c444b68c-82tnw          1/1     Running   0          48s
   prometheus-server-775957f748-mmht9               1/2     Running   0          48s
   ```

1. 使用 `kubectl` 將 Prometheus 主控台的連接埠轉送到本機機器。

   ```
   kubectl --namespace=prometheus port-forward deploy/prometheus-server 9090
   ```

1. 將 Web 瀏覽器連接至 `http://localhost:9090` 以檢視 Prometheus 主控台。

1. 從 – **insert metric at cursor (- 在游標處插入指標)** 功能表中選擇一個指標，然後選擇 **Execute (執行)**。選擇 **Graph (圖表)** 標籤以顯示一段時間內的指標。下圖顯示一段時間內的 `container_memory_usage_bytes`。  
![\[Prometheus 指標\]](http://docs.aws.amazon.com/zh_tw/eks/latest/userguide/images/prometheus-metric.png)

1. 選擇頂部導覽列中的 **Status (狀態)**，然後選擇 **Targets (目標)**。  
![\[Prometheus 主控台\]](http://docs.aws.amazon.com/zh_tw/eks/latest/userguide/images/prometheus.png)

   將會顯示使用服務探索連接至 Prometheus 的所有 Kubernetes 端點。

# 擷取採用 Prometheus 格式的控制平面原始指標
<a name="view-raw-metrics"></a>

Kubernetes 控制平面公開眾多採用 [Prometheus 格式](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md)的指標。這些指標對於監視和分析非常有用。透過指標端點在內部公開這些指標，並且可在完全不部署 Prometheus 的情況下存取。然而，部署 Prometheus 可更輕鬆地分析一段時間內的指標。

如需檢視原始指標輸出，可取代 `endpoint`，然後執行以下命令。

```
kubectl get --raw endpoint
```

此命令可讓您傳遞任何端點路徑並傳回原始回應。輸出會逐行列示不同的指標，每一行都包括指標名稱、標籤和值。

```
metric_name{tag="value"[,...]} value
```

## 透過 API 伺服器擷取指標
<a name="fetch-metrics"></a>

一般 API 伺服器端點在 Amazon EKS 控制平面公開。此端點主要在查看特定指標時有用。

```
kubectl get --raw /metrics
```

範例輸出如下。

```
[...]
# HELP rest_client_requests_total Number of HTTP requests, partitioned by status code, method, and host.
# TYPE rest_client_requests_total counter
rest_client_requests_total{code="200",host="127.0.0.1:21362",method="POST"} 4994
rest_client_requests_total{code="200",host="127.0.0.1:443",method="DELETE"} 1
rest_client_requests_total{code="200",host="127.0.0.1:443",method="GET"} 1.326086e+06
rest_client_requests_total{code="200",host="127.0.0.1:443",method="PUT"} 862173
rest_client_requests_total{code="404",host="127.0.0.1:443",method="GET"} 2
rest_client_requests_total{code="409",host="127.0.0.1:443",method="POST"} 3
rest_client_requests_total{code="409",host="127.0.0.1:443",method="PUT"} 8
# HELP ssh_tunnel_open_count Counter of ssh tunnel total open attempts
# TYPE ssh_tunnel_open_count counter
ssh_tunnel_open_count 0
# HELP ssh_tunnel_open_fail_count Counter of ssh tunnel failed open attempts
# TYPE ssh_tunnel_open_fail_count counter
ssh_tunnel_open_fail_count 0
```

此原始輸出會逐字傳回 API 伺服器公開的內容。

## 透過 `metrics.eks.amazonaws.com` 擷取控制平面指標
<a name="fetch-metrics-prometheus"></a>

若是 Kubernetes `1.28` 版及更新版本的叢集，Amazon EKS 亦會在 API 群組 `metrics.eks.amazonaws.com` 項下公開指標。這些指標包括 `kube-scheduler` 及 `kube-controller-manager` 等控制平面元件。

**注意**  
若您的 Webhook 組態可能會阻止在叢集上建立新的 `APIService` 資源 `v1.metrics.eks.amazonaws.com`，則可能無法使用指標端點功能。您可藉由搜尋 `v1.metrics.eks.amazonaws.com` 關鍵字，在 `kube-apiserver` 稽核日誌中進行確認。

### 擷取 `kube-scheduler` 指標
<a name="fetch-metrics-scheduler"></a>

如需擷取 `kube-scheduler` 指標，請使用以下命令。

```
kubectl get --raw "/apis/metrics.eks.amazonaws.com/v1/ksh/container/metrics"
```

範例輸出如下。

```
# TYPE scheduler_pending_pods gauge
scheduler_pending_pods{queue="active"} 0
scheduler_pending_pods{queue="backoff"} 0
scheduler_pending_pods{queue="gated"} 0
scheduler_pending_pods{queue="unschedulable"} 18
# HELP scheduler_pod_scheduling_attempts [STABLE] Number of attempts to successfully schedule a pod.
# TYPE scheduler_pod_scheduling_attempts histogram
scheduler_pod_scheduling_attempts_bucket{le="1"} 79
scheduler_pod_scheduling_attempts_bucket{le="2"} 79
scheduler_pod_scheduling_attempts_bucket{le="4"} 79
scheduler_pod_scheduling_attempts_bucket{le="8"} 79
scheduler_pod_scheduling_attempts_bucket{le="16"} 79
scheduler_pod_scheduling_attempts_bucket{le="+Inf"} 81
[...]
```

### 擷取 `kube-controller-manager` 指標
<a name="fetch-metrics-controller"></a>

如需擷取 `kube-controller-manager` 指標，請使用以下命令。

```
kubectl get --raw "/apis/metrics.eks.amazonaws.com/v1/kcm/container/metrics"
```

範例輸出如下。

```
[...]
workqueue_work_duration_seconds_sum{name="pvprotection"} 0
workqueue_work_duration_seconds_count{name="pvprotection"} 0
workqueue_work_duration_seconds_bucket{name="replicaset",le="1e-08"} 0
workqueue_work_duration_seconds_bucket{name="replicaset",le="1e-07"} 0
workqueue_work_duration_seconds_bucket{name="replicaset",le="1e-06"} 0
workqueue_work_duration_seconds_bucket{name="replicaset",le="9.999999999999999e-06"} 0
workqueue_work_duration_seconds_bucket{name="replicaset",le="9.999999999999999e-05"} 19
workqueue_work_duration_seconds_bucket{name="replicaset",le="0.001"} 109
workqueue_work_duration_seconds_bucket{name="replicaset",le="0.01"} 139
workqueue_work_duration_seconds_bucket{name="replicaset",le="0.1"} 181
workqueue_work_duration_seconds_bucket{name="replicaset",le="1"} 191
workqueue_work_duration_seconds_bucket{name="replicaset",le="10"} 191
workqueue_work_duration_seconds_bucket{name="replicaset",le="+Inf"} 191
workqueue_work_duration_seconds_sum{name="replicaset"} 4.265655885000002
[...]
```

### 了解排程器與控制器管理員指標
<a name="scheduler-controller-metrics"></a>

下面的資料表列示了可用於 Prometheus 樣式湊集的排程器與控制器管理員指標。若要了解這些指標的相關詳細資訊，請參閱 Kubernetes 文件中的 [Kubernetes 指標參考](https://kubernetes.io/docs/reference/instrumentation/metrics/)。


| 指標 | 控制平面元件 | 描述 | 
| --- | --- | --- | 
|  scheduler\$1pending\$1pods  |  排程器  |  等候排程到節點上執行的 Pod 數目。  | 
|  scheduler\$1schedule\$1attempts\$1total  |  排程器  |  排程 Pod 的嘗試次數。  | 
|  scheduler\$1preemption\$1attempts\$1total  |  排程器  |  排程器藉由移出較低優先級 Pod 以排程較高優先級 Pod 的嘗試次數。  | 
|  scheduler\$1preemption\$1victims  |  排程器  |  已經選取要移出，以便為較高優先級 Pod 騰出空間的 Pod 數目。  | 
|  scheduler\$1pod\$1scheduling\$1attempts  |  排程器  |  已成功排程 Pod 的嘗試次數。  | 
|  scheduler\$1scheduling\$1attempt\$1duration\$1seconds  |  排程器  |  指示排程器能夠依據資源可用性及排程規則等各種因素，尋找執行 Pod 的適當位置的速度快慢程度。  | 
|  scheduler\$1pod\$1scheduling\$1sli\$1duration\$1seconds  |  排程器  |  自 Pod 進入排程佇列開始，正在排程的 Pod 的端對端延遲。這可能會涉及多次排程嘗試。  | 
|  cronjob\$1controller\$1job\$1creation\$1skew\$1duration\$1seconds  |  控制器管理員  |  排程執行 cronjob 的時間，及建立相應任務的時間。  | 
|  workqueue\$1depth  |  控制器管理員  |  佇列目前的深度。  | 
|  workqueue\$1adds\$1total  |  控制器管理員  |  工作佇列處理的新增項目總數。  | 
|  workqueue\$1queue\$1duration\$1seconds  |  控制器管理員  |  發出請求之前，項目保持在工作佇列的時間 (秒)。  | 
|  workqueue\$1work\$1duration\$1seconds  |  控制器管理員  |  處理工作佇列中的項目所需的時間 (秒)。  | 

## 部署 Prometheus 湊集器以持續湊集指標
<a name="deploy-prometheus-scraper"></a>

若要部署 Prometheus 湊集器以持續湊集指標，請使用下列組態：

```
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus-conf
data:
  prometheus.yml: |-
    global:
      scrape_interval: 30s
    scrape_configs:
    # apiserver metrics
    - job_name: apiserver-metrics
      kubernetes_sd_configs:
      - role: endpoints
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        insecure_skip_verify: true
      bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      relabel_configs:
      - source_labels:
          [
            __meta_kubernetes_namespace,
            __meta_kubernetes_service_name,
            __meta_kubernetes_endpoint_port_name,
          ]
        action: keep
        regex: default;kubernetes;https
    # Scheduler metrics
    - job_name: 'ksh-metrics'
      kubernetes_sd_configs:
      - role: endpoints
      metrics_path: /apis/metrics.eks.amazonaws.com/v1/ksh/container/metrics
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        insecure_skip_verify: true
      bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      relabel_configs:
      - source_labels:
          [
            __meta_kubernetes_namespace,
            __meta_kubernetes_service_name,
            __meta_kubernetes_endpoint_port_name,
          ]
        action: keep
        regex: default;kubernetes;https
    # Controller Manager metrics
    - job_name: 'kcm-metrics'
      kubernetes_sd_configs:
      - role: endpoints
      metrics_path: /apis/metrics.eks.amazonaws.com/v1/kcm/container/metrics
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        insecure_skip_verify: true
      bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      relabel_configs:
      - source_labels:
          [
            __meta_kubernetes_namespace,
            __meta_kubernetes_service_name,
            __meta_kubernetes_endpoint_port_name,
          ]
        action: keep
        regex: default;kubernetes;https
---
apiVersion: v1
kind: Pod
metadata:
  name: prom-pod
spec:
  containers:
  - name: prom-container
    image: prom/prometheus
    ports:
    - containerPort: 9090
    volumeMounts:
    - name: config-volume
      mountPath: /etc/prometheus/
  volumes:
  - name: config-volume
    configMap:
      name: prometheus-conf
```

Pod 存取全新的指標端點需要下列許可。

```
{
  "effect": "allow",
  "apiGroups": [
    "metrics.eks.amazonaws.com"
  ],
  "resources": [
    "kcm/metrics",
    "ksh/metrics"
  ],
  "verbs": [
    "get"
  ] },
```

若要修補使用的角色，您可使用以下命令。

```
kubectl patch clusterrole <role-name> --type=json -p='[
  {
    "op": "add",
    "path": "/rules/-",
    "value": {
      "verbs": ["get"],
      "apiGroups": ["metrics.eks.amazonaws.com"],
      "resources": ["kcm/metrics", "ksh/metrics"]
    }
  }
]'
```

然後，您可用 Prometheus 湊集器的連接埠代理本機連接埠，以檢視 Prometheus 儀表板。

```
kubectl port-forward pods/prom-pod 9090:9090
```

若是 Amazon EKS 叢集，核心 Kubernetes 控制平面指標亦可擷取到 `AWS/EKS` 命名空間項下的 Amazon CloudWatch 指標。如需檢視這些指標，開啟 [CloudWatch 主控台](https://console.aws.amazon.com/cloudwatch/home#logs:prefix=/aws/eks)，然後從左側導覽窗格中選取**全部指標**。在**指標**選取頁面上，選擇叢集的 `AWS/EKS` 命名空間與指標維度。