# 黑盒



```yaml
  - job_name: 'blackbox_icmp_ping'
    metrics_path: /probe
    params:
      module: [icmp]
    static_configs:
      - targets:
        - 192.168.1.2
        - 192.168.1.3
        labels:
          group: 'icmp_ping'
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 10.10.181.238:9115



  - job_name: 'blackbox_web_status'
    metrics_path: /probe
    params:
      module: [http_2xx]
    static_configs:
      - targets:
        - http://baidu.com
        - https://baidu.com
        - http://google.com
        - http://google.com:8080
        labels:
          group: 'http_status'
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 10.10.181.238:9115 


  - job_name: 'blackbox_tcp_port'
    metrics_path: /probe
    params:
      module: [tcp_connect]
    static_configs:
      - targets:
        - 1.1.1.1:8080
        - 1.1.1.1:6379
        - 10.10.181.238:22
        labels:
          group: 'tcp_port'
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 10.10.181.238:9115 
```
