# Blackbox exporter, trigger different alert for the same module

**URL:** <https://discuss.prometheus.io/t/blackbox-exporter-trigger-different-alert-for-the-same-module/1260>\
**Category:** General Help/Support\
**Created:** [October 24, 2022, 2:03pm UTC](https://discuss.prometheus.io/t/blackbox-exporter-trigger-different-alert-for-the-same-module/1260 "2022-10-24T14:03:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![miha](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/miha/32/547_2.png) [@miha](https://discuss.prometheus.io/u/miha)\
**Post date:** [October 24, 2022, 2:03pm UTC](https://discuss.prometheus.io/t/blackbox-exporter-trigger-different-alert-for-the-same-module/1260/1 "2022-10-24T14:03:20Z")

</div>

Hello

This is what I have now:

```auto
modules:
  http_test:
    prober: http
    http:
      fail_if_body_not_matches_regexp: ['^{"status":{"code":"UP","description":""}']

```

And for this I get notification via Teams.

```auto
modules:
  http_test:
    prober: http
    http:
      fail_if_body_not_matches_regexp: ['^{"status":{"code":"DEGRADED","description":""}']

```

If I get this notification I would like different kind of notification.

Is it possible to do that?

---

<div class="post-metadata">

**Author:** ![stuart](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/stuart/32/18_2.png) [@stuart](https://discuss.prometheus.io/u/stuart)\
**Post date:** [October 24, 2022, 2:46pm UTC](https://discuss.prometheus.io/t/blackbox-exporter-trigger-different-alert-for-the-same-module/1260/2 "2022-10-24T14:46:15Z")

</div>

You could have a second module (e.g. http\_test\_degraded) and scrape that module too. Then you’d have two metrics that can be alerted on in different ways.

---

<div class="post-metadata">

**Author:** ![miha](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/miha/32/547_2.png) [@miha](https://discuss.prometheus.io/u/miha)\
**Post date:** [October 24, 2022, 6:06pm UTC](https://discuss.prometheus.io/t/blackbox-exporter-trigger-different-alert-for-the-same-module/1260/3 "2022-10-24T18:06:32Z")

</div>

Thank you @stuart.

My question is quit to trigger different alert based on different module? And does this means that service will be pinged two times?

My prometheus.yml part:

```auto
 job_name: 'blackbox'
    metrics_path: /probe #&debug=true
    params:
      module: [http_2xx] # Look for a HTTP 200 response.
    static_configs:
      - targets: ["https://domain.com/resthealth"]
        labels:
          env: 'test'
          module: http_probe
      - targets: ["https://domain.com/set/health","https://domain.com/fhir/health","https://domain.com/tasks/health","https://domain.com/ehr/health"]

```

blackbox:

```auto
modules:
  http_probe:
    prober: http
    http:
      fail_if_body_not_matches_regexp: ['^{"status":{"code":"UP","description":""}']
  http_fhir:
    prober: http
    http:
      fail_if_body_not_matches_regexp: ['^{"status":"UP","components"']

```

I need to have another fail\_if\_body\_not\_matches\_regexp: [‘^{“status”:{“code”:“DEPRICATED”,“description”:“”}’] with different alert “severity”
