c盘清理的步骤是什么(如何清理C盘空间)
如何清理C盘空间怎么清理C盘的垃圾文件?每天上网会给电脑带来很多临时文件,这些垃圾文件不清理掉时间久了就会影响到电脑的运行速度。那怎
2022/12/08
【资料图】
Blackbox_exporter是Prometheus官方提供的一个exporter,可以监控HTTP,HTTPS,DNS,TCP,ICMP和gRPC等目标实例,从而实现对被监控节点进行监控和数据采集。下载地址:https://github.com/prometheus/blackbox_exportertar -xvf blackbox_exporter-0.22.0.linux-amd64.tar.gzmv blackbox_exporter-0.22.0.linux-amd64 blackbox_exporter/usr/local/blackbox_exporter/blackbox_exporter \ --config.file="/usr/local/blackbox_exporter/blackbox.yml" \ --web.listen-address="10.10.10.10:9115" &>blackbox_exporter.log &启动参数有--web.config.file="" #就可以配置TLS--web.listen-address="10.10.10.10:9115" #指定ip和端口设置开机自启vi /usr/lib/systemd/system/blackbox_exporter.service[Unit]Description=Prometheus blackbox exporterAfter=network.target[Service]Type=simpleUser=rootGroup=rootRestart=on-failureExecStart=/usr/local/blackbox_exporter/blackbox_exporter \ --config.file="/usr/local/blackbox_exporter/blackbox.yml" \ --web.listen-address="10.10.10.10:9115"[Install]WantedBy=multi-user.targetsystemctl daemon-reloadsystemctl restart blackbox_exporter.service
blackbox_exporter的监控,包括URL,ICMP,TCP等。都是先在prometheus设置监控内容,再转发到blackbox_exporter的地址,最后得出监控结果。
在prometheus服务器添加url监控工作,末尾指定blackbox_exporter地址:scrape_configs: - job_name: "blackbox" metrics_path: /probe params: module: [http_2xx] # Look for a HTTP 200 response. static_configs: - targets: - http://baidu.com # Target to probe with http. - https://baidu.com # Target to probe with https. - http://example.com:8080 # Target to probe with http on port 8080. relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 10.10.10.10:9115 # The blackbox exporter"s real hostname:port. 在blackbox_exporter服务器查看最近URL探测:
ICMP就是Ping使用的协议,可以探测IP是否在线:scrape_configs: - job_name: "ping_status" metrics_path: /probe params: module: [icmp] static_configs: - targets: - 192.168.10.131 - 192.168.10.132 - 192.168.10.133 labels: instance: "ping_status" group: "icmp" relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: ip - target_label: __address__ replacement: 10.10.10.10:9115 在blackbox_exporter服务器查看最近ICMP探测:
Port端口用于检测服务器端口是否开启,服务是否可用:scrape_configs: - job_name: "port_status" metrics_path: /probe params: module: [tcp_connect] static_configs: - targets: ["192.168.10.131:22","192.168.10.132:3306","192.168.10.133:8080"] labels: instance: "port_status" group: "port" relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: ip - target_label: __address__ replacement: 10.10.10.10:9115在blackbox_exporter服务器查看最近Port探测: