You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Splunk OTEL Collector能否采集Prometheus Pushgateway端点指标?

关于Splunk和Datadog采集Prometheus Pushgateway指标的可行性

结论:Splunk OpenTelemetry Collector和Datadog Agent都完全支持采集Pushgateway的指标——因为Pushgateway暴露的是标准Prometheus格式的metrics端点,和普通exporter的输出格式完全一致,只要配置正确就能正常抓取。

Splunk OpenTelemetry Collector配置方法

在Collector配置中使用prometheus接收器,将Pushgateway的metrics端点加入采集目标即可。示例配置片段:

receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: "pushgateway"
          scrape_interval: 15s
          static_configs:
            - targets: ["<pushgateway-host>:9091"]
          metrics_path: "/metrics"

核心是指定Pushgateway的地址和默认/metrics路径,Collector会定期拉取该端点指标,再转发到Splunk Observability平台。

Datadog Agent配置方法

在Datadog Agent配置文件的prometheus检查模块中,将Pushgateway的metrics端点添加到prometheus_urls列表。示例配置:

init_config:

instances:
  - prometheus_urls:
      - "http://<pushgateway-host>:9091/metrics"
    namespace: "pushgateway"
    metrics:
      - "*"

配置完成后,Agent会自动拉取Pushgateway指标,并打上指定的namespace标签,方便在Datadog平台区分筛选。

注意事项

  • Pushgateway返回的指标默认带instance标签(值为自身地址),若需关联业务实例,可通过配置添加/修改标签。
  • 确保Collector/Agent所在网络能访问Pushgateway的默认9091端口,端口修改需同步调整配置。

内容的提问来源于stack exchange,提问作者AKUI

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 15:52:04