vozlt/nginx-module-vts logo

vozlt/nginx-module-vts

Free

Nginx virtual host traffic status module

FreeFree tier
Type
Open Source

About vozlt/nginx-module-vts

Nginx virtual host traffic status module that provides real-time traffic monitoring and statistics for Nginx servers. It offers per-zone metrics including request counts, response times, status codes, and traffic volume, accessible via JSON or HTML endpoints. The module supports dynamic control of traffic zones (get, reset, delete) without restarting Nginx, traffic limiting per server/filter/upstream, histogram bucketing for latency distribution, and a React-based dashboard for visualization. It is widely compatible with Nginx versions from 1.4.x to 1.30.x and can be installed by compiling Nginx with the module source.

Key Features

Per-zone traffic statistics (requests, response times, status codes, volume)
JSON and HTML output for status data
Dynamic control: get, reset, or delete traffic zones on the fly
Traffic limiting for server, filter, and upstream contexts
Histogram buckets for latency distribution analysis
React-based dashboard for visual monitoring
Support for GeoIP, storage volume, user agent, and dynamic DNS use cases
Compatible with Nginx versions from 1.4.x to 1.30.x

Pros & Cons

Pros
  • Lightweight and plugin-based, no external dependencies
  • Provides granular per-zone statistics with minimal overhead
  • Dynamic control endpoints enable live management without server restart
  • Supports a wide range of Nginx versions (1.4 to 1.30)
  • Includes a ready-to-use React dashboard for visualization
  • Actively maintained with frequent releases
Cons
  • Requires compiling Nginx from source with the module
  • Not available as a pre-built dynamic module for most distributions
  • Limited to Nginx servers only; not standalone
  • May introduce additional memory usage for large numbers of zones

Best For

Monitor traffic per virtual host or locationCalculate traffic by country using GeoIPTrack traffic per storage volume or diskAnalyze traffic by user agent or device typeObtain detailed HTTP status code statisticsMonitor traffic for dynamic DNS setupsExclude status page traffic from statisticsPersist statistics data across reloads

FAQ

How do I install nginx-module-vts?
Clone the repository, add --add-module=/path/to/nginx-module-vts to your Nginx build configuration, then build and install Nginx. Optionally, you can use Profile-Guided Optimization (PGO) for better performance.
Which Nginx versions are compatible?
The module has been tested with Nginx versions from 1.4.x to 1.30.x, including 1.6, 1.8, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.18, 1.19, 1.22, 1.27, and 1.30. Earlier versions are not tested.
Can I reset traffic statistics without restarting Nginx?
Yes, the module provides a control interface that allows you to reset traffic zones on the fly using HTTP requests, without restarting Nginx.
What output formats are supported?
The module supports JSON and HTML formats for displaying traffic status. The output format is configured via the vhost_traffic_status_display_format directive.
Is there a built-in dashboard?
Yes, the repository includes a React-based dashboard that can be used to visualize the traffic statistics.