LoginSignup
0
0

More than 5 years have passed since last update.

[blackbird-xfs] blackbird で xfs をモニタリングする

Last updated at Posted at 2014-12-12

ちょっと変わりネタを
ミドルウェアだけじゃなくてこういう使い方もできるよっていう例です

blackbird xfs plugin

この plugin では /proc/fs/xfs/stat から様々な情報を取得し、backend にデータを送信します

xfs1.png
read/write bytes

xfs2.png
read statistics

xfs3.png
transaction&log statistics

xfs4.png
write statistics

こんなグラフが取れるようになります

/proc/fs/xfs/stat の中身はというとこんな感じです

/proc/fs/xfs/stat
extent_alloc 237924 2165708 236223 2146331
abt 0 0 0 0
blk_map 7853715 2395617 465507 235483 252144 10725562 0
bmbt 0 0 0 0
dir 681659 330194 327757 265257
trans 4 3906407 226656
ig 0 145020 0 184316 0 138245 797142
log 15381 529947 883 14762 4527
push_ail 4798418 0 1957554 39739 0 11943 0 334634 0 3197
xstrat 223749 0
rw 3139114 9057686
attr 366943 281834 665204 2
icluster 24257 18636 375003
vnodes 4294689189 0 0 0 278107 278107 278107 0
buf 5725391 21967 5704136 1688 1294 21255 0 28943 5322
abtb2 477443 3347640 23420 23417 0 0 0 0 0 0 0 0 0 0 6300911
abtc2 924783 6545480 462393 462390 0 0 0 0 0 0 0 0 0 0 60569372
bmbt2 479 2767 24 17 0 0 0 0 0 0 0 0 0 0 8
ibt2 851476 7733093 2428 2396 0 0 22874 372 0 0 0 0 0 0 408098
qm 0 0 0 0 0 0 0 0
xpc 8782831616 8104431965 21835555278
debug 0

あまり普段は見ることのない情報だと思いますが、もしかしたらモニタリングしておくと役に立つかもしれません

Install

blackbird 本体

こちらを参考に install してください

Install xfs plugin

setup.py で入れる方法と rpm で入れる方法があります

setup.py で install

git clone https://github.com/Vagrants/blackbird-xfs.git
cd blackbird-xfs
python setup.py install

rpm で install

yum install blackbird-xfs --enablerepo=blackbird

plugin の設定をする

config は /etc/blackbird/conf.d/xfs.cfg にありますが通常は特にいじるところはありません

/etc/blackbird/conf.d/xfs.cfg
[xfs]
module = 'xfs'

監視の間隔は 60 秒がデフォルトですが、変更したい場合は

/etc/blackbird/conf.d/xfs.cfg
interval = 30

のように指定してください

設定が終わったら blackbird を再起動させます

sudo /etc/init.d/blackbird restart

Zabbix 上でデータが入ってきているか確認する

Zabbix の Template は github の repositoryにあります
Zabbix に import して対象のサーバーに適用させて下さい

Zabbix 上の host 名と blackbird が起動しているサーバーの host 名が違う場合は /etc/blackbird/conf.d/xfs.cfg 上で hostname を設定してあげる必要があります
Zabbix 上と合わせてください

/etc/blackbird/conf.d/xfs.cfg
hostname = your_static_hostname

その他

  • 正直 /proc/fs/xfs/stat の値がそれぞれ何を意味しているのか自分なりに kernel 調べたりしたのですが、あまり自信がないです
  • xfs のパフォーマンスやボトルネックを見たい場合にどの値を見ればいいのか、識者の方に教えて頂きたいところです
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0