环境
系统: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
网友评论