- 环境:centos7, blackbox_exporter 0.12.0
前言
这里使用blackbox_exporter的ssh和ping的检测功能.
Build with Binary And Config Systemd
Build with Binary
- Download
1
2
3$ cd /opt
$ wget https://github.com/prometheus/blackbox_exporter/releases/download/v0.12.0/blackbox_exporter-0.12.0.linux-amd64.tar.gz
$ tar -xvf blackbox_exporter-0.12.0.linux-amd64.tar.gz && mv blackbox_exporter-0.12.0.linux-amd64 blackbox_exporter-0.12.0
Config blackbox.yml
1 | $ vim /opt/blackbox_exporter-0.12.0/blackbox.yml |
Config Systemd
1 | $ vim /usr/lib/systemd/system/blackbox.service |
Test blackbox
在浏览器中查看:http://10.1.1.26:9115