DEV.co
Open-Source Observability · vozlt

nginx-module-vts

nginx-module-vts is a C-based Nginx module that tracks traffic statistics per virtual host, server, upstream, and filter. It exposes real-time metrics via JSON, HTML dashboard, and Prometheus format, enabling live monitoring similar to Nginx Plus without proprietary licensing.

Source: GitHub — github.com/vozlt/nginx-module-vts
3.5k
GitHub stars
489
Forks
C
Primary language
BSD-2-Clause
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryvozlt/nginx-module-vts
Ownervozlt
Primary languageC
LicenseBSD-2-Clause — OSI-approved
Stars3.5k
Forks489
Open issues44
Latest releasev0.2.5 (2025-12-28)
Last updated2026-05-24
Sourcehttps://github.com/vozlt/nginx-module-vts

What nginx-module-vts is

The module hooks into Nginx request processing to collect traffic data (bytes in/out, request counts, response codes, latency) and maintains shared memory zones for aggregation. It supports traffic limiting, filtering by headers/GeoIP/custom variables, and provides REST control endpoints for zone reset/deletion.

Quickstart

Get the nginx-module-vts source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/vozlt/nginx-module-vts.gitcd nginx-module-vts# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Real-time traffic visibility for multi-tenant Nginx deployments

Monitor per-vhost traffic patterns, identify noisy neighbors, and track per-upstream performance without external observability overhead.

Traffic-based rate limiting and quota enforcement

Implement dynamic rate limits per server, filter, or upstream using configurable traffic thresholds and custom key-based segmentation.

Prometheus integration for time-series monitoring

Export metrics in Prometheus format for integration with Grafana, AlertManager, and existing monitoring stacks without additional agents.

Implementation considerations

  • Requires recompilation of Nginx with `--add-module` flag; integration into CI/CD build pipeline and version pinning strategy mandatory.
  • Shared memory zone sizing (`vhost_traffic_status_zone`) must account for expected cardinality (servers, upstreams, filters); misconfiguration can cause OOM or dropped metrics.
  • Filter and limit directives use string key matching; complex multi-dimensional filtering (e.g., geo + user-agent) requires careful Nginx variable composition to avoid key explosion.
  • Module state is in-memory; design backup/restore strategy if persistent historical data is required (use `vhost_traffic_status_dump` to snapshot).
  • Histogram bucket configuration affects both memory footprint and latency percentile accuracy; default buckets may not suit all SLOs.

When to avoid it — and what to weigh

  • Requires distributed tracing or request-scoped observability — Module tracks aggregate traffic only; no per-request tracing, distributed context propagation, or detailed flame graphs.
  • Need persistent historical analytics across restarts — Statistics are held in shared memory and reset on Nginx reload unless explicitly dumped; no built-in time-series backend integration.
  • Cannot recompile or patch Nginx binary — This is a loadable module requiring source-level integration at compile time; incompatible with pre-built Nginx packages or dynamic module loading on older Nginx versions.
  • Heavy real-time ingestion at >100k req/sec without tuning — Shared memory contention and histogram bucket calculations may impact latency under extreme throughput; requires benchmarking and configuration optimization per workload.

License & commercial use

BSD-2-Clause (BSD 2-Clause Simplified License). Permissive OSI-approved license allowing modification, distribution, and commercial use, with requirement to retain original copyright notice and license text.

BSD-2-Clause permits commercial use and closed-source distribution. No royalties, attribution required in binary or source distribution. Verify internal compliance review for your jurisdiction and use case; no legal opinion provided.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

Module processes HTTP request data (headers, URIs, response codes). Cardinality-based DoS risk if filter keys are derived from untrusted input (e.g., raw query parameters); use `vhost_traffic_status_filter_max_node` to cap filter node count. Control endpoint allows state mutation; restrict to trusted networks. No input sanitization claims found; assume standard Nginx request validation applies. No CVE history stated; requires manual audit or third-party security review.

Alternatives to consider

Nginx Plus (commercial)

Official Nginx traffic monitoring, reporting, and API; supported by F5; no recompilation needed. Trade-off: proprietary licensing, higher cost, vendor lock-in.

ngx_http_stub_status_module (built-in)

Native Nginx module for basic connection and request stats. Trade-off: coarse granularity (no per-vhost, per-upstream, or per-filter data); no JSON or live dashboards.

Prometheus + Nginx exporter (sidecar approach)

External agent scrapes Nginx stub_status or logs; no module recompile needed; flexible metrics definition. Trade-off: additional deployment complexity, agent overhead, and latency sampling vs. in-kernel accuracy.

Software development agency

Build on nginx-module-vts with DEV.co software developers

nginx-module-vts offers real-time per-vhost and per-upstream metrics, Prometheus integration, and traffic-based rate limiting. Our team can help you evaluate, build, and deploy this module into your Nginx infrastructure.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

nginx-module-vts FAQ

Can I use this with a pre-built Nginx package (e.g., from apt, yum)?
Not without recompiling Nginx from source. This is a compile-time module; most distribution packages do not include it. You must build Nginx from source with `--add-module` flag.
Does this module persist metrics across Nginx restart?
No by default. Statistics live in shared memory and are lost on restart. Use `vhost_traffic_status_dump` directive to manually snapshot data to disk, or implement external scraping and storage.
What is the performance impact?
Unknown (not provided in data). Shared memory locking and histogram calculations add overhead; impact varies by request rate, cardinality, and hardware. Recommend benchmarking with realistic load before production deployment.
Can I use this for rate limiting on shared hosting?
Yes, via `vhost_traffic_status_limit` and `vhost_traffic_status_limit_traffic` directives. Filter by host, URI, or custom keys. However, no built-in distributed state sharing; each Nginx process has independent limits.

Custom software development services

Need help beyond evaluating nginx-module-vts? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source observability integrations — and maintain them long-term.

Need live traffic monitoring for Nginx without proprietary licensing?

nginx-module-vts offers real-time per-vhost and per-upstream metrics, Prometheus integration, and traffic-based rate limiting. Our team can help you evaluate, build, and deploy this module into your Nginx infrastructure.