当前位置: 首页 > news >正文

网站网址前的小图标怎么做四川省建设科技协会网站

网站网址前的小图标怎么做,四川省建设科技协会网站,吸引企业做网站,本地局域网搭建wordpress黑盒监控 “白盒监控” 是需要把对应的Exporter程序安装到被监控的目标主机上#xff0c;从而实现对主机各种资源以及状态的数据采集工作 ”黑盒监控“ 是不需要把Exporter程序部署到被监控的目标主机上#xff0c;比如全球的网络质量的稳定性#xff0c;通常用ping操作从而实现对主机各种资源以及状态的数据采集工作 ”黑盒监控“ 是不需要把Exporter程序部署到被监控的目标主机上比如全球的网络质量的稳定性通常用ping操作对选取的节点进行icmp测试 Prometheus社区提供黑盒解决方案用户只需要将其安装在与Prometheus和被监控目标互通的环境中通过HTTP、HTTPS、DNS、TCP、ICMP,证书的监控等 方式对网络进行探测监控。 blackbox_exporter Prometheus 官方提供的exporter可以提供http dns tcp icmp的监控数据采集 创建配置文件 mkdir /data/blackbox_exporter -p ​ cat /data/blackbox_exporter/config.yml EOF modules:http_2xx:prober: httphttp:method: GEThttp_port_2xx:prober: httphttp:  method: POSTtcp_connect:prober: tcppop3s_banner:prober: tcptcp:query_response:- expect: ^OKtls: truetls_config:insecure_skip_verify: falsegrpc:prober: grpcgrpc:tls: truepreferred_ip_protocol: ip4grpc_plain:prober: grpctls: falseservice: service1ssh_banner:prober: tcptcp:query_response:- expect: ^SSH-2.0-- send: SSH-2.0-blackbox-ssh-checkirc_banner:prober: tcptcp:query_response:- send: NICK prober- send: USER prober prober prober :prober- expect: PING :([^ ])send: PONG ${1}- expect: ^:[^ ] 001icmp:prober: icmpicmp_ttl5:prober: icmptimeout: 5sicmp:ttl: 5 EOF 修改后 rootprometheus220:/data/blackbox_exporter# cat /data/blackbox_exporter/config.yml modules:http_2xx:prober: httphttp:method: GEThttp_port_2xx:prober: httphttp:  method: POSTtcp_connect:prober: tcpicmp:prober: icmp docker 直接运行 docker run -d --restartalways --name blackbox-exporter -p 9115:9115 \ -v /data/blackbox_exporter:/etc/blackbox_exporter prom/blackbox-exporter:v0.16.0 \ --config.file/ect/blackbox_exporter/config.yml docker-compose 方式 cd /data/blackbox_exporter/ cat docker-compose.yml EOF version: 3.3 services:blackbox_exporter:image: prom/blackbox-exporter:v0.16.0container_name: blackbox_exporterrestart: alwaysvolumes:- /data/blackbox_exporter:/etc/blackbox_exporterports:- 9115:9115 EOF 启动 docker-compose up -d 确认启动docker ps -a 访问测试 http://10.19.1.220:9115/ 添加Prometheus的配置 cd /opt/data/docker-prometheus/prometheus cat prometheus/prometheus.ymlEOF #http 配置- job_name: blackbox_httpmetrics_path: /probeparams: module: [http_2xx]static_configs:- targets: - https://www.baidu.com- https://www.163.comrelabel_configs:- source_labels: [__address__]target_label: __param_target- source_labels: [__param_target]target_label: instance- target_label: __address__replacement: 10.19.1.220:9115 ​ #tcp 配置- job_name: blackbox_tcpmetrics_path: /probeparams: module: [tcp_connect]static_configs:- targets: - 10.19.1.220:22- 10.19.1.206:9090relabel_configs:- source_labels: [__address__]target_label: __param_target- source_labels: [__param_target]target_label: instance- target_label: __address__replacement: 10.19.1.220:9115 ​ #icmp 配置 ping- job_name: blackbox_icmpmetrics_path: /probeparams: module: [icmp]static_configs:- targets: - 10.19.1.206- 10.19.1.220relabel_configs:- source_labels: [__address__]target_label: __param_target- source_labels: [__param_target]target_label: instance- target_label: __address__replacement: 10.19.1.220:9115 EOF 热启动 curl -X POST http://localhost:9090/-/reload Prometheus界面已经显示配置成功 监控项 probe_ ​ probe_success #是否探测成功(取值1、0分别表示成功、失败) probe_duration_seconds #探测的耗时 #关于DNS probe_dns_lookup_time_seconds #DNS解析的耗时 probe_ip_protocol #IP协议取值为4、6 probe_ip_addr_hash #IP地址的哈希值用于判断IP是否变化 #关于HTTP probe_http_status_code #HTTP响应的状态码如果发生重定向则取决于最后一次响应 probe_http_content_length #HTTP响应的body长度单位bytes probe_http_version #HTTP响应的协议版本比如1.1 probe_http_ssl #HTTP响应是否采用SSL取值 1、0 probe_ssl_earliest_cert_expiry #SSL证书过期时间为Unix时间戳 ​ 触发器 Prometheus 配置 #报警(触发器)配置 rule_files:- alert.yml- rules/*.yml 添加blackbox_exporter触发器 cd /opt/data/docker-prometheus/ 创建触发器文件 cat prometheus/rules/blackbox_exporter.yml EOF groups: - name: Blackboxrules:- alert: 黑盒子探测失败报警expr: probe_success 0for: 1mlabels:severity: criticalannotations:summary: 黑盒子探测失败 {{ $labels.instance }}description: 黑盒子探测失败,当前值{{ $value }}- alert: 请求慢告警expr: avg_over_time(probe_duration_seconds[1m]) 1for: 1mlabels:severity: warningannotations:summary: 请求慢 {{ $labels.instance }}description: 请求时间操过1秒值{{ $value }}- alert: http状态码检测失败expr: probe_http_status_code 199 OR probe_http_status_code 400for: 1mlabels:severity: criticalannotations:summary: http状态码检测失败{{ $labels.instance }}description: HTTP状态码非200-399,当前状态码为{{ $value }}- alert: ssl证书即将到期expr: probe_ssl_earliest_cert_expiry - time() 86400 *30for: 1mlabels:severity: warningannotations:summary: 证书即将到期 {{ $labels.instance }}description: SSL 证书在30天后到期,值{{ $value }}     EOF 重新加载配置 curl -X POST http://localhost:9090/-/reload alert中生效 Grafana增加dashboard Blackbox Exporter Dashboard 20220412-StarsL.cn | Grafana Labs Grafana admin/password
http://www.pierceye.com/news/225319/

相关文章:

  • 彩云小梦ai写作网站机关网站建设情况汇报
  • 合肥专业网站优化手机界面设计素材
  • 台州网站建设惠店王烨烨
  • 工程建设比选公告固价方式网站wordpress html5的关系
  • 广州市网站建设 乾图信息科技潍坊市建设监理协会网站
  • 网站建优化网页脚本设计
  • 手机能访问电脑上自己做的网站吗网页设计作品到哪个网站
  • 网站推广成功案例城乡住房建设部官网查询
  • 养殖类网站模板那个网站的公众后推广做的好
  • 网站开发属于什么类型软件建站之星如何建网站
  • 微信做淘宝优惠券但网站是怎么建设但深圳市深圳市住房和建设局网站
  • 后端网站开发免费域名 网站
  • 综合信息网站建设方案网页浏览器排行榜前十名
  • 北京网站开发建设 58同城网站建设改版公司
  • 如何做网站预览网站设计线框图
  • 电子商务的网站的建设内容珠海自适应网站
  • 站酷海洛设计网站官网wordpress选了中文还是英文
  • 软件最全网站如何上传织梦做的网站
  • 做系统前的浏览网站能找回吗湖南网站建设价位
  • 工程服务建设网站那个网站可以做视频app制作
  • 国外网站访问速度慢企业网络营销策划案
  • 网站建设 亿安网络wordpress 调取菜单
  • 帝国网站管理系统安装教程互联网怎么做网站
  • 模板手机网站建设公司河南最新新闻事件今天
  • 企业网站备案要钱吗商标设计费用一般是多少
  • 天津专业网站制作新乡商城网站建设价格
  • 建筑业务网站建设泉州公司做网站
  • 做网站遇到的问题及解决方法网站快速查找
  • excel做网页放进网站2024年报申报入口官网
  • 伊春住房和城乡建设局网站滨州网站建设制作