An exporter can be reachable while the endpoint it probes is unavailable. In Grafana 13, a dashboard built from Prometheus blackbox exporter metrics puts the latest probe result beside a graph of probe duration, separating endpoint failures from slow responses.

The probe_success metric reports 1 when the configured probe succeeds and 0 when it fails. An instant query shows the latest available result, while a range query of probe_duration_seconds shows how probe time changes. Missing data is a separate condition and must not be read as a successful probe.

The starting screen is Dashboards in a signed-in Grafana session with permission to create dashboards. Prometheus is the default data source and already contains blackbox probe series. Dashboard queries read those stored metrics; they do not configure the exporter or make Grafana probe the endpoints itself.

Steps to build a Grafana dashboard from Prometheus blackbox exporter metrics:

  1. Click New on the Dashboards page.
  2. Choose New dashboard.
  3. Click the Panel tile in the Add sidebar.

    The selected Auto grid layout arranges panels as the browser width changes.

  4. Enter Probe success in the panel's Title field.
  5. Click Configure visualization.
  6. Select Code in the Prometheus query editor.

    The Data source field identifies the Prometheus server whose metrics the panel reads.

  7. Enter the probe success expression in query A.
    probe_success{job="blackbox"}

    The matcher assumes the scrape job is named blackbox. A different job name needs the corresponding label value in both panel queries. An additional instance matcher can restrict the dashboard to one endpoint.

  8. Open All visualizations.
  9. Choose Stat.
  10. Click Run queries to preview the probe result.

    A reachable endpoint whose probe passes returns 1; a failed probe returns 0. No data means the query has no matching samples in the selected period, rather than a probe result.
    Related: How to troubleshoot a Grafana panel with no data

  11. Set Color mode under Stat styles to None.

    The default numeric thresholds can color both 0 and 1 green, so the uncolored value avoids presenting a failed probe as healthy.

  12. Expand Options beneath query A.
  13. Set the query Type to Instant.

    An instant query uses the dashboard's end time. With a relative range ending at now, the Stat shows the latest sample still available to Prometheus instead of the last nonempty value anywhere in a long history.

  14. Click Back to return to the dashboard.
  15. Select the Probe success panel.
  16. Click Duplicate in the Panel sidebar.
  17. Replace the duplicated panel's Title with Probe duration (seconds).
  18. Click Edit visualization for the duplicated panel.
  19. Replace query A with the probe duration expression.
    probe_duration_seconds{job="blackbox"}

    This gauge measures the time spent completing the probe, in seconds. It is not a counter, so it does not need rate().

  20. Expand Options beneath the duration query.
  21. Set the duration query's Type to Range.

    The duplicate inherits Instant from the success panel; Range supplies the samples needed for a history graph.

  22. Click Change beside the visualization name.
  23. Choose Time series.
  24. Click Run queries to display the duration history.

    The graph's values are seconds, as named in the panel title. A value of 0.002 represents two milliseconds. Higher values mean a longer probe, but duration alone does not establish whether it succeeded.

  25. Click Back to keep the duration panel on the dashboard.
  26. Open Dashboard settings using the gear in the right sidebar.
  27. Set Min column width under Layout to Narrow.

    This lets the two panels sit side by side on a desktop browser while retaining the automatic layout on smaller screens.

  28. Select Last 15 minutes from the dashboard time range menu.

    A short recent range makes newly collected duration samples easier to see. Refresh requests fresh data; automatic refresh, if enabled, need not be faster than the Prometheus scrape interval.

  29. Click Save above the dashboard.
  30. Enter Blackbox probe dashboard in the save dialog's Title field.
  31. Click Save in the dialog.
  32. Reload the saved dashboard using the browser's reload button.
  33. Confirm that the reopened dashboard shows the probe result and recent duration samples.

    The saved title and both panels should remain after reloading. A passing probe shows 1 and a failed probe shows 0; the duration chart should contain recent samples rather than No data. A missing result needs a query, time range, or scrape check before the endpoint can be called healthy.
    Related: How to troubleshoot a Grafana panel with no data

Share this guide