さこ街浪漫

GO ON A HIGHWAY

Boundary を入れたメモ

はじめに

Boundary を無償プランでセットアップしてみた。「agent + クラウド」型のモニタリング&ビジュアライゼーションのサービスである。

環境
準備
  • boundary.com にアカウントを作成しておく。
手順

https://premium.boundary.com/home にログインし、[settings] -> [installation] を開くとコマンドが貼ってあるのでこれを実行。(for Linux)

# curl -fsS -d '{"token":"キー文字列"}' -H 'Content-Type: application/json' https://meter.boundary.com/setup_meter > setup_meter.sh && chmod +x setup_meter.sh && ./setup_meter.sh

インストールはあっという間に終わる。

Detected CentOS 6.5...
Checking this is an ec2 environment...no.
Adding repository http://yum.boundary.com/centos/os/6/x86_64/

...

[  OK  ]

The meter has been installed successfully!

chkconfig を見ると boundary-meter というものが追加されている。

[root@xmta ~]# chkconfig
auditd          0:off   1:off   2:on    3:on    4:on    5:on    6:off
blk-availability        0:off   1:on    2:on    3:on    4:on    5:on    6:off
boundary-meter  0:off   1:off   2:off   3:on    4:on    5:on    6:off
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
dovecot         0:off   1:off   2:on    3:on    4:on    5:on    6:off
ip6tables       0:off   1:off   2:on    3:on    4:on    5:on    6:off
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
iscsi           0:off   1:off   2:off   3:on    4:on    5:on    6:off
iscsid          0:off   1:off   2:off   3:on    4:on    5:on    6:off
...

ps。

[root@xmta ~]# ps aux | grep meter
boundary  1506  0.6  1.1 266916 10228 ?        Sl   20:17   0:02 /usr/bin/boundary-meter -b /etc/boundary -I boundary-meter -G
root      1550  0.0  0.1 107456   944 pts/0    S+   20:25   0:00 grep meter

listen しているものはないようだ。

Dashboard を見ると既にモニタリングが始まっている。デフォルトでは下記のようなメトリックがある。CPU や Memory の線が1本なのが腑に落ちないが、そもそも何を表示しているのかを正しく理解する必要がありそうだ。

  • CPU
  • Disk Data Out / Disk Data In
  • Application Response Time
  • Memory Usage
  • Network In / Network Out
  • Application Request Count

f:id:masal3:20141220213509p:plain

おわり。

下はインストールされたもの。

[root@xmta yum.repos.d]# rpm -ql boundary-meter | xargs /bin/ls -lFd --full-time
drwxr-xr-x. 4 root     root        4096 2014-12-20 20:17:39.819519089 +0900 /etc/boundary/
-rw-r--r--. 1 root     root        1675 2014-12-11 23:33:53.000000000 +0900 /etc/boundary/ca.pem
-rwxr-xr-x. 1 root     root        4019 2014-12-11 23:33:53.000000000 +0900 /etc/init.d/boundary-meter*
-rwxr-xr-x. 1 root     root     3210992 2014-12-11 23:33:55.000000000 +0900 /usr/bin/boundary-meter*
-rwxr-xr-x. 1 root     root        1290 2014-12-11 23:33:53.000000000 +0900 /usr/bin/boundary-meter-port-test*
-rwxr-xr-x. 1 root     root        7642 2014-12-11 23:33:53.000000000 +0900 /usr/bin/boundary-meter-provision*
-rwxr-xr-x. 1 root     root        1754 2014-12-11 23:33:53.000000000 +0900 /usr/bin/boundary-meter-update-config*
drwxr-xr-x. 4 boundary boundary    4096 2014-12-20 20:17:36.233879267 +0900 /usr/lib/boundary/
drwxr-xr-x. 2 boundary boundary    4096 2014-12-20 20:17:36.231879470 +0900 /usr/lib/boundary/geoip-db/
-rw-r--r--. 1 boundary boundary  607030 2014-12-11 23:33:51.000000000 +0900 /usr/lib/boundary/geoip-db/GeoIP.dat
-rw-r--r--. 1 boundary boundary 3538767 2014-12-11 23:33:51.000000000 +0900 /usr/lib/boundary/geoip-db/GeoIPASNum.dat
-rw-r--r--. 1 boundary boundary 3754285 2014-12-11 23:33:51.000000000 +0900 /usr/lib/boundary/geoip-db/GeoIPASNumv6.dat
-rw-r--r--. 1 boundary boundary 1117007 2014-12-11 23:33:51.000000000 +0900 /usr/lib/boundary/geoip-db/GeoIPv6.dat
drwxr-xr-x. 2 boundary boundary    4096 2014-12-20 20:17:36.235879065 +0900 /usr/lib/boundary/lua/
-rwxr-xr-x. 1 boundary boundary   23636 2014-12-11 23:33:51.000000000 +0900 /usr/lib/boundary/lua/bbpf-filtering.lua*
-rw-r--r--. 1 root     root        1102 2014-12-11 23:33:51.000000000 +0900 /usr/share/man/man1/boundary-meter.1.gz
補足
  • グラフは直近2分間の状態を切り取って表現しているので、Zabbix、Datadog、New Relic、Mackerel よりも流れが速い。今どういう状態なのかをとにかく早く知りたい、といった用途に向いているのではなかろうか。もちろん過去分も保管されているし、閲覧できる。
  • マウスのホイールで拡大・縮小したり、つまんで左右にドラッグしたり、といった操作が軽快に動く。Boundary のグラフは非常によくできていることは触れておくべきだろう。
  • /etc/yum.repos.d/boundary.repo というファイルが置かれる。
  • 無償プランでも複数のサーバーを登録することができる。
  • 少し前は graphdat というデーモンだったのだが、現在は boundary-meter というものに置き換えられたようだ。
  • custom metric のようなものは調査中。