In order to get started, you should first install Performance Co-Pilot (PCP) on each host you plan to monitor. PCP will collect the metrics and make them available for Vector. The pmcd and pmwebd services need to be running on each host, the latter of which needs to expose its tcp/44323 network port.

Optional monitoring agents can also be installed in order to collect specific metrics that are not supported by PCP’s system agent.

Once PCP is installed, you should be able to run Vector and connect to the target host.

Performance Co-Pilot (PCP)

Vector depends on Performance Co-Pilot (PCP) to collect metrics on each host you plan to monitor.

Since Vector depends on version 3.10 or higher, the packages currently available on most Linux distro repositories would not suffice. Until newer versions are available in the repositories, you should be able to install PCP from binary packages made available by the PCP development team on:

ftp.pcp.io

Or build it from source. To do so, get the current version of the source code:

$ git clone git://git.pcp.io/pcp

Then build and install:

$ cd pcp

$ ./configure — prefix=/usr — sysconfdir=/etc — localstatedir=/var

$ make

$ sudo make install

More information on how to install Performance Co-Pilot can be found at:

http://pcp.io/docs/installation.html#src

Vector

Vector is a static web application that runs inside the client’s browser. It can run locally or deployed to any HTTP server available, like Apache or Nginx.

To run in locally, first clone the repo:

Make sure you have Bower installed on your system. Bower is a package management system for client-side programming, optimized for the front-end development.

http://bower.io/#getting-started

And install all dependencies:

$ cd vector

$ bower install

You can run Vector with Gulp. Gulp is an automated task runner and includes a development web server with live reload. In order to start Gulp’s web server, first make sure you have Gulp installed on your system:

https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md

Then, install all dependencies and execute the default Gulp task:

$ npm install

$ gulp

You can also run Vector with Python’s SimpleHTTPServer:

$ cd vector/app

$ python -m SimpleHTTPServer 8080

Then open Vector on your browser:

And enter the hostname from the server you plan on monitoring. That’s it!

Widgets & Dashboards

Vector’s UI is based on dashboards and widgets. You can have one dashboard per browser tab/window. Dashboards are completely configurable and can have multiple widgets. Currentl.y there are no limits on the amount of widgets a dashboard can contain, but real-time rendering of multiple charts can consume a significant amount of CPU and slow down the application. Currently, changes made to dashboards are not persisted.

Window & Interval

Vector’s UI aims to be extremely simple. Besides the hostname, there are only two configuration options, window and interval. The window option allows the user to select the rolling window size, represented in minutes, for all widgets in a dashboard. The interval option allows the user to select the metric polling interval, represented in seconds. If you have many widgets in a dashboard and the application starts to show signs of slowness, you should be able to decrease the window size and/or increase the interval to reduce CPU utilization.

Dashboards & Widgets

Vector comes with a predefined set of widgets and dashboards that can be easily extended. Here is a short list of metrics available by default.

CPU

Load Average

Runnable

CPU Utilization

Per-CPU Utilization

Context Switches

Memory

Memory Utilization

Page Faults

Disk

Disk IOPS

Disk Throughput

Disk Utilization

Disk Latency

Network

Network Drops

TCP Retransmits

TCP Connections

Network Throughput

Network Packets

Currently, there are only two pre-configured dashboards on Vector. The “default” dashboard, with a set commonly used widgets, and an empty dashboard. To change dashboards, click on the “widget” drop-down menu and select the desired dashboard.

Next Steps

More widgets and dashboards

User-defined dashboards

Metric snapshots

CPU Flame Graphs

Disk Latency Heat Maps

Integration with Servo

Support for Cassandra

Conclusion

Observability is key to understanding how an application behaves under certain conditions and is paramount to successfully troubleshoot any performance issue. Vector allows us to closely monitor hosts in near real-time and easily correlate metrics, making them accessible to every engineer, simplifying the process of troubleshooting issues. It proved to be an invaluable tool to help us achieve great performance and we plan to continue building and improving it!

You can find Vector on GitHub and on netflix.github.io!