nginx-module-vts

Nginx virtual host traffic status module

What is nginx-module-vts?

Nginx virtual host traffic status module

Overview of nginx-module-vts

What it is

nginx-module-vts is an open-source Nginx module that provides virtual host traffic status information. It exposes current status data for servers, upstreams, and caches, similar to the live activity monitoring available in Nginx Plus. The module can output data in JSON, HTML, JSONP, or Prometheus format, and includes a built-in HTML dashboard. It is licensed under BSD-2-Clause and is categorized under Monitoring.

Key features

  • Provides real-time traffic statistics per virtual host, including request count, bytes in/out, and response status code breakdowns (1xx–5xx, cache hit/miss, etc.).
  • Supports filtering traffic by custom keys (e.g., country, user agent, storage volume) via the vhost_traffic_status_filter directive.
  • Allows traffic limiting per server, filter, or upstream using vhost_traffic_status_limit and related directives.
  • Offers on-the-fly control to reset or delete traffic zones through a query string endpoint (/status/control).
  • Exports data in multiple formats: JSON, HTML (built-in dashboard), JSONP, and Prometheus.
  • Includes histogram buckets for request latency distribution and supports average method configuration.
  • Can be built with Profile-Guided Optimization (PGO) using gcc -fprofile options.

Use cases

  • Monitoring traffic for individual virtual hosts on an Nginx server.
  • Calculating traffic per country using GeoIP data.
  • Tracking traffic per storage volume or per user agent.
  • Detailed HTTP status code analysis (e.g., counting 4xx/5xx per server).
  • Dynamic DNS traffic accounting.
  • Excluding status page traffic from statistics.
  • Maintaining persistent statistics data across Nginx reloads or restarts using the dump feature.

Getting started

  1. Clone the repository:shell> git clone git://github.com/vozlt/nginx-module-vts.git2. Add the module to the Nginx build configuration:--add-module=/path/to/nginx-module-vts3. Build and install the Nginx binary.4. In the Nginx configuration, enable the module with vhost_traffic_status_zone; in the http block, and set up a location for the status display:location /status { vhost_traffic_status_display; vhost_traffic_status_display_format html;}

License and pricing

The license is BSD-2-Clause. The module is open source and free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/vozltnginx-module-vts.svg)](https://yunodb.com/tools/vozltnginx-module-vts?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/vozltnginx-module-vts?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/vozltnginx-module-vts.svg" alt="Featured on YunoDB" height="20"></a>