# Blackbox\_exporter and SNI

**URL:** <https://discuss.prometheus.io/t/blackbox-exporter-and-sni/3254>\
**Category:** Exporters and Metrics\
**Created:** [January 15, 2025, 6:32pm UTC](https://discuss.prometheus.io/t/blackbox-exporter-and-sni/3254 "2025-01-15T18:32:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreic](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/dreic/32/1104_2.png) [@dreic](https://discuss.prometheus.io/u/dreic)\
**Post date:** [January 15, 2025, 6:32pm UTC](https://discuss.prometheus.io/t/blackbox-exporter-and-sni/3254/1 "2025-01-15T18:32:53Z")

</div>

Hi all,

I am having issues configuring blackbox\_exporter to properly check site return code. I have IIS web server with several HTTPS sites (SNI host set) and this is my config:

```auto
- job_name: blackbox_http_get
    metrics_path: /probe
    params:
      module: [http_get_2xx] # Use the GET module
    static_configs:
      - targets:
          - dev-chr01-iis.interna.lan
        labels:
          site: corehr.dev.externa.com
      - targets:
          - dev-chr01-iis.interna.lan
        labels:
          site: corehr-admin.dev.externa.com
      - targets:
          - dev-chr01-iis.interna.lan
        labels:
          site: workmates.dev.externa.com
      - targets:
          - dev-chr01-iis.interna.lan
        labels:
          site: corehr-hangfire.dev.externa.com
      - targets:
          - dev-chr01-iis.interna.lan
        labels:
          site: workmates-api.dev.externa.com
    relabel_configs:
      - source_labels: [site]
        target_label: __param_hostname # Set the Host header (SNI)
      - source_labels: [__address__]
        target_label: __param_target
        replacement: https://$1/ # Use the internal server name as the target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 127.0.0.1:9115 # Blackbox Exporter's hostname:port

```

The issue is, if I intentionally show down the site (error 503) prometheus is showing state UP and if I click on the endpoint of one `probe_success 0`. So I am confused about this, maybe I am doing something wrong but I need some guidance what is wrong with my config.

Thanks everyone!

---

<div class="post-metadata">

**Author:** ![dreic](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/dreic/32/1104_2.png) [@dreic](https://discuss.prometheus.io/u/dreic)\
**Post date:** [January 16, 2025, 11:36am UTC](https://discuss.prometheus.io/t/blackbox-exporter-and-sni/3254/2 "2025-01-16T11:36:38Z")

</div>

It’s working as expected, nameserver wasn’t set correctly on the host.
