<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/css" href="/css/feed.min.862ab8f8bb15f1f3203a5b9e6a474b6fcd7e7137c22209e346175b0856acfd97.css"?><rss data-theme="dark" data-theme-default="dark" version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:h="http://www.w3.org/1999/xhtml"><channel><title>blackbox_exporter · atman · ihx.cc | AirPlan - A biger solution</title><link>https://atman.ihx.cc/tags/blackbox_exporter/</link><description>君子不器，日日自新。一處關於技術、生活與自我探索的行記。</description><language>zh-CN</language><generator>Hugo</generator><copyright>DataBase - Atman as @man</copyright><lastBuildDate>Sat, 03 Jun 2017 00:00:00 +0800</lastBuildDate><atom:link href="https://atman.ihx.cc/tags/blackbox_exporter/index.xml" rel="self" type="application/rss+xml"/><h:script src="/js/theme.min.e9b6d7597dde98fbf1181117d7e72cec3c16ab35de5b3f3bdb17dbd866e0c62c.js" type="text/javascript" defer="defer"/><h:header class="feed-header"><h:nav><h:a href="https://atman.ihx.cc/">首页</h:a><h:a href="https://atman.ihx.cc/archive/">Archive</h:a><h:button id="theme-toggle" class="feed-theme-toggle" type="button" aria-label="暗色模式" aria-pressed="true" title="切换亮暗风格">亮 / 暗</h:button></h:nav><h:p class="feed-eyebrow">RSS / 全文订阅</h:p><h:h1>blackbox_exporter · atman · ihx.cc | AirPlan - A biger solution</h:h1><h:p>将下面的地址粘贴到 RSS 阅读器，即可订阅更新。这里展示最近 1 篇文章的摘要，阅读器中可阅读文章全文。</h:p><h:a class="feed-address" href="https://atman.ihx.cc/tags/blackbox_exporter/index.xml">https://atman.ihx.cc/tags/blackbox_exporter/index.xml</h:a><h:p class="feed-note">包含 post 和 look 中的文章 · 按发布时间倒序</h:p></h:header><item><title>监控架构 - Blackbox_exporter 主动探测端口服务状态</title><link>https://atman.ihx.cc/post/20170603-blackbox_exporter/</link><guid isPermaLink="true">https://atman.ihx.cc/post/20170603-blackbox_exporter/</guid><pubDate>Sat, 03 Jun 2017 00:00:00 +0800</pubDate><dc:creator>Atman</dc:creator><category>Deploy</category><category>Alertmanager</category><category>Prometheus</category><category>blackbox_exporter</category><category>Monitoring</category><description>0x00 找个能监控组件端口是否存在的服务，并且可以将数据发送到 Prometheus ；blackbox export 是 Prometheus 家族一员，按照配置文件内容用于向目标主动探测 0x01 Deploy blackbox_exporter 是 Prometheus 官方提供的 exporter 之一，可以提供 http、dns、tcp、icmp …</description><content:encoded><![CDATA[<h2 id="0x00">0x00</h2>
<blockquote>
<p>找个能监控组件端口是否存在的服务，并且可以将数据发送到 Prometheus ；blackbox export 是 Prometheus 家族一员，按照配置文件内容用于向目标主动探测</p>
</blockquote>
<h2 id="0x01-deploy">0x01 Deploy</h2>
<ul>
<li>
<p><a href="https://github.com/prometheus/blackbox_exporter">blackbox_exporter</a> 是 Prometheus 官方提供的 exporter 之一，可以提供 http、dns、tcp、icmp 的监控数据采集</p>
</li>
<li>
<p>Binary</p>
<ul>
<li><a href="https://github.com/prometheus/blackbox_exporter/releases">Release Download</a></li>
<li><code>./bin/blackbox_exporter --web.listen-address=:9115 --log.level=info --config.file=conf/blackbox.yml</code></li>
</ul>
</li>
<li>
<p>Docker</p>
<pre><code class="language-bash" data-lang="bash">docker pull prom/blackbox-exporter
docker run -d -p 9115:9115 --name blackbox_exporter -v `pwd`:/config blackbox_exporter --config.file=/config/blackbox.yml
</code></pre></li>
<li>
<p>blackbox.yml template</p>
<ul>
<li>通过 blackbox.yml 定义模块详细信息</li>
<li>在 Prometheus 配置文件中引用该模块以及配置被监控目标主机</li>
</ul>
</li>
</ul>
<h3 id="blackboxyml-配置文件">blackbox.yml 配置文件</h3>
<blockquote>
<p>如无特殊需求，使用默认配置文件即可
<a href="https://github.com/prometheus/blackbox_exporter/blob/master/config/testdata/blackbox-good.yml">blackbox-good.yml</a> 官方配置文件案例</p>
</blockquote>
<pre><code class="language-YAML" data-lang="YAML">modules:
  http_2xx:
    prober: http
    http:
      method: GET
  http_post_2xx:
    prober: http
    http:
      method: POST
  tcp_connect:
    prober: tcp
  pop3s_banner:
    prober: tcp
    tcp:
      query_response:
      - expect: &#34;^+OK&#34;
      tls: true
      tls_config:
        insecure_skip_verify: false
  ssh_banner:
    prober: tcp
    tcp:
      query_response:
      - expect: &#34;^SSH-2.0-&#34;
  irc_banner:
    prober: tcp
    tcp:
      query_response:
      - send: &#34;NICK prober&#34;
      - send: &#34;USER prober prober prober :prober&#34;
      - expect: &#34;PING :([^ ]+)&#34;
        send: &#34;PONG ${1}&#34;
      - expect: &#34;^:[^ ]+ 001&#34;
  icmp:
    prober: icmp
    timeout: 5s
    icmp:
      preferred_ip_protocol: &#34;ip4&#34;
</code></pre><h2 id="0x02-功能测试">0x02 功能测试</h2>
<ul>
<li>HTTP 测试
<ul>
<li>定义 Request Header 信息</li>
<li>判断 Http status / Http Respones Header / Http Body 内容</li>
</ul>
</li>
<li>TCP 测试
<ul>
<li>业务组件端口状态监听</li>
<li>应用层协议定义与监听</li>
</ul>
</li>
<li>ICMP 测试
<ul>
<li>主机探活机制</li>
</ul>
</li>
</ul>
<h3 id="ping-测试">Ping 测试</h3>
<ul>
<li>阅读 <a href="https://github.com/prometheus/blackbox_exporter/blob/master/prober/icmp.go">icmp.go</a> 了解 ICMP 模块工作</li>
<li>以下内容引用 <a href="https://www.iamle.com/archives/2130.html">用 Prometheus 进行网络质量 Ping 监控</a></li>
<li>相关代码块添加到 Prometheus 配置文件内</li>
</ul>
<pre><code class="language-YAML" data-lang="YAML">  - job_name: &#39;ping_all&#39;
    scrape_interval: 5s
    metrics_path: /probe
    params:
      module: [icmp]  #ping
    static_configs:
      - targets: [&#39;219.150.32.132&#39;, &#39;219.148.204.66&#39;, &#39;183.59.4.178&#39;, &#39;202.96.209.5&#39;, &#39;202.100.4.15&#39;, &#39;219.146.0.253&#39;, &#39;222.173.113.3&#39;, &#39;61.139.2.69&#39;, &#39;61.128.114.133&#39;, &#39;202.98.234.35&#39;, &#39;202.100.64.68&#39;, &#39;202.100.100.1&#39;, &#39;221.232.129.35&#39;, &#39;222.88.19.1&#39;, &#39;222.190.127.1&#39;, &#39;202.96.96.68&#39;, &#39;202.101.103.54&#39;, &#39;61.140.99.11&#39;, &#39;202.96.161.1&#39;, &#39;202.103.224.74&#39;]
        labels:
          group: &#39;一线城市 - 电信网络监控&#39;
      - targets: [&#39;218.8.251.163&#39;, &#39;218.107.51.1&#39;, &#39;221.7.34.1&#39;, &#39;112.65.244.1&#39;, &#39;218.25.9.38&#39;, &#39;124.89.76.214&#39;, &#39;202.102.152.3&#39;, &#39;202.102.128.68&#39;, &#39;124.161.132.1&#39;, &#39;221.7.1.20&#39;, &#39;27.98.234.1&#39;, &#39;218.104.111.122&#39;, &#39;218.28.199.1&#39;, &#39;221.6.4.66&#39;, &#39;221.12.31.58&#39;, &#39;218.104.136.149&#39;, &#39;210.21.4.130&#39;, &#39;210.21.196.6&#39;, &#39;221.7.128.68&#39;, &#39;221.199.15.5&#39;]
        labels:
          group: &#39;一线城市 - 联通网络监控&#39;
      - targets: [&#39;211.137.241.34&#39;, &#39;211.136.192.1&#39;, &#39;218.203.160.194&#39;, &#39;117.131.0.22&#39;, &#39;211.137.32.178&#39;, &#39;117.136.25.1&#39;, &#39;211.137.191.26&#39;, &#39;211.137.180.1&#39;, &#39;211.137.106.1&#39;, &#39;218.202.152.130&#39;, &#39;211.139.73.34&#39;, &#39;223.77.0.1&#39;, &#39;211.138.16.1&#39;, &#39;221.131.143.1&#39;, &#39;211.140.10.2&#39;, &#39;211.143.195.255&#39;, &#39;183.238.55.1&#39;, &#39;218.204.216.65&#39;, &#39;211.138.245.180&#39;, &#39;211.138.56.1&#39;]
        labels:
          group: &#39;一线城市 - 移动网络监控&#39;
      - targets: [&#39;61.233.168.1&#39;, &#39;61.234.113.1&#39;, &#39;211.98.224.87&#39;, &#39;222.44.44.1&#39;, &#39;222.33.8.1&#39;, &#39;61.232.201.76&#39;, &#39;211.98.19.1&#39;, &#39;61.232.49.1&#39;, &#39;211.98.208.1&#39;, &#39;61.233.199.129&#39;, &#39;222.34.16.1&#39;, &#39;61.232.206.1&#39;, &#39;61.233.79.1&#39;, &#39;211.98.43.1&#39;, &#39;61.232.78.1&#39;, &#39;61.232.93.193&#39;, &#39;211.98.161.1&#39;, &#39;61.235.99.1&#39;, &#39;222.52.72.66&#39;, &#39;211.138.56.1&#39;]
        labels:
          group: &#39;一线城市 - 铁通网络监控&#39;
      - targets: [&#39;219.150.32.132&#39;, &#39;219.153.32.1&#39;, &#39;219.149.6.99&#39;, &#39;220.189.218.45&#39;, &#39;123.172.77.1&#39;, &#39;202.103.124.34&#39;, &#39;222.172.200.68&#39;, &#39;202.100.64.68&#39;, &#39;222.93.201.1&#39;, &#39;222.191.255.1&#39;, &#39;202.101.224.68&#39;, &#39;222.85.179.1&#39;, &#39;220.178.79.2&#39;, &#39;59.49.12.97&#39;, &#39;222.223.255.1&#39;, &#39;219.148.172.97&#39;, &#39;219.132.199.49&#39;, &#39;14.120.0.1&#39;, &#39;222.223.29.5&#39;, &#39;222.173.222.1&#39;, &#39;202.101.107.55&#39;, &#39;222.74.58.29&#39;]
        labels:
          group: &#39;二线城市 - 电信网络监控&#39;
      - targets: [&#39;60.24.4.1&#39;, &#39;221.5.203.86&#39;, &#39;202.96.86.18&#39;, &#39;221.12.33.227&#39;, &#39;202.99.96.68&#39;, &#39;58.20.127.238&#39;, &#39;221.3.131.11&#39;, &#39;124.152.0.1&#39;, &#39;221.3.131.11&#39;, &#39;221.6.96.1&#39;, &#39;220.248.192.13&#39;, &#39;221.13.28.234&#39;, &#39;211.91.88.129&#39;, &#39;202.99.192.66&#39;, &#39;202.99.160.68&#39;, &#39;202.99.224.68&#39;, &#39;58.252.65.1&#39;, &#39;221.4.141.254&#39;, &#39;60.2.17.49&#39;, &#39;202.102.154.3&#39;, &#39;36.249.127.25&#39;, &#39;202.99.224.8&#39;]
        labels:
          group: &#39;二线城市 - 联通网络监控&#39;
      - targets: [&#39;211.137.160.5&#39;, &#39;218.201.17.2&#39;, &#39;211.140.192.1&#39;, &#39;211.140.35.1&#39;, &#39;211.141.66.209&#39;, &#39;211.138.225.2&#39;, &#39;111.17.191.25&#39;, &#39;218.203.160.195&#39;, &#39;211.103.55.51&#39;, &#39;211.103.114.1&#39;, &#39;183.217.255.254&#39;, &#39;211.139.2.18&#39;, &#39;211.138.180.2&#39;, &#39;211.142.12.2&#39;, &#39;111.11.85.1&#39;, &#39;211.138.91.2&#39;, &#39;218.204.173.197&#39;, &#39;183.233.223.25&#39;, &#39;211.143.60.1&#39;, &#39;120.192.167.2&#39;, &#39;218.207.133.3&#39;, &#39;120.193.138.1&#39;]
        labels:
          group: &#39;二线城市 - 移动网络监控&#39;
      - targets: [&#39;61.234.70.2&#39;, &#39;211.98.114.1&#39;, &#39;61.232.157.1&#39;, &#39;61.234.186.1&#39;, &#39;61.235.225.1&#39;, &#39;211.98.71.1&#39;, &#39;211.98.72.7&#39;, &#39;123.81.2.9&#39;, &#39;211.98.44.65&#39;, &#39;222.45.86.1&#39;, &#39;222.49.82.1&#39;, &#39;211.98.108.1&#39;, &#39;222.48.116.17&#39;, &#39;211.98.149.117&#39;, &#39;61.235.145.1&#39;, &#39;222.39.142.1&#39;, &#39;110.211.253.9&#39;, &#39;222.50.104.1&#39;, &#39;61.234.76.1&#39;, &#39;61.232.53.113&#39;, &#39;61.234.196.185&#39;, &#39;222.39.156.1&#39;]
        labels:
          group: &#39;二线城市 - 铁通网络监控&#39;
      - targets: [&#39;166.111.8.28&#39;, &#39;202.112.26.34&#39;, &#39;202.114.240.6&#39;, &#39;202.116.160.33&#39;, &#39;211.65.207.170&#39;, &#39;218.26.226.100&#39;, &#39;222.221.252.162&#39;, &#39;202.38.64.1&#39;, &#39;202.201.48.1&#39;, &#39;202.118.176.1&#39;, &#39;121.193.138.1&#39;, &#39;222.23.245.1&#39;, &#39;58.195.136.3&#39;, &#39;202.118.1.28&#39;, &#39;59.77.229.1&#39;, &#39;121.48.177.1&#39;, &#39;121.250.214.1&#39;, &#39;59.75.177.1&#39;, &#39;59.75.112.254&#39;]
        labels:
          group: &#39;教育网络监控&#39;
    relabel_configs:
      - source_labels: [__address__]
        regex: (.*)(:80)?
        target_label: __param_target
        replacement: ${1}
      - source_labels: [__param_target]
        regex: (.*)
        target_label: ping
        replacement: ${1}
      - source_labels: []
        regex: .*
        target_label: __address__
        replacement: 172.16.10.65:9115  # Blackbox exporter.
</code></pre><h3 id="tcp-测试">TCP 测试</h3>
<ul>
<li>阅读 <a href="https://github.com/prometheus/blackbox_exporter/blob/master/prober/tcp_test.go">tcp_test.go</a> 了解 TCP 工作</li>
<li>监听 TiDB TiKV PD 的业务端口地址，用来判断服务是否在线</li>
<li>相关代码块添加到 Prometheus 文件内</li>
</ul>
<pre><code class="language-YAML" data-lang="YAML">- job_name: &#34;port_test&#34;
  scrape_interval: 30s
  metrics_path: /probe
  params:
    module: [tcp_connect]
  static_configs:
  - targets: [&#39;172.16.10.64:2379&#39;, &#39;172.16.10.65:2379&#39;, &#39;172.16.10.66:2379&#39;]
    labels:
      group: &#39;pd&#39;
  - targets: [&#39;172.16.10.64:4000&#39;, &#39;172.16.10.65:4000&#39;, &#39;172.16.10.66:4000&#39;]
    labels:
      group: &#39;tidb&#39;
  - targets: [&#39;172.16.10.67:20160&#39;, &#39;172.16.10.68:20160&#39;, &#39;172.16.10.69:20160&#39;]
    labels:
      group: &#39;tikv&#39;
  - targets: [&#39;172.16.10.64:9100&#39;, &#39;172.16.10.65:9100&#39;, &#39;172.16.10.66:9100&#39;,&#39;172.16.10.67:9100&#39;, &#39;172.16.10.68:9100&#39;, &#39;172.16.10.69:9100&#39;]
    labels:
      group: &#39;node-export&#39;
  - targets: [&#39;172.16.10.67:3000&#39;, &#39;172.16.10.67:9091&#39;, &#39;172.16.10.67:9090&#39;]
    labels:
      group: &#39;monitor&#39;
  relabel_configs:
    - source_labels: [__address__]
      target_label: __param_target
    - source_labels: [__param_target]
      target_label: instance
    - target_label: __address__
      replacement: 172.16.10.65:9115  # Blackbox 地址
</code></pre><h3 id="http-测试">HTTP 测试</h3>
<ul>
<li><a href="https://github.com/prometheus/blackbox_exporter/blob/master/prober/http_test.go">http_test.go</a></li>
<li>相关代码块添加到 Prometheus 文件内</li>
</ul>
<pre><code class="language-YAML" data-lang="YAML">  - job_name: &#39;http_2xx&#39;
    scrape_interval: 5s
    metrics_path: /probe
    params:
      module: [http_2xx]
    static_configs:
      - targets:
        - &#39;www.baidu.com&#39;
        - &#39;www.pingcap.com&#39;
        - &#39;http://172.16.10.65:2379/metrics&#39;
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 172.16.10.65:9115
</code></pre><h2 id="0x03-告警测试">0x03 告警测试</h2>
<ul>
<li>
<p>通过 <code>http://172.16.10.65:9115/probe?target=prometheus.io&amp;module=http_2xx&amp;debug=true</code> 方式可观察监听过程</p>
<pre><code class="language-fallback" data-lang="fallback">Logs for the probe:
ts=2018-04-13T03:47:36.354717876Z caller=main.go:116 module=http_2xx target=prometheus.io level=info msg=&#34;Beginning probe&#34; probe=http timeout_seconds=9.5
ts=2018-04-13T03:47:36.354917698Z caller=utils.go:42 module=http_2xx target=prometheus.io level=info msg=&#34;Resolving target address&#34; preferred_ip_protocol=ip6
ts=2018-04-13T03:47:36.403356427Z caller=utils.go:65 module=http_2xx target=prometheus.io level=info msg=&#34;Resolved target address&#34; ip=2400:cb00:2048:1::6818:783c
ts=2018-04-13T03:47:36.40345284Z caller=http.go:282 module=http_2xx target=prometheus.io level=info msg=&#34;Making HTTP request&#34; url=http://[2400:cb00:2048:1::6818:783c] host=prometheus.io
ts=2018-04-13T03:47:36.414825723Z caller=http.go:297 module=http_2xx target=prometheus.io level=error msg=&#34;Error for HTTP request&#34; err=&#34;Get http://[2400:cb00:2048:1::6818:783c]: dial tcp [2400:cb00:2048:1::6818:783c]:80: connect: network is unreachable&#34;
ts=2018-04-13T03:47:36.426234543Z caller=http.go:354 module=http_2xx target=prometheus.io level=info msg=&#34;Response timings for roundtrip&#34; roundtrip=0 start=2018-04-13T11:47:36.414648186+08:00 dnsDone=2018-04-13T11:47:36.414648186+08:00 connectDone=2018-04-13T11:47:36.414794718+08:00 gotConn=0001-01-01T00:00:00Z responseStart=0001-01-01T00:00:00Z end=2018-04-13T11:47:36.414814678+08:00
ts=2018-04-13T03:47:36.426339526Z caller=main.go:129 module=http_2xx target=prometheus.io level=error msg=&#34;Probe failed&#34; duration_seconds=0.071537196

Metrics that would have been returned:
# HELP probe_dns_lookup_time_seconds Returns the time taken for probe dns lookup in seconds
# TYPE probe_dns_lookup_time_seconds gauge
probe_dns_lookup_time_seconds 0.048474718
# HELP probe_duration_seconds Returns how long the probe took to complete in seconds
# TYPE probe_duration_seconds gauge
probe_duration_seconds 0.071537196
# HELP probe_failed_due_to_regex Indicates if probe failed due to regex
# TYPE probe_failed_due_to_regex gauge
probe_failed_due_to_regex 0
# HELP probe_http_content_length Length of http content response
# TYPE probe_http_content_length gauge
probe_http_content_length 0
# HELP probe_http_duration_seconds Duration of http request by phase, summed over all redirects
# TYPE probe_http_duration_seconds gauge
probe_http_duration_seconds{phase=&#34;connect&#34;} 0
probe_http_duration_seconds{phase=&#34;processing&#34;} 0
probe_http_duration_seconds{phase=&#34;resolve&#34;} 0.048474718
probe_http_duration_seconds{phase=&#34;tls&#34;} 0
probe_http_duration_seconds{phase=&#34;transfer&#34;} 0
# HELP probe_http_redirects The number of redirects
# TYPE probe_http_redirects gauge
probe_http_redirects 0
# HELP probe_http_ssl Indicates if SSL was used for the final redirect
# TYPE probe_http_ssl gauge
probe_http_ssl 0
# HELP probe_http_status_code Response HTTP status code
# TYPE probe_http_status_code gauge
probe_http_status_code 0
# HELP probe_http_version Returns the version of HTTP of the probe response
# TYPE probe_http_version gauge
probe_http_version 0
# HELP probe_ip_protocol Specifies whether probe ip protocol is IP4 or IP6
# TYPE probe_ip_protocol gauge
probe_ip_protocol 6
# HELP probe_success Displays whether or not the probe was a success
# TYPE probe_success gauge
probe_success 0

Module configuration:
prober: http
http:
  method: GET
</code></pre></li>
</ul>
<h3 id="告警测试规则">告警测试规则</h3>
<ul>
<li>
<p>判断 probe_success metric 结果值，达到告警效果</p>
<ul>
<li>成功 == 1</li>
<li>失败 == 0</li>
</ul>
</li>
<li>
<p>创建 <code>port.rules.yml</code> 文件，写入以下告警规则</p>
</li>
</ul>
<pre><code class="language-yaml" data-lang="yaml">  - alert: TiDB_is_Down
    expr: probe_success{group=&#34;tidb&#34;} == 0
    for: 3m
    labels:
      env: test-cluster
      level: port
      expr: probe_success{group=&#34;tidb&#34;} == 0
    annotations:
      description: &#39;alert:{{ $labels.expr }} instance:
        {{ $labels.instance }} values: {{ $value }}&#39;
      value: &#39;{{ $value }}&#39;
      summary: TiDB_is_Down

  - alert: TiKV_is_Down
    expr: probe_success{group=&#34;tikv&#34;} == 0
    for: 3m
    labels:
      env: test-cluster
      level: port
      expr: probe_success{group=&#34;tikv&#34;} == 0
    annotations:
      description: &#39;alert:{{ $labels.expr }} instance:
        {{ $labels.instance }} values: {{ $value }}&#39;
      value: &#39;{{ $value }}&#39;
      summary: TiKV_is_Down

  - alert: PD_is_Down
    expr: probe_success{group=&#34;pd&#34;} == 0
    for: 3m
    labels:
      env: test-cluster
      level: port
      expr: probe_success{group=&#34;pd&#34;} == 0
    annotations:
      description: &#39;alert:{{ $labels.expr }} instance:
        {{ $labels.instance }} values: {{ $value }}&#39;
      value: &#39;{{ $value }}&#39;
      summary: PD_is_Down
</code></pre><h3 id="上报-prometheus">上报 Prometheus</h3>
<ul>
<li>Prometheus 配置文件中添加 <code>port.rules.yml</code> 字段，修改完成后重启生效
<ul>
<li>如果 Prometheus 已经引入 Alertmanger 服务，Prometheus 监控到端口 down 掉后会触发告警</li>
</ul>
</li>
</ul>
<pre><code class="language-yaml" data-lang="yaml">rule_files:
  - &#39;node.rules.yml&#39;
  - &#39;blacker.rules.yml&#39;
  - &#39;bypass.rules.yml&#39;
  - &#39;pd.rules.yml&#39;
  - &#39;tidb.rules.yml&#39;
  - &#39;tikv.rules.yml&#39;
  - &#39;binlog.rules.yml&#39;
  - &#39;port.rules.yml&#39; # 端口监测告警规则文件
</code></pre><h3 id="grafana-展示">Grafana 展示</h3>
<ul>
<li>部署 Grafana 服务
<ul>
<li>下载 <a href="https://grafana.com/grafana/download">Grafana</a></li>
<li>部署 <a href="http://docs.grafana.org/installation/rpm/">Grafana</a></li>
</ul>
</li>
<li>利用以下 metrics 构建页面
<ul>
<li>probe_success</li>
<li>probe_duration_seconds</li>
</ul>
</li>
</ul>
]]></content:encoded><h:time datetime="2017-06-03T00:00:00+08:00">2017-06-03 · post</h:time><h:a class="feed-article-title" href="https://atman.ihx.cc/post/20170603-blackbox_exporter/">监控架构 - Blackbox_exporter 主动探测端口服务状态</h:a></item></channel></rss>