6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

New RelicのMySQL PluginをUbuntuに導入する

Posted at

image
(wikipediaより)

今回は、MySQL PluginをUbuntuに導入します。

参考URL

インストール手順

以下を、rootになり実行します。

Javaのインストール

最初に、Javaが必要なので、インストールします。

sudo apt-get install default-jre

インストールできたらバージョンを確かめます。
# java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

New Relic Plugin Installerのインストール

次に、New Relic Pluginのインストールプラットフォームである、NPI(New Relic Platform Installer)を導入します。

YOUR_KEY_HEREの部分は適宜変えてください。

LICENSE_KEY=YOUR_KEY_HERE bash -c "$(curl -sSL https://download.newrelic.com/npi/release/install-npi-linux-debian-x64.sh)"

~/ にインストールされるので、移動する
cd ~/newrelic-npi

MySQL Pluginのインストール

./npi install com.newrelic.plugins.mysql.instance

途中で設定ファイルを編集するかときかれるので、はいと答え、以下のように編集する。
metricsを以下のように書き換えるととれる指標が増えて便利。

{
  "agents": [
    {
      "name"    : "すきな名前",
      "host"    : "DBのホスト名",
      "metrics" : "status,newrelic,master,buffer_pool_stats,innodb_status,innodb_metrics",
      "user"    : "DBのユーザ名",
      "passwd"  : "DBのパスワード"
    }
  ]
}

その他、全部、はいと答えておけばいい。

インストールされたか確認

数分たってから、New RelicのWeb画面から、PLUGINS => MySQL に行き、各種グラフが出ていれば完了。

6
6
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
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?