This is the source code for blackbox.o11y.cool, a publicly available Prometheus Blackbox Exporter. The Blackbox Exporter is free to use by everyone but rate limited for fair accessibility.
Point your Prometheus at https://blackbox.o11y.cool/probe and pick a module
based on the response you expect from your target:
| Module | Expects |
|---|---|
http_2xx | Default; any 2xx response |
http_post_2xx | POST variant of http_2xx |
http_3xx | A redirect (does not follow it) |
http_401 | HTTP 401 Unauthorized |
http_403 | HTTP 403 Forbidden |
http_404 | HTTP 404 Not Found |
Example Prometheus scrape config — swap module for any of the above:
scrape_configs:
- job_name: blackboxscheme: httpsmetrics_path: /probeparams:
module: [http_2xx]static_configs:
- targets:
- https://prometheus.io
- https://o11y.coolrelabel_configs:
- source_labels: [__address__]target_label: __param_target
- source_labels: [__param_target]target_label: instance
- target_label: __address__replacement: blackbox.o11y.cool
- target_label: __scheme__replacement: httpsDeploy the following YAML spaghetti to the Kubernetes cluster of your choice.
We utilize envsubst as our poor mans templating engine:
cat <<EOF > secrets.envblackbox_domain=blackbox.o11y.coolratelimit_average=10ratelimit_burst=20ratelimit_period=30sEOF- Deploy namespace
kubectl create namespace o11y-cool- Deploy landing page
kubectl create configmap blackbox-index \
--from-file=index.html=index.html \
-n o11y-cool --dry-run=client -o yaml | kubectl apply -f -- Deploy Blackbox Exporter
set -a;source secrets.env;set +a;
envsubst < manifests/configuration.yaml | kubectl apply -f -
envsubst < manifests/deployment.yaml | kubectl apply -f -