プロメテウス+ grafana +のAlertManagerメール警告

環境

システム:CentOSの7
ソフトウェア:のAlertManager-0.18.0.linux-amd64.tar.gz

インストール

  • バイナリパッケージのダウンロード
    :住所https://prometheus.io/download/を

  • インストール

    # tar -xzvf alertmanager-0.15.1.linux-amd64.tar.gz
    # mkdir /usr/local/prometheus # mv alertmanager-0.15.1.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

おすすめ

転載: www.cnblogs.com/JustinLau/p/11355705.html