Are you building up SLI/SLO dashboards or a monitoring solution? Would you like see the effect of a failing or degraded service? Then you can use the probing targets below to simulate these errors to test your monitoring and alerting rules.
The HTTPS endpoint can be configured to either return a 200 OK or a
500 Internal Server error. Blackbox Exporter will return a probe_success = 0
for the latter status code, indicating an error.
Endpoint: | curl -v https://probe.errors.fail/?1CTH1s |
Setting: |
|
Two endpoints are available for your ping
probes. One
endpoint drops ICMP request with a probabilty of 0.5, causing 50%
packet loss.
No artificial packet loss: | ping probe.errors.fail |
50% packet loss: | ping packetloss.errors.fail |
Did you know that Blackbox Exporter returns the number of days until expiry of a TLS/SSL certificate? You can easily build alert rules or dashboards using this information. There is an endpoint available with an expired certificate for you to play with.
Endpoint: | curl -v https://expired.errors.fail |
Your session ID is 1CTH1s. The session uniquely identifies you and is used to store your personal settings. Do not share it with anyone. If you would like to change it, click below to create a new session ID.
Find below sample configuration for Prometheus, Blackbox Exporter and Grafana, as well as the Docker commands required to execute these tools.
modules: http_2xx: prober: http timeout: 5s http: preferred_ip_protocol: ip4
Run Blackbox Exporter with: docker run --rm -d -p 9115:9115 --name blackbox_exporter -v `pwd`:/config prom/blackbox-exporter:master --config.file=/config/blackbox.yml
global: scrape_interval: 15s scrape_timeout: 10s evaluation_interval: 15s alerting: alertmanagers: - static_configs: - targets: [] scheme: http timeout: 10s api_version: v1 scrape_configs: - job_name: prometheus honor_timestamps: true scrape_interval: 15s scrape_timeout: 10s metrics_path: /metrics scheme: http static_configs: - targets: - localhost:9090 - job_name: blackbox metrics_path: /probe params: module: [http_2xx] # Looking for a HTTP 200 response. static_configs: - targets: - https://probe.errors.fail/?1CTH1s relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: host.docker.internal:9115
Run Prometheus with: docker run --name prometheus -v `pwd`/prometheus.yml:/etc/prometheus/prometheus.yml -d -p 9090:9090 prom/prometheus
Run Grafana with: docker run -d --name=grafana -p 3000:3000 grafana/grafana
Then configure Prometheus running on http://host.docker.internal:9090
as data source and configure your dashboard.