Prometheus Blackbox Exporter — probes endpoints over HTTP, HTTPS, TCP, DNS, and ICMP and exposes the results for Prometheus (uptime, latency, cert expiry). Deployed as a stateless host-networked Nomad service with a rendered module config. Pairs with the monitoring pack.
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "blackbox-exporter"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The Prometheus Blackbox Exporter image. Pin a tag in production.
image = "prom/blackbox-exporter:latest"
# Host port for the exporter (/probe and /metrics).
port = 9115
# Full blackbox.yml contents (modules). The default provides http_2xx, tcp_connect, and icmp probers — extend it as needed.
config = <<-EOT
modules:
http_2xx:
prober: http
timeout: 5s
http:
preferred_ip_protocol: ip4
tcp_connect:
prober: tcp
timeout: 5s
icmp:
prober: icmp
timeout: 5s
EOT
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources.
resources = {
cpu = 200
memory = 64
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "blackbox-exporter" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "prom/blackbox-exporter:latest" | The Prometheus Blackbox Exporter image. Pin a tag in production. |
| port | number | 9115 | Host port for the exporter (/probe and /metrics). |
| config | string | <<-EOT
modules:
http_2xx:
prober: http
timeout: 5s
http:
preferred_ip_protocol: ip4
tcp_connect:
prober: tcp
timeout: 5s
icmp:
prober: icmp
timeout: 5s
EOT | Full blackbox.yml contents (modules). The default provides http_2xx, tcp_connect, and icmp probers — extend it as needed. |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 200
memory = 64
} | The task resources. |
No variables match.
Prometheus Blackbox Exporter — probes
endpoints over HTTP(S), TCP, DNS, and ICMP and exposes the results for Prometheus to
scrape: uptime, response time, status codes, and TLS cert expiry. Stateless host-networked
Nomad service; pairs with the monitoring pack (and alert via alertmanager).
nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run blackbox-exporter --registry nomploy
Then have Prometheus scrape your targets through it (see the deploy output for the
relabel_configs snippet). Probe directly to test:
curl "http://<node-ip>:9115/probe?target=https://example.com&module=http_2xx"
| Variable | Default | Notes |
|---|---|---|
image |
prom/blackbox-exporter:latest |
Pin a tag in production. |
port |
9115 |
/probe + /metrics. |
config |
http_2xx / tcp_connect / icmp | Full blackbox.yml modules — extend as needed. |
constraints |
[] |
Probes run from the node it lands on — pin accordingly. |
resources |
cpu 200 / mem 64 |
Tiny. |
config variable.