Computersnyou

Monitor Linux Server Performance Using Vector

Posted on  10/1/2015

Vector is on host performance Monitoring tool from Netflix , you can use vector to monitor server performance right from your browser . now it’s not very stable but it works most of the time ( at least for me ) . In this tutorial I will show you how to setup vector and other related dependencies to setup awesome monitoring system for your Linux servers .

https://github.com/Netflix/vector
https://github.com/Netflix/vector
https://github.com/Netflix/vector

Installation

Installation is simple , as fully explained in vectors Wiki on github
It Requires , Performance Co Pilot

For Older versions of Ubuntu ( Precise and Trusty ) and other Debian distributions , add key and then add source in your /etc/apt/source.list

curl 'https://bintray.com/user/downloadSubjectPublicKey?username=netflixoss' | sudo apt-key add -

Ubuntu

echo "deb https://dl.bintray.com/netflixoss/ubuntu {codename} main" | sudo tee -a /etc/apt/sources.list

NOTE : change codename of distribution accordingly

Debian ( wheezy )

echo "deb https://dl.bintray.com/netflixoss/debian wheezy main" | sudo tee -a /etc/apt/sources.list

In newer versions PCP is available in main repositories ( Tested on 15.04 )

sudo apt-get update
sudo apt-get install pcp pcp-webapi

for other Linux Distributions see here : https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
You can also build and install PCP from source : See here

Restart PCP daemons and setup Start on boot

sudo update-rc.d pmcd defaults # Starting pmcd on startup
sudo update-rc.d pmwebd defaults # # Starting pmwebd on startup
sudo update-rc.d pmlogger defaults # Starting Logger on startup

sudo service pmcd restart
sudo service pmwebd restart
sudo service pmlogger restart

with systemd

sudo systemctl enable pmcd.service
sudo systemctl enable pmwebd.service
sudo systemctl enable pmlogger.service

Configuration

You can run vector with any simple http server because it’s just a JavaScript based front end application . I will show you how to use with Apache And Nginx Servers as well as python’s simple http server .

Running Vector with Apache And Nginx

cd YOUR_WEB_SERVERS_ROOT_FOLDER
sudo mkdir vector && cd vector
sudo wget https://bintray.com/artifact/download/netflixoss/downloads/1.0.2/vector.tar.gz
sudo tar xvzf vector.tar.gz

and point your browser to http://YOUR_SERVER_IP/vector You will see vectors start screen
additionally you can protect this directory using [Apache Basic Authentication](https://wiki.apache.org/httpd/PasswordBasicAuth)

Running with python SimpleHTTPServer

Just download and extract vector using

mkdir vector && cd vector
wget https://bintray.com/artifact/download/netflixoss/downloads/1.0.2/vector.tar.gz
tar xvzf vector.tar.gz

Then cd in vector directory and start python simplehttpserver

python -m SimpleHTTPServer

Sample Output

alok@userver:~/vector$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...

Now Open Your Browser and point it to http://YOUR_SERVER_IP:8000 , You will see vector start screen , just enter the hostname and port where pmwebd is running

Screen Shot 2015-10-01 at 4.33.24 pm
Screen Shot 2015-10-01 at 4.33.24 pm

Useful Links

http://pcp.io/documentation.html
https://github.com/Netflix/vector


  • Home
  • About