

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 Prometheus 实例作为收集器
<a name="AMP-ingest-with-prometheus"></a>

您可以使用在*代理*模式下运行的 Prometheus 实例（称为 *Prometheus 代理*）来抓取指标并将其发送到您的 Amazon Managed Service for Prometheus 工作区。

以下主题描述了设置在代理模式下运行的 Prometheus 实例作为指标收集器的不同方法。

**警告**  
创建 Prometheus 代理时，您需要负责其配置和维护。通过[启用安全特征](https://prometheus.io/docs/prometheus/latest/configuration/https/)，避免将 Prometheus 抓取端点暴露给公共互联网。

如果您设置了多个 Prometheus 实例来监控同一组指标，并将其发送到单个 Amazon Managed Service for Prometheus 工作区以实现高可用性，则需要设置重复数据删除。如果您未按照步骤设置重复数据删除，则将向发送至 Amazon Managed Service for Prometheus 的所有数据样本（包括重复样本）收取费用。有关设置重复数据删除的说明，请参阅 [对发送到 Amazon Managed Service for Prometheus 的高可用性指标进行重复数据删除](AMP-ingest-dedupe.md)。

**Topics**
+ [使用 Helm 设置从新 Prometheus 服务器进行摄取](AMP-onboard-ingest-metrics-new-Prometheus.md)
+ [在 EC2 上的 Kubernetes 中设置从现有 Prometheus 服务器进行摄取](AMP-onboard-ingest-metrics-existing-Prometheus.md)
+ [在 Fargate 上的 Kubernetes 中设置从现有 Prometheus 服务器进行摄取](AMP-onboard-ingest-metrics-existing-Prometheus-fargate.md)