Skip to main content

Prometheus metrics

When running the SolidInvoice distribution package (single binary), you can expose a Prometheus-compatible metrics endpoint that reports Caddy HTTP metrics and FrankenPHP worker and thread statistics.

info

Prometheus metrics are only available with the distribution package (the solidinvoice single binary). Docker and Helm deployments do not expose this endpoint by default.

Enable metricsโ€‹

Pass --enable-metrics to the run command:

solidinvoice run --enable-metrics

The metrics endpoint starts on port 9090 by default. SolidInvoice prints a note at startup confirming the address:

Metrics: Prometheus metrics available at http://localhost:9090/metrics

Change the metrics portโ€‹

Use --metrics-port to listen on a different port:

solidinvoice run --enable-metrics --metrics-port 9100

Configure Prometheus to scrapeโ€‹

Add a scrape job to your prometheus.yml:

scrape_configs:
- job_name: solidinvoice
static_configs:
- targets:
- localhost:9090

Replace localhost with the host or IP where SolidInvoice is running, and adjust the port if you used --metrics-port.

What's exposedโ€‹

The /metrics endpoint reports standard Caddy HTTP server metrics (request counts, response sizes, latencies by status code and route) and FrankenPHP worker and thread pool statistics (active workers, idle threads, PHP execution times).