---
title: Charmhub | Deploy Blackbox Exporter Machine Charm using Charmhub - The Open
  Operator Collection
description: Deploy the latest version of Blackbox Exporter Machine Charm on any cloud.
url: https://charmhub.io/blackbox-exporter/configurations
---

# Blackbox Exporter Machine Charm

[Sina P](https://charmhub.io/publisher/sinapahlavan "View all packages from Sina P")

* [Sina P](https://charmhub.io/publisher/sinapahlavan "View all packages from Sina P")

Platform:

26.04

24.04

22.04

20.04

0.28/stable 34

```
juju deploy blackbox-exporter --channel 0.28/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [config\_file](https://charmhub.io/blackbox-exporter/configurations#config_file)
* [probes\_file](https://charmhub.io/blackbox-exporter/configurations#probes_file)

[Learn about configurations >](https://juju.is/docs/juju/configuration#heading--application-configuration)

* config\_file | string

  Supply a configuration file for Blackbox Exporter in which modules and their parameters are specified.
  The provided config file must be a valid YAML and contain a `modules` section.
  If this value is unset, the default below will be used.

  modules:
  http\_2xx:
  prober: http
  timeout: 10s
  tcp\_connect:
  prober: tcp
  timeout: 10s
  icmp:
  prober: icmp
  timeout: 10s
  icmp:
  preferred\_ip\_protocol: "ip4"
  ip\_protocol\_fallback: true

  Automatic connectivity checks require the ICMP module.
  If you need automatic cross-unit connectivity checks, do NOT remove the ICMP module.
  If your ICMP checks require DNS resolution for a target e.g. charmhub.io,
  ensure the parameter `ip_protocol_fallback` is set to `true`.
  Refer to https://github.com/prometheus/blackbox\_exporter/blob/master/CONFIGURATION.md for
  more information.
* probes\_file | string

  Scrape config for Opentelemetry Collector in YAML format. Refer to https://github.com/prometheus/blackbox\_exporter#prometheus-configuration for full details. The scrape jobs defined via this option are added to the self monitoring and, if enabled, automatic cross-unit ICMP connectivity checks. They are then forwarded over relation data to Opentelemetry Collector. Scrape config should follow the upstream format: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape\_config. An example file would be:
  scrape\_configs: - job\_name: check-charmhub-connectivity

  metrics\_path: /probe
  params:
  module: [http\_2xx]
  static\_configs:
  - targets:
  - charmhub.io
  - ubuntu.com

  Ensure your file starts with `scrape_configs`. Separate jobs using different job names. The charm will prepend its principal's hostname to the job name. For example, the job name `check-charmhub-connectivity` will become `<hostname>-check-charmhub-connectivity`. You can provide custom labels under the `labels` section. However, the charm will automatically set the following labels:

  1. source: equal to the name of the principal unit.
  2. source\_hostname: equal to the hostname of the machine hosting the unit.

  Upon changing the config, the provided scrape jobs will be validated. If they are invalid, the charm will be set to Blocked along with a dedicated message and the provided jobs will NOT be forwarded over relation data to Opentelemetry Collector.
  When specifying targets, do NOT include the scheme. That means `charmhub.io` is a valid target, but `https://charmhub.io` is not.
