用Blackbox Exporter to Monitor web和端口

用Blackbox Exporter to Monitor web和端口,第1张

概述1.按照exporter 1.wget https://github.com/prometheus/blackbox_exporter/releases/download/v0.12.0/blackbox_exporter-0.12.0.linux-amd64.tar.gz2.tar -zxf blackbox_exporter-0.12.0.linux-amd64.tar.gz3.mv

1.按照exporter

1.wget https://github.com/prometheus/blackBox_exporter/releases/download/v0.12.0/blackBox_exporter-0.12.0.linux-amd64.tar.gz2.tar -zxf blackBox_exporter-0.12.0.linux-amd64.tar.gz3.mv blackBox_exporter-0.14.0.linux-amd64 /usr/local/blackBox_exporter4../blackBox_exporter --version

2.vim /lib/systemd/system/blackBox_exporter.service   --  变成系统服务 netstat -anptu|grep 9115

[Unit]Description=blackBox_exporterAfter=network.target[Service]User=rootType=simpleExecStart=/usr/local/blackBox_exporter/blackBox_exporter --config.file=/usr/local/blackBox_exporter/blackBox.ymlRestart=on-failure[Install]WantedBy=multi-user.target

3.监控web和端口状态

  - job_name: web_status    metrics_path: /probe    params:      module: [http_2xx]    static_configs:      - targets: [http://192.168.1.49:8080/]        labels:          instance: web_status          group: web      - targets: [https://www.baIDu.com/]        labels:          instance: baIDu_status          group: baIDu    relabel_configs:      - source_labels: [__address__]        target_label: __param_target      - target_label: __address__        replacement: 127.0.0.1:9115  - job_name: port_status    metrics_path: /probe    params:      module: [tcp_connect]    static_configs:      - targets: [192.168.1.49:8080]        labels:          instance: port_status          group: tcp    relabel_configs:      - source_labels: [__address__]        target_label: __param_target      - target_label: __address__        replacement: 127.0.0.1:9115

4.dashboard  -- 9665 和 7587

5.参考:https://blog.csdn.net/qq_43190337/article/details/100577728

总结

以上是内存溢出为你收集整理的用Blackbox Exporter to Monitor web和端口全部内容,希望文章能够帮你解决用Blackbox Exporter to Monitor web和端口所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1030079.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存