<!-- review: finished -->

<a id="external-vts"></a>

# VTS

This is a set of modules for traffic tracking and real-time activity monitoring. It provides access to information about the status of virtual hosts, upstreams, caches, and also includes ready-made HTML templates to visualize statistics.

<a id="installation-31"></a>

## Installation

To [install](https://en.angie.software//angie/docs/installation/index.md#install-packages) the module, use one of the following packages:

- Angie: `angie-module-vts`
- Angie PRO: `angie-pro-module-vts`

<a id="loading-modules-1"></a>

## Loading Modules

Loading the modules in the `main{}` context:

```nginx
load_module modules/ngx_http_stream_server_traffic_status_module.so;
load_module modules/ngx_http_vhost_traffic_status_module.so;
load_module modules/ngx_stream_server_traffic_status_module.so;
```

<a id="preparing-for-demonstration-2"></a>

## Preparing for Demonstration

HTML page templates are installed in the `/usr/share/angie-module-vts/` directory:

- `/usr/share/angie-module-vts/status.compress.html`
- `/usr/share/angie-module-vts/status.template.html`
- `/usr/share/angie-module-vts/stream/status.compress.html`
- `/usr/share/angie-module-vts/stream/status.template.html`

To work with the configuration example below, you need to:

1. Copy `/usr/share/angie-module-vts/status.template.html` to
   `/usr/share/angie-module-vts/status.html`:
   ```console
   cp /usr/share/angie-module-vts/status.template.html \
      /usr/share/angie-module-vts/status.html
   ```
2. In the `/usr/share/angie-module-vts/status.html` file, find the line:
   ```html
   var vtsStatusURI = "{{uri}}/format/json", vtsUpdateInterval = 1000;
   ```

   and replace ` *{uri*}` with `/status`.

<a id="configuration-example-105"></a>

## Configuration Example

```nginx
http {
    # ...
    vhost_traffic_status_zone;

    server {
        listen 80;
        server_name localhost;

        root  /usr/share/angie/html;
        index index.html index.htm;

        location = /status.html {
            root  /usr/share/angie-module-vts;
        }

        location /status {
            vhost_traffic_status_display;
            vhost_traffic_status_display_format html;
        }
    }
}
```

<a id="additional-information-32"></a>

## Additional Information

Detailed documentation and source code are available at:
[https://github.com/vozlt/nginx-module-vts](https://github.com/vozlt/nginx-module-vts).
