前提条件
fastpress の AMI で apache 版 もしくは nginx 版のAMI からインスタンスを作成してあること。
monitorixの導入(ユーザー側が有効化の方法)
※apache 版と nginx 版どちらの AMI で作成しても以下の作業は同じですので一緒に記載します。
1.管理者権限になる。
sudo su –
2.monitorix の設定ファイルの名前を変えてコピーする。
cp /etc/monitorix/monitorix.conf.sample /etc/monitorix/monitorix.conf
3.中身を変更する。
MONITORIX_MYSQL_HOST , MONITORIX_MYSQL_USER , MONITORIX_MYSQL_PASS を fastpress.txt に記載の MONITORIX_MYSQL_HOST , MONITORIX_MYSQL_USER , MONITORIX_MYSQL_PASS に記載に書いてある文字列に変えてください。
vim /etc/monitorix/monitorix.conf
・
・
・
#恐らく 501 行目あたりに以下のような部分があるので変更する。(変更内容は fastpress.txt に記載してあります)
<mysql>
conn_type = host
list = __MONITORIX_MYSQL_HOST__
# list = /var/lib/mysql/mysql.sock
<desc>
__MONITORIX_MYSQL_HOST__ = 3306, __MONITORIX_MYSQL_USER__, __MONITORIX_MYSQL_PASS__
</desc>
rigid = 0, 2, 0, 0, 0, 0
limit = 100, 100, 100, 100, 100, 100
</mysql>
・
・
・
サービス再起動
systemctl restart ( httpd or nginx ) mysqld monitorix
あとは http://(IPアドレス):8080/monitorix で飛んでください。
BASIC 認証の ID と パスワードは fastpress.txt に記載の MONITORIX_BASIC_USER , MONITORIX_BASIC_PASS を使用してください。


