NetflixのVectorを試してみる
Introducing Vector: Netflix's On-Host Performance Monitoring Tool と記事を見かけたので、どんなものか試してみた。
試した環境は、Amazon Linux 2015.03 です
監視対象ホストの準備
メトリックスの収集にPerformance Co-Pilot (PCP)を利用するので、これをインストールします。
コンパイル用のライブラリを一括で入れる
sudo yum -y groupinstall "Development Tools"z
libmicrohttpdを利用するので入れる
sudo yum -y install libmicrohttpd libmicrohttpd-devel
ExtUtils::MakeMakerを利用するので入れる
sudo yum -y install perl-ExtUtils-MakeMaker
pcpをソースからインストール
# 事前にユーザーを作成 sudo groupadd -r pcp sudo useradd -c "Performance Co-Pilot" -g pcp -d /var/lib/pcp -M -r -s /usr/sbin/nologin pcp git clone git://git.pcp.io/pcp cd pcp/ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-webapi make sudo make install
何故かエラーになる
sudo service pmcd start Rebuilding PMNS ... pmnsmerge: error while loading shared libraries: libpcp.so.3: cannot open shared object file: No such file or directory Rebuilding the Performance Metrics Name Space (PMNS) in /var/lib/pcp/pmns ... Rebuild: PCP upgrade processing for "root" PMNS changes ... Rebuild: merging the following PMNS files: root root_jbd2 root_linux root_mmv root_pmcd root_proc root_root root_xfs Rebuild: pmnsmerge failed "root" has not been changed. failed (status=1) Starting pmcd ... /usr/libexec/pcp/bin/pmcd: error while loading shared libraries: libpcp_pmda.so.3: cannot open shared object file: No such file or directory pmcd_wait: error while loading shared libraries: libpcp.so.3: cannot open shared object file: No such file or directory /usr/libexec/pcp/bin/pmpost: error while loading shared libraries: libpcp.so.3: cannot open shared object file: No such file or directory /etc/init.d/pmcd: pmcd_wait failed: exit status: 127 /usr/libexec/pcp/bin/pmpost: error while loading shared libraries: libpcp.so.3: cannot open shared object file: No such file or directory
http-parser が必要っぽいので入れる
sudo yum -y install http-parser
サービスを起動
sudo service pmcd start sudo service pmwebd start
vectorのインストール
vectorのインストールにはbowerを使うのだが、bowerにインストールにはnpmが必要となるので、インストールしていきます。
sudo yum -y install npm --enablerepo=epel sudo npm install -g bower sudo npm install -g gulp
vector本体をインストール&起動
git clone https://github.com/Netflix/vector.git cd vector/ git checkout stable bower install cd app sudo python -m SimpleHTTPServer 80
勝手な思い込みで、複数ホストのメトリックスをいい感じにダッシュボードに表示してくれるものなのかと思ってたら、ちょっと違った。