mackerel

事前準備

# yum install mackerel-agent-plugins
まとめてプラグインをインストール

apache

# cd /etc/httpd/conf/
# cp -p httpd.conf httpd.conf.`date +%Y%m%d`
# vi httpd.conf
--- 下記追記
Listen 1080
ExtendedStatus On
<VirtualHost 127.0.0.1:1080>
 <Location /server-status>
     SetHandler server-status
 </Location>
</VirtualHost>
---
# service httpd configtest
# service httpd graceful
# cd /etc/mackerel-agent/
# cp -p mackerel-agent.conf mackerel-agent.conf.`date +%Y%m%d`
# vi mackerel-agent.conf
--- 下記コメントアウトをアンコメントしてtypeとポートを指定
[plugin.metrics.apache2]
command = "/usr/local/bin/mackerel-plugin-apache2 -p 1080"
type = "metric"
---
# /etc/init.d/mackerel-agent restart
# /usr/local/bin/mackerel-plugin-apache2 -p 1080  <--確認

MySQL

---MySQLでmackerel用のユーザーを追加
mysql> grant all privileges on *.* to mackerel@localhost identified by 'パスワード';
mysql> flush privileges;
# cd /etc/mackerel-agent/
# cp -p mackerel-agent.conf mackerel-agent.conf.`date +%Y%m%d`
# vi mackerel-agent.conf
--- 下記をアンコメントして、ユーザー名とパスワードを追記、typeを指定
[plugin.metrics.mysql]
command = "/usr/local/bin/mackerel-plugin-mysql -username=mackerel -password=パスワード"
type="metric"
---
# /etc/init.d/mackerel-agent restart


以上でmackerelのダッシュボード上に、customのロールが増えているのが確認できる。

参考URL:http://youngforever.hatenablog.com/entry/2015/02/22/223131


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2022-06-30 (木) 01:40:11