$ luarocks install lua-resty-ngxstatslua-resty-ngxstats is a production-ready NGINX metrics exporter
for OpenResty. It collects connection, request, server zone,
upstream, and cache metrics, outputting them in Prometheus
text exposition format.
Features:
- Prometheus text format with HELP/TYPE comments
- Connection metrics (active, accepted, handled, reading, writing, idle)
- Request metrics (total, current)
- Server zone metrics with response status codes
- HTTP method tracking (GET, POST, etc.)
- Request timing metrics and histograms
- Slow request tracking
- Request size histograms
- SSL/TLS protocol tracking
- Upstream metrics with response times and health gauge
- Cache metrics (hit, miss, bypass, etc.)
- Pre-built Grafana dashboard and Prometheus alerting rules