环境

系统:CentOS 7
软件:alertmanager-0.18.0.linux-amd64.tar.gz

安装

  • 下载二进制包
    地址:https://prometheus.io/download/

  • 安装

    # tar -xzvf alertmanager-0.18.0.linux-amd64.tar.gz
    # mkdir /usr/local/prometheus
    # mv alertmanager-0.18.0.linux-amd64 /usr/local/prometheus/alertmanager
    
  • 创建数据目录

    # mkdir -p /data/prometheus/alertmanager/data
    
  • 创建用户并授权

    # useradd prometheus
    # chown -R prometheus:prometheus /usr/local/prometheus /data/prometheus
    

启动

  • 添加启动服务

    # vim /usr/lib/systemd/system/alertmanager.service
    [Unit]
    Description=Alertmanager
    After=network.target
    
    [Service]
    Type=simple
    User=prometheus
    ExecStart=/usr/local/prometheus/alertmanager/alertmanager --config.file=/usr/local/prometheus/alertmanager/alertmanager.yml --storage.path=/data/prometheus/alertmanager/data
    Restart=on-failure
    
    [Install]
    WantedBy=multi-user.target
    
  • 启动

    # systemctl enable alertmanager.service
    # systemctl start alertmanager.service
    
  • 访问
    地址:http://ip:9093

相关文章:

  • 2022-12-23
  • 2021-07-31
  • 2021-08-20
  • 2021-07-09
  • 2021-10-01
  • 2023-02-23
  • 2021-12-05
  • 2021-09-15
猜你喜欢
  • 2021-11-28
  • 2021-12-31
  • 2022-12-23
  • 2021-12-28
  • 2022-02-27
  • 2021-07-03
  • 2022-12-23
相关资源
相似解决方案