Security 为Alertmanager配置HTTPS和基本身份验证

Security 为Alertmanager配置HTTPS和基本身份验证,security,https,prometheus,basic-authentication,prometheus-alertmanager,Security,Https,Prometheus,Basic Authentication,Prometheus Alertmanager,我希望通过tls和身份验证保护我的Alertmanager,以便在我的网络中,不是每个人都能够访问面向公众的端点。我不想使用nginx服务器作为代理。 这将是我的普罗米修斯配置: global: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. evaluation_interval: 15s # Evaluate rules every 1

我希望通过tls和身份验证保护我的Alertmanager,以便在我的网络中,不是每个人都能够访问面向公众的端点。我不想使用nginx服务器作为代理。 这将是我的普罗米修斯配置:

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:
  - scheme: https
    basic_auth:
      username: abc
      password: ####
    tls_config:
      ca_file: ca.crt
      cert_file: ca.crt
      key_file: ca.key
    static_configs:
    - targets: ['localhost:9093']

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  - "alertRules.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'
    scheme: https
    basic_auth:
      username: abc
      password: ###
    tls_config:
      ca_file: ca.crt
    static_configs:
    - targets: ['localhost:9090']
全球:
刮水间隔:15s#将刮水间隔设置为每15秒一次。默认值为每1分钟一次。
评估间隔:15s#每15秒评估一次规则。默认值为每1分钟一次。
#刮削超时设置为全局默认值(10秒)。
#Alertmanager配置
提醒:
警报管理员:
-方案:https
基本认证:
用户名:abc
密码:####
tls_配置:
ca_文件:ca.crt
证书文件:ca.crt
密钥文件:ca.key
静态\u配置:
-目标:['localhost:9093']
#加载规则一次,并根据全局“评估间隔”定期评估规则。
规则文件:
-“alertRules.yml”
#仅包含一个要刮取的端点的刮取配置:
#这是普罗米修斯本人。
刮取_配置:
#作业名称作为标签“job=”添加到此配置中的任何时间序列。
-工作名称:“普罗米修斯”
方案:https
基本认证:
用户名:abc
密码:###
tls_配置:
ca_文件:ca.crt
静态\u配置:
-目标:['localhost:9090']