美文网首页
Blackbox exporter安装

Blackbox exporter安装

作者: 袁先生的笔记 | 来源:发表于2018-11-22 11:27 被阅读0次

    环境

    系统:CentOS 7.5
    软件:blackbox_exporter-0.12.0.linux-amd64.tar.gz

    安装

    • 下载二进制包
      地址:https://github.com/prometheus/blackbox_exporter/releases

    • 安装

      # tar -xzvf blackbox_exporter-0.12.0.linux-amd64.tar.gz
      # mkdir /usr/local/prometheus
      # mv blackbox_exporter-0.12.0.linux-amd64 /usr/local/prometheus/blackbox_exporter
      
    • 创建用户并授权

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

    启动

    • 添加启动服务

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

      # systemctl enable blackbox_exporter.service
      # systemctl start blackbox_exporter.service
      

    相关文章

      网友评论

          本文标题:Blackbox exporter安装

          本文链接:https://www.haomeiwen.com/subject/agokqqtx.html