Search
Varnish Custom Statistics

Installation

Released with Varnish Custom Statistics version 6.0.

Overview

Installing Varnish Custom Statistics involves:

  • Installing the vcs software on a server.
  • Installing vcs-agent on your Varnish Enterprise servers.
  • Initial configuration of vcs, and vcs-agent.

After a successful installation vcs’s HTTP interface will be listening on port 6555 on the server. It will also listen for incoming messages from the vcs-agent instances on port 5558.

Installing VCS

In order to install VCS on either Debian/Ubuntu or Redhat Enterprise, you need access to the Varnish Enterprise software repository. Please contact support at support@varnish-software.com for help with this step.

Debian / Ubuntu install

If you are installing on Debian or Ubuntu, use the provided packages in the Varnish Enterprise software repository.

  • Add the Varnish Enterprise repository.

  • Update and install

sudo apt-get update
sudo apt-get install varnish-custom-statistics

After the Varnish Custom Statistics server is installed, you need to install the agent component on each of your Varnish servers. Add the Varnish Enterprise repository to each Varnish server and then update and install:

sudo apt-get update
sudo apt-get install varnish-custom-statistics-agent

Redhat Enterprise Linux install

Currently RPMs for RHEL6 and RHEL7 compatible derivatives are available.

These depend on some packages from the EPEL repository. To make the entire EPEL repository available on your host, follow the [EPEL documentation] (https://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F)

Once EPEL is configured add the Varnish Enterprise yum repository. Please contact support at support@varnish-software.com for help with this step.

Install VCS on a server:

sudo yum update
sudo yum install varnish-custom-statistics

In addition, you might need to configure the firewall to allow incoming traffic to port 6555 and 5558. This is done either by editing the /etc/sysconfig/iptables file or by using the system-config-securitylevel-tui tool.

After the Varnish Custom Statistics server is installed, you need to install the agent component on each of your Varnish servers. Do this by using the same yum repo configuration as you did for the server and then do:

sudo yum update
sudo yum install varnish-custom-statistics-agent

VCS Agent configuration (vcs-agent)

Point the VCS agent to the VCS server. This requires editing the vcs-agent systemd configuration:

sudo systemctl edit vcs-agent

Add the following lines:

[Service]
ExecStart=
ExecStart=/usr/sbin/vcs-agent -d a.b.c.d

Replace a.b.c.d with the IP or hostname of the VCS server.

To enable and start the vcs-agent, you can run the following:

sudo systemctl enable vcs-agent
sudo systemctl start vcs-agent

You can find the full set of the vcs-agent command parameters

For advanced VCL based key configuration, please see Use Cases

VCS configuration (vcs)

vcs is configured by editing its systemd configuration.

By default, vcs will track aggregated statistics in 30 second buckets, with total 15 buckets of history for each key. This gives you 7 minutes of history. These parameters are configurable with the -b and -m parameters, respectively.

To change this to 100 buckets of 30 minutes (2 days of data):

sudo systemctl edit vcs

Write the following lines:

[Service]
ExecStart=
ExecStart=/usr/sbin/vcs -P /var/run/vcs.pid -Z -b 1800 -m 100

Internally, vcs tracks all keys in a hash table. For optimal performance, the size of this table should be at least as large as the number of unique keys you end up tracking. The default size is 20000, and is configurable with the -s parameter.

To enable and start the vcs server, run the following:

sudo systemctl enable vcs
sudo systemctl start vcs

You can find the full set of the vcs command

Getting help

All inquiries can be directed to support@varnish-software.com. We’d be very happy to hear about your VCS usage and any suggestions you might have.


®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203