

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

# 設定 Amazon MSK 的受管 Prometheus 收集器
<a name="prom-msk-integration"></a>

若要使用 Amazon Managed Service for Prometheus 收集器，您可以建立抓取器，在 Amazon Managed Streaming for Apache Kafka 叢集中探索和提取指標。您也可以建立與 Amazon Elastic Kubernetes Service 整合的抓取器。如需詳細資訊，請參閱[整合 Amazon EKS](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html)。

## 建立湊集器
<a name="prom-msk-create-scraper"></a>

Amazon Managed Service for Prometheus 收集器包含一個抓取器，可從 Amazon MSK 叢集探索和收集指標。Amazon Managed Service for Prometheus 可為您管理湊集器，提供所需的可擴展性、安全性和可靠性，而無需自行管理任何執行個體、代理程式或湊集器。

您可以使用 AWS API 或 建立抓取器 AWS CLI ，如下列程序所述。

您需先滿足幾項先決條件，才能建立自己的湊集器：
+ 您必須建立 Amazon MSK 叢集。
+ 設定 Amazon MSK 叢集的安全群組，以允許 Amazon VPC 內連接埠 **11001 (JMX Exporter)** 和 **11002 (Node Exporter)** 的傳入流量，因為抓取器需要存取這些 DNS 記錄才能收集 Prometheus 指標。
+ Amazon MSK 叢集所在的 Amazon VPC 必須[啟用 DNS](https://docs.aws.amazon.com/vpc/latest/userguide/AmazonDNS-concepts.html)。

**注意**  
叢集會依其 Amazon 資源名稱 (ARN) 與抓取器建立關聯。如果您刪除叢集，然後使用相同名稱建立新的叢集，則 ARN 將重複使用於新叢集。因此，抓取器會嘗試收集新叢集的指標。[您可以將抓取器](#prom-msk-delete-scraper)與刪除叢集分開刪除。

------
#### [ To create a scraper using the AWS API ]

使用 `CreateScraper` API 操作來建立具有 AWS API 的抓取器。下列範例在美國東部 （維吉尼亞北部） 區域建立抓取器。將*範例*內容取代為您的 Amazon MSK 叢集資訊，並提供您的抓取器組態。

**注意**  
設定安全群組和子網路以符合您的目標叢集。在兩個可用區域中包含至少兩個子網路。

```
                POST /scrapers HTTP/1.1
Content-Length: 415 
Authorization: AUTHPARAMS
X-Amz-Date: 20201201T193725Z
User-Agent: aws-cli/1.18.147 Python/2.7.18 Linux/5.4.58-37.125.amzn2int.x86_64 botocore/1.18.6

{
    "alias": "myScraper",
    "destination":  {
        "ampConfiguration": {
            "workspaceArn": "arn:aws:aps:us-east-1:123456789012:workspace/ws-workspace-id"
        }
    },
    "source": {
        "vpcConfiguration": {
            "securityGroupIds": ["sg-security-group-id"],
            "subnetIds": ["subnet-subnet-id-1", "subnet-subnet-id-2"]
        }
    },
    "scrapeConfiguration": {
        "configurationBlob": base64-encoded-blob
    }
}
```

在此範例中， `scrapeConfiguration` 參數需要 base64 編碼的 Prometheus 組態 YAML 檔案，指定 MSK 叢集的 DNS 記錄。

每個 DNS 記錄代表特定可用區域中的中介裝置端點，可讓用戶端連線到分散在所選AZs中介裝置，以獲得高可用性。

MSK 叢集屬性中的 DNS 記錄數目對應至叢集組態中的代理程式節點和可用區域數目：
+ **預設組態** – 3 個 AZs的 3 個代理節點 = 3 個 DNS 記錄
+ **自訂組態** – 2 個 AZs的 2 個代理節點 = 2 個 DNS 記錄

若要取得 MSK 叢集的 DNS 記錄，請開啟 MSK 主控台，網址為 https：//[https://console.aws.amazon.com/msk/home?region=us-east-1\$1/home/](https://console.aws.amazon.com/msk/home?region=us-east-1#/home/)。前往 MSK 叢集。選擇**屬性**、**中介裝置**和**端點**。

您有兩個設定 Prometheus 以從 MSK 叢集抓取指標的選項：

1. **叢集層級 DNS 解析 （建議）** – 使用叢集的基本 DNS 名稱自動探索所有代理程式。如果您的中介裝置端點是 `b-1.clusterName.xxx.xxx.xxx`，請使用 `clusterName.xxx.xxx.xxx`做為 DNS 記錄。這可讓 Prometheus 自動抓取叢集中的所有代理程式。

   **個別代理程式端點** – 個別指定每個代理程式端點以進行精細控制。在組態中使用完整的代理程式識別符 (b-1、b-2)。例如：

   ```
   dns_sd_configs:
     - names:
       - b-1.clusterName.xxx.xxx.xxx
       - b-2.clusterName.xxx.xxx.xxx  
       - b-3.clusterName.xxx.xxx.xxx
   ```

**注意**  
從 AWS 主控台將 取代`clusterName.xxx.xxx.xxx`為您實際的 MSK 叢集端點。

如需詳細資訊，請參閱 *Prometheus* 文件中的 [<dns\$1sd\$1config>](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config)。

以下是抓取器組態檔案的範例：

```
global:
  scrape_interval: 30s
  external_labels:
    clusterArn: msk-test-1

scrape_configs:
  - job_name: msk-jmx
    scheme: http
    metrics_path: /metrics
    scrape_timeout: 10s
    dns_sd_configs:
      - names:
          - dns-record-1
          - dns-record-2
          - dns-record-3
        type: A
        port: 11001
    relabel_configs:
      - source_labels: [__meta_dns_name]
        target_label: broker_dns
      - source_labels: [__address__]
        target_label: instance
        regex: '(.*)'
        replacement: '${1}'

  - job_name: msk-node
    scheme: http
    metrics_path: /metrics
    scrape_timeout: 10s
    dns_sd_configs:
      - names:
          - dns-record-1
          - dns-record-2
          - dns-record-3
        type: A
        port: 11002
    relabel_configs:
      - source_labels: [__meta_dns_name]
        target_label: broker_dns
      - source_labels: [__address__]
        target_label: instance
        regex: '(.*)'
        replacement: '${1}'
```

執行下列其中一個命令，將 YAML 檔案轉換為 base64。您也可以使用任何線上 base64 轉換器來轉換檔案。

**Example Linux/macOS**  

```
echo -n scraper config updated with dns records | base64 
```

**Example Windows PowerShell**  

```
[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(scraper config updated with dns records))
```

------
#### [ To create a scraper using the AWS CLI ]

使用 `create-scraper`命令來使用 建立抓取器 AWS Command Line Interface。下列範例在美國東部 （維吉尼亞北部） 區域建立抓取器。將*範例*內容取代為您的 Amazon MSK 叢集資訊，並提供您的抓取器組態。

**注意**  
設定安全群組和子網路以符合您的目標叢集。在兩個可用區域中包含至少兩個子網路。

```
aws amp create-scraper \
 --source vpcConfiguration="{securityGroupIds=['sg-security-group-id'],subnetIds=['subnet-subnet-id-1', 'subnet-subnet-id-2']}" \ 
--scrape-configuration configurationBlob=base64-encoded-blob \
 --destination ampConfiguration="{workspaceArn='arn:aws:aps:us-west-2:123456789012:workspace/ws-workspace-id'}"
```

------
+ 以下是您可以搭配 AWS API 使用的湊集器操作完整清單：

  使用 [CreateScraper](https://docs.aws.amazon.com/prometheus/latest/APIReference/API_CreateScraper.html) API 操作建立抓取器。
+ 使用 [ListScrapers](https://docs.aws.amazon.com/prometheus/latest/APIReference/API_ListScrapers.html) API 操作列出現有的抓取器。
+ 使用 [UpdateScraper](https://docs.aws.amazon.com/prometheus/latest/APIReference/API_UpdateScraper.html) API 操作更新抓取器的別名、組態或目的地。
+ 使用 [DeleteScraper](https://docs.aws.amazon.com/prometheus/latest/APIReference/API_DeleteScraper.html) API 操作刪除抓取器。
+ 使用 [DescribeScraper](https://docs.aws.amazon.com/prometheus/latest/APIReference/API_DescribeScraper.html) API 操作取得有關抓取器的詳細資訊。

## 跨帳戶設定
<a name="prom-msk-cross-account"></a>

若要在您要收集指標的 Amazon MSK 叢集位於與 Amazon Managed Service for Prometheus 收集器不同的帳戶中時，在跨帳戶設定中建立抓取器，請使用下列程序。

例如，當您有兩個帳戶時，Amazon MSK `account_id_source` 所在的第一個來源帳戶，以及 `account_id_target` Amazon Managed Service for Prometheus 工作區所在的第二個目標帳戶。

**在跨帳戶設定中建立抓取器**

1. 在來源帳戶中，建立角色`arn:aws:iam::111122223333:role/Source`並新增下列信任政策。

   ```
   {
       "Effect": "Allow",
       "Principal": {
       "Service": [
           "scraper.aps.amazonaws.com"
        ]
       },
       "Action": "sts:AssumeRole",
       "Condition": {
           "ArnEquals": {
               "aws:SourceArn": "arn:aws:aps:aws-region:111122223333:scraper/scraper-id"
           },
           "StringEquals": {
               "AWS:SourceAccount": "111122223333"
           }
       }
   }
   ```

1. 在來源 (Amazon MSK 叢集） 和目標 (Amazon Managed Service for Prometheus 工作區） 的每個組合上，您需要建立角色，`arn:aws:iam::444455556666:role/Target`並新增具有 [AmazonPrometheusRemoteWriteAccess](https://docs.aws.amazon.com/prometheus/latest/userguide/security-iam-awsmanpol.html) 許可的下列信任政策。

   ```
   {
     "Effect": "Allow",
     "Principal": {
        "AWS": "arn:aws:iam::111122223333:role/Source"
     },
     "Action": "sts:AssumeRole",
     "Condition": {
        "StringEquals": {
           "sts:ExternalId": "arn:aws:aps:aws-region:111122223333:scraper/scraper-id"
         }
     }
   }
   ```

1. 使用 `--role-configuration`選項建立抓取器。

   ```
   aws amp create-scraper \ --source vpcConfiguration="{subnetIds=[subnet-subnet-id], "securityGroupIds": ["sg-security-group-id"]}" \ --scrape-configuration configurationBlob=<base64-encoded-blob> \ --destination ampConfiguration="{workspaceArn='arn:aws:aps:aws-region:444455556666:workspace/ws-workspace-id'}"\ --role-configuration '{"sourceRoleArn":"arn:aws:iam::111122223333:role/Source", "targetRoleArn":"arn:aws:iam::444455556666:role/Target"}'
   ```

1. 驗證抓取器建立。

   ```
   aws amp list-scrapers
   {
       "scrapers": [
           {
               "scraperId": "s-example123456789abcdef0",
               "arn": "arn:aws:aps:aws-region:111122223333:scraper/s-example123456789abcdef0": "arn:aws:iam::111122223333:role/Source",
               "status": "ACTIVE",
               "creationTime": "2025-10-27T18:45:00.000Z",
               "lastModificationTime": "2025-10-27T18:50:00.000Z",
               "tags": {},
               "statusReason": "Scraper is running successfully",
               "source": {
                   "vpcConfiguration": {
                       "subnetIds": ["subnet-subnet-id"],
                       "securityGroupIds": ["sg-security-group-id"]
                   }
               },
               "destination": {
                   "ampConfiguration": {
                       "workspaceArn": "arn:aws:aps:aws-region:444455556666:workspace/ws-workspace-id'"
                   }
               },
               "scrapeConfiguration": {
                   "configurationBlob": "<base64-encoded-blob>"
               }
           }
       ]
   }
   ```

## 在 RoleConfiguration 和服務連結角色之間變更
<a name="prom-msk-changing-roles"></a>

當您想要切換回服務連結角色，而不是 `RoleConfiguration`寫入 Amazon Managed Service for Prometheus 工作區時，您必須更新 ，`UpdateScraper`並在與抓取器相同的帳戶中提供工作區，而不需要 `RoleConfiguration`。`RoleConfiguration` 會從抓取器中移除 ，並使用服務連結角色。

當您變更與抓取器相同帳戶中的工作區，並且想要繼續使用 時`RoleConfiguration`，您必須再次`RoleConfiguration`在 上提供 `UpdateScraper`。

## 尋找並刪除湊集器
<a name="prom-msk-delete-scraper"></a>

您可以使用 AWS API 或 AWS CLI 列出您帳戶中的抓取器或刪除它們。

**注意**  
請確定您使用的是最新版本的 AWS CLI 或 SDK。最新版本提供最新的功能和功能，以及安全性更新。或者，使用 [AWS CloudShell](https://docs.aws.amazon.com/cloudshell/latest/userguide/welcome.html)，它會自動提供up-to-date命令列體驗。

若要列出您帳戶中的所有抓取器，請使用 [ListScrapers](https://docs.aws.amazon.com/prometheus/latest/APIReference/API_ListScrapers.html) API 操作。

或者，使用 AWS CLI呼叫：

```
aws amp list-scrapers
```

`ListScrapers` 會傳回您帳戶中的所有湊集器，例如：

```
{
    "scrapers": [
        {
            "scraperId": "s-1234abcd-56ef-7890-abcd-1234ef567890",
            "arn": "arn:aws:aps:aws-region:123456789012:scraper/s-1234abcd-56ef-7890-abcd-1234ef567890",
            "roleArn": "arn:aws:iam::123456789012:role/aws-service-role/AWSServiceRoleForAmazonPrometheusScraper_1234abcd-2931",
            "status": {
                "statusCode": "DELETING"
            },
            "createdAt": "2023-10-12T15:22:19.014000-07:00",
            "lastModifiedAt": "2023-10-12T15:55:43.487000-07:00",
            "tags": {},
            "source": {
                "vpcConfiguration": {
                   "securityGroupIds": [
                        "sg-1234abcd5678ef90"
                    ],
                    "subnetIds": [
                        "subnet-abcd1234ef567890", 
                        "subnet-1234abcd5678ab90"
                    ]
                }
            },
            "destination": {
                "ampConfiguration": {
                    "workspaceArn": "arn:aws:aps:aws-region:123456789012:workspace/ws-1234abcd-5678-ef90-ab12-cdef3456a78"
                }
            }
        }
    ]
}
```

若要刪除抓取器，請使用 `ListScrapers`操作尋找您要刪除之抓取器`scraperId`的 ，然後使用 [DeleteScraper](https://docs.aws.amazon.com/prometheus/latest/APIReference/API_DeleteScraper.html) 操作將其刪除。

或者，使用 AWS CLI呼叫：

```
aws amp delete-scraper --scraper-id scraperId
```

## 從 Amazon MSK 收集的指標
<a name="prom-msk-metrics"></a>

當您與 Amazon MSK 整合時，Amazon Managed Service for Prometheus 收集器會自動抓取下列指標：

### 指標：jmx\$1exporter 和 pod\$1exporter 任務
<a name="broker-metrics"></a>


| 指標 | 描述/目的 | 
| --- | --- | 
|  jmx\$1config\$1reload\$1failure\$1total  |  JMX 匯出工具無法重新載入其組態檔案的總次數。  | 
|  jmx\$1scrape\$1duration\$1seconds  |  目前收集週期的抓取 JMX 指標所花費的時間，以秒為單位。  | 
|  jmx\$1scrape\$1error  |  指出在 JMX 指標抓取期間是否發生錯誤 (1 = 錯誤，0 = 成功）。  | 
|  java\$1lang\$1Memory\$1HeapMemoryUsage\$1used  |  JVM 目前使用的堆積記憶體數量 （以位元組為單位）。  | 
|  java\$1lang\$1Memory\$1HeapMemoryUsage\$1max  |  可用於記憶體管理的堆積記憶體數量上限 （以位元組為單位）。  | 
|  java\$1lang\$1Memory\$1NonHeapMemoryUsage\$1used  |  JVM 目前使用的非堆積記憶體數量 （以位元組為單位）。  | 
|  kafka\$1cluster\$1Partition\$1Value  |  與 Kafka 叢集分割區相關的目前狀態或值，依分割區 ID 和主題細分。  | 
|  kafka\$1consumer\$1consumer\$1coordinator\$1metrics\$1assigned\$1partitions  |  目前指派給此取用者的分割區數量。  | 
|  kafka\$1consumer\$1consumer\$1coordinator\$1metrics\$1commit\$1latency\$1avg  |  遞交偏移所需的平均時間，以毫秒為單位。  | 
|  kafka\$1consumer\$1consumer\$1coordinator\$1metrics\$1commit\$1rate  |  每秒偏移遞交的數量。  | 
|  kafka\$1consumer\$1consumer\$1coordinator\$1metrics\$1failed\$1rebalance\$1total  |  失敗的取用者群組重新平衡總數。  | 
|  kafka\$1consumer\$1consumer\$1coordinator\$1metrics\$1last\$1heartbeat\$1seconds\$1ago  |  自上次將活動訊號傳送至協調器以來的秒數。  | 
|  kafka\$1consumer\$1consumer\$1coordinator\$1metrics\$1rebalance\$1latency\$1avg  |  取用者群組重新平衡的平均時間，以毫秒為單位。  | 
|  kafka\$1consumer\$1consumer\$1coordinator\$1metrics\$1rebalance\$1total  |  取用者群組重新平衡的總數。  | 
|  kafka\$1consumer\$1consumer\$1fetch\$1manager\$1metrics\$1bytes\$1consumed\$1rate  |  消費者每秒耗用的平均位元組數。  | 
|  kafka\$1consumer\$1consumer\$1fetch\$1manager\$1metrics\$1fetch\$1latency\$1avg  |  擷取請求所需的平均時間，以毫秒為單位。  | 
|  kafka\$1consumer\$1consumer\$1fetch\$1manager\$1metrics\$1fetch\$1rate  |  每秒擷取請求的數量。  | 
|  kafka\$1consumer\$1consumer\$1fetch\$1manager\$1metrics\$1records\$1consumed\$1rate  |  每秒耗用的平均記錄數。  | 
|  kafka\$1consumer\$1consumer\$1fetch\$1manager\$1metrics\$1records\$1lag\$1max  |  此取用者中任何分割區的記錄數量的最大延遲。  | 
|  kafka\$1consumer\$1consumer\$1metrics\$1connection\$1count  |  目前作用中連線的數量。  | 
|  kafka\$1consumer\$1consumer\$1metrics\$1incoming\$1byte\$1rate  |  每秒從所有伺服器接收的平均位元組數。  | 
|  kafka\$1consumer\$1consumer\$1metrics\$1last\$1poll\$1seconds\$1ago  |  自上次消費者輪詢 () 呼叫以來的秒數。  | 
|  kafka\$1consumer\$1consumer\$1metrics\$1request\$1rate  |  每秒傳送的請求數。  | 
|  kafka\$1consumer\$1consumer\$1metrics\$1response\$1rate  |  每秒收到的回應數。  | 
|  kafka\$1consumer\$1group\$1ConsumerLagMetrics\$1Value  |  取用者群組的目前取用者延遲值，指出取用者落後多遠。  | 
|  kafka\$1controller\$1KafkaController\$1Value  |  Kafka 控制器的目前狀態或值 (1 = 作用中控制器，0 = 非作用中）。  | 
|  kafka\$1controller\$1ControllerEventManager\$1Count  |  處理的控制器事件總數。  | 
|  kafka\$1controller\$1ControllerEventManager\$1Mean  |  處理控制器事件所需的平均 （平均） 時間。  | 
|  kafka\$1controller\$1ControllerStats\$1MeanRate  |  每秒控制器統計資料操作的平均速率。  | 
|  kafka\$1coordinator\$1group\$1GroupMetadataManager\$1Value  |  取用者群組之群組中繼資料管理員的目前狀態或值。  | 
|  kafka\$1log\$1LogFlushStats\$1Count  |  日誌排清操作的總數。  | 
|  kafka\$1log\$1LogFlushStats\$1Mean  |  日誌排清操作的平均 （平均） 時間。  | 
|  kafka\$1log\$1LogFlushStats\$1MeanRate  |  每秒日誌排清操作的平均速率。  | 
|  kafka\$1network\$1RequestMetrics\$1Count  |  已處理的網路請求總數。  | 
|  kafka\$1network\$1RequestMetrics\$1Mean  |  處理網路請求所需的平均 （平均） 時間。  | 
|  kafka\$1network\$1RequestMetrics\$1MeanRate  |  每秒網路請求的平均速率。  | 
|  kafka\$1network\$1Acceptor\$1MeanRate  |  每秒可接受連線的平均速率。  | 
|  kafka\$1server\$1Fetch\$1queue\$1size  |  擷取請求佇列的目前大小。  | 
|  kafka\$1server\$1Produce\$1queue\$1size  |  生產請求佇列的目前大小。  | 
|  kafka\$1server\$1Request\$1queue\$1size  |  一般請求佇列的目前大小。  | 
|  kafka\$1server\$1BrokerTopicMetrics\$1Count  |  中介裝置主題操作的總數 （訊息輸入/輸出、位元組輸入/輸出）。  | 
|  kafka\$1server\$1BrokerTopicMetrics\$1MeanRate  |  每秒中介裝置主題操作的平均速率。  | 
|  kafka\$1server\$1BrokerTopicMetrics\$1OneMinuteRate  |  中介裝置主題操作的一分鐘移動平均速率。  | 
|  kafka\$1server\$1DelayedOperationPurgatory\$1Value  |  查詢中的目前延遲操作數量 （等待完成）。  | 
|  kafka\$1server\$1DelayedFetchMetrics\$1MeanRate  |  每秒延遲擷取操作的平均速率。  | 
|  kafka\$1server\$1FetcherLagMetrics\$1Value  |  複本擷取器執行緒的目前延遲值 （落後領導者多遠）。  | 
|  kafka\$1server\$1FetcherStats\$1MeanRate  |  每秒擷取器操作的平均速率。  | 
|  kafka\$1server\$1ReplicaManager\$1Value  |  複本管理員的目前狀態或值。  | 
|  kafka\$1server\$1ReplicaManager\$1MeanRate  |  每秒複本管理員操作的平均速率。  | 
|  kafka\$1server\$1LeaderReplication\$1byte\$1rate  |  對於此代理程式為領導者的分割區，每秒複寫的位元組速率。  | 
|  kafka\$1server\$1group\$1coordinator\$1metrics\$1group\$1completed\$1rebalance\$1count  |  已完成取用者群組重新平衡的總數。  | 
|  kafka\$1server\$1group\$1coordinator\$1metrics\$1offset\$1commit\$1count  |  偏移遞交操作的總數。  | 
|  kafka\$1server\$1group\$1coordinator\$1metrics\$1offset\$1commit\$1rate  |  每秒偏移遞交操作的速率。  | 
|  kafka\$1server\$1socket\$1server\$1metrics\$1connection\$1count  |  目前作用中連線的數量。  | 
|  kafka\$1server\$1socket\$1server\$1metrics\$1connection\$1creation\$1rate  |  每秒建立新連線的速率。  | 
|  kafka\$1server\$1socket\$1server\$1metrics\$1connection\$1close\$1rate  |  每秒連線關閉速率。  | 
|  kafka\$1server\$1socket\$1server\$1metrics\$1failed\$1authentication\$1total  |  失敗的身分驗證嘗試總數。  | 
|  kafka\$1server\$1socket\$1server\$1metrics\$1incoming\$1byte\$1rate  |  每秒傳入位元組的速率。  | 
|  kafka\$1server\$1socket\$1server\$1metrics\$1outgoing\$1byte\$1rate  |  每秒傳出位元組的速率。  | 
|  kafka\$1server\$1socket\$1server\$1metrics\$1request\$1rate  |  每秒請求率。  | 
|  kafka\$1server\$1socket\$1server\$1metrics\$1response\$1rate  |  每秒回應速率。  | 
|  kafka\$1server\$1socket\$1server\$1metrics\$1network\$1io\$1rate  |  每秒的網路 I/O 操作速率。  | 
|  kafka\$1server\$1socket\$1server\$1metrics\$1io\$1ratio  |  在 I/O 操作中花費的時間部分。  | 
|  kafka\$1server\$1controller\$1channel\$1metrics\$1connection\$1count  |  控制器通道的目前作用中連線數。  | 
|  kafka\$1server\$1controller\$1channel\$1metrics\$1incoming\$1byte\$1rate  |  控制器通道每秒傳入位元組的速率。  | 
|  kafka\$1server\$1controller\$1channel\$1metrics\$1outgoing\$1byte\$1rate  |  控制器通道每秒傳出位元組的速率。  | 
|  kafka\$1server\$1controller\$1channel\$1metrics\$1request\$1rate  |  控制器通道每秒請求的速率。  | 
|  kafka\$1server\$1replica\$1fetcher\$1metrics\$1connection\$1count  |  複本擷取器的目前作用中連線數。  | 
|  kafka\$1server\$1replica\$1fetcher\$1metrics\$1incoming\$1byte\$1rate  |  複本擷取器每秒傳入位元組的速率。  | 
|  kafka\$1server\$1replica\$1fetcher\$1metrics\$1request\$1rate  |  複本擷取器的每秒請求率。  | 
|  kafka\$1server\$1replica\$1fetcher\$1metrics\$1failed\$1authentication\$1total  |  複本擷取器的失敗身分驗證嘗試總數。  | 
|  kafka\$1server\$1ZooKeeperClientMetrics\$1Count  |  ZooKeeper 用戶端操作的總計數。  | 
|  kafka\$1server\$1ZooKeeperClientMetrics\$1Mean  |  ZooKeeper 用戶端操作的平均延遲。  | 
|  kafka\$1server\$1KafkaServer\$1Value  |  Kafka 伺服器的目前狀態或值 （通常表示伺服器正在執行）。  | 
|  node\$1cpu\$1seconds\$1total  |  CPUs花費的總秒數 （使用者、系統、閒置等），依 CPU 和模式細分。  | 
|  node\$1disk\$1read\$1bytes\$1total  |  從磁碟成功讀取的位元組總數，依裝置細分。  | 
|  node\$1disk\$1reads\$1completed\$1total  |  磁碟成功完成的讀取總數，依裝置細分。  | 
|  node\$1disk\$1writes\$1completed\$1total  |  磁碟成功完成的寫入總數，依裝置細分。  | 
|  node\$1disk\$1written\$1bytes\$1total  |  成功寫入磁碟的位元組總數，依裝置細分。  | 
|  node\$1filesystem\$1avail\$1bytes  |  非根使用者可用的檔案系統空間，以位元組為單位，依裝置和掛載點細分。  | 
|  node\$1filesystem\$1size\$1bytes  |  檔案系統的總大小，以位元組為單位，依裝置和掛載點細分。  | 
|  node\$1filesystem\$1free\$1bytes  |  以位元組為單位的可用檔案系統空間，依裝置和掛載點細分。  | 
|  node\$1filesystem\$1files  |  檔案系統上的檔案節點 (inodes) 總數，依裝置和掛載點細分。  | 
|  node\$1filesystem\$1files\$1free  |  檔案系統上可用檔案節點 (inodes) 的數量，依裝置和掛載點細分。  | 
|  node\$1filesystem\$1readonly  |  指出檔案系統是否已掛載唯讀 (1 = 唯讀，0 = 讀寫）。  | 
|  node\$1filesystem\$1device\$1error  |  指出取得檔案系統統計資料時發生錯誤 (1 = 錯誤，0 = 成功）。  | 

## 限制
<a name="prom-msk-limitations"></a>

目前與 Amazon Managed Service for Prometheus 整合的 Amazon MSK 有下列限制：
+ 僅支援 Amazon MSK 佈建叢集 （不適用於 Amazon MSK Serverless)
+ 不支援搭配 KRaft 中繼資料模式啟用公有存取的 Amazon MSK 叢集
+ Amazon MSK Express 代理程式不支援
+ 目前支援 Amazon MSK 叢集與 Amazon Managed Service for Prometheus 收集器/工作空間之間的 1：1 映射