首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >建立我的第一个普罗米修斯联盟

建立我的第一个普罗米修斯联盟
EN

Stack Overflow用户
提问于 2021-10-05 19:23:55
回答 1查看 106关注 0票数 0

这是我的第一个问题,如果我做错了什么,很抱歉。(英语不是我的主要语言)

我正在实现我的第一个prometheus联邦系统,我不知道如何连接位于不同网络和防火墙中的两台服务器。

我不知道是否必须配置两个防火墙,或者是否必须配置我的prometheus配置文件。

这是我的普罗米修斯的全局配置。im使用node-exporter来获取指标。

代码语言:javascript
运行
复制
global:
  scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
  alertmanagers:
    - static_configs:
        - targets:
          # - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: "prometheus"
    static_configs:
      - targets: ["192.168.0.223:9090"]

  - job_name: "node"
    scrape_interval: 15s
    scrape_timeout: 10s
    static_configs:
      - targets:
        - 192.168.0.223:9100
        - 18.230.81.178:9100
        - 189.90.67.24:9100

This is what appears in my prometheus web localhost.

EN

回答 1

Stack Overflow用户

发布于 2021-10-06 17:10:03

这里的问题与Prometheus本身无关,您必须保证Prometheus能够抓取端口9100中的地址,否则它将无法工作。

我建议您测试您的Prometheus实例是否可以在其他端口上访问这些地址,以及是否存在特定于端口9100的防火墙规则。要使其正常工作,您必须至少能够与这些网络中的端口80通信,以便可以设置联合体系结构。这样,您将在每个网络中有一个Prometheus实例抓取您的节点,并在端口80(或其他可访问的)中有一个集中的实例抓取您的联邦Prometheus。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69456191

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档