hitspec exposes a Prometheus-compatible metrics endpoint during stress tests, allowing you to scrape metrics into Prometheus and visualize them in Grafana.
Setup
Metrics are available at http://localhost:9090/metrics while the stress test runs. The endpoint listens on 127.0.0.1 only. To let a Prometheus server on another machine scrape it, bind another interface with --metrics-host 0.0.0.0 (env: HITSPEC_METRICS_HOST); the metrics are not authenticated, so expose them only on a trusted network. The numbers are updated every second during the run, so a scrape in the middle of a test sees the current totals, not zeros.
Prometheus Configuration
Add hitspec as a scrape target in your prometheus.yml:
Available Metrics
Custom Port
Environment variables: HITSPEC_METRICS_PORT, HITSPEC_METRICS_HOST Last modified on October 19, 2026