normalian blog

Let's talk about Microsoft Azure, ASP.NET and Java!

Azure AD ドメインサービスを利用して Windows も Linux もドメイン参加させてみる - その1 ~まずはドメインサービスの有効化~

はじめに

Azure Active Directory には様々な機能があるが、特に Azure Active Directory ドメイン サービスクラウド上の PaaS としてドメインコントローラを利用できる便利な機能だ。現状(2016年12月現在)では以下の制約があるが、PoC 等で利用する場合には非常に有用であるため、

  • 東日本・西日本にデプロイできない。VPN 機能等を利用して東日本・西日本側の仮想ネットワークと連携する必要がある
  • Azure Resource Manager モードの仮想ネットワークに接続できない。Azure Resource Manager モードのリソースと連携するには VNET Peering 等を利用する必要がある

今回は以下の記事に記載してある内容の踏襲だが、参考になれば幸いだ。
docs.microsoft.com

セットアップしてみる

まずは以下の様に「仮想ネットワーク(クラシック)」を作成する。この際に「東アジア」で作成し、東日本・西日本で作成していない点に注意してほしい。
f:id:waritohutsu:20161219005118p:plain

次にクラシックポータル側に移動し、メニューから「APP SERVICES - ACTIVE DIRECTORY - ディレクトリ - カスタム作成」を選択し、以下の様に新しいドメインを作成する。この際に「国・リージョン」は日本で作成しても問題ないが、B2C ディレクトリは利用してはいけないのを注意してほしい。
f:id:waritohutsu:20161219005537p:plain

次にクラシックポータルポータルにて作成したディレクトリに移動して「構成」タブを選択し、以下の様にドメインサービスを有効化した後にドメインサービスに接続する仮想ネットワークを選択する。この際、仮想ネットワークを東日本・西日本に作成しているとドメインサービスに接続できないので注意が必要だ。
f:id:waritohutsu:20161219010332p:plain

更に、ドメイン参加向けのユーザを登録する。Azure AD ドメインサービスにドメイン参加するは「AAD DC Administrator」というグループを作成し、ユーザを登録する必要がある。Power BI 向けの組織アカウントをお手軽に作ってみる を参考に組織ユーザを作成し、以下の様に「AAD DC Administrator」グループを作成してこちらにユーザを登録する。
f:id:waritohutsu:20161223235800p:plain

次回以降

ドメインに参加した後、以下の様に IP アドレスが割り当てられる。こちらを当該仮想ネットワークの DNS サーバに割り当てる IP アドレスとして利用していく。

次回以降で実際に Windows Server や Linux サーバをドメインに参加する手順を記載していく。

Azure AD へサービス プリンシパル認証をさせるための簡単な azure-cli 向けスクリプト

自分の備忘録となるが、Microsoft Azure のリソースを操作する場合は Azure リソース マネージャーでのサービス プリンシパルの認証 に記載されている内容を一通り租借をしなければならない。
既に PowerShell 版は Azure AD へサービス プリンシパル認証をさせるための簡単な PowerShell スクリプト で記載したが、azure-cli 版がなかったので備忘録として記載しておく。

# Azure Resource Manager モードに設定
$ azure config mode arm

# ログイン
$ azure login

# サービスプリンシパルを作成し、結果から Object Id を取得する
$ azure ad sp create -n <your app name. e.g.: mylinuxexampleapp> --home-page <your home-page name. e.g.: http://normalianmylinuxapp.azurewebsite.net> --identifier-uris <your identifier-uris name. e.g.: http://normalianmylinuxapp.azurewebsite.net> -p <your password>
info:    Executing command ad sp create
+ Creating application <your app name. e.g.: mylinuxexampleapp>
+ Creating service principal for application <your application-id>
data:    Object Id:               <your object-id>
data:    Display Name:            <your app name. e.g.: mylinuxexampleapp>
data:    Service Principal Names:
data:                             <your application-id>
data:                             <your identifier-uris name. e.g.: http://normalianmylinuxapp.azurewebsite.net>
info:    ad sp create command OK


# 取得した Object Id からロールアサインを作成する。この際、Reader 権限だと仮想マシンの作成等ができないので注意
$ azure role assignment create --objectId <your object-id> -o Owner -c /subscriptions/<your subscriptionid>/
info:    Executing command role assignment create
+ Finding role with specified name
/data:    RoleAssignmentId     : /subscriptions/<your subscriptionid>/providers/Microsoft.Authorization/roleAssignments/<your role assignment id>
data:    RoleDefinitionName   : Owner
data:    RoleDefinitionId     : <role definition id>
data:    Scope                : /subscriptions/<your subscriptionid>
data:    Display Name         : <your app name. e.g.: mylinuxexampleapp>
data:    SignInName           : undefined
data:    ObjectId             : <your object-id>
data:    ObjectType           : ServicePrincipal
data:
+
info:    role assignment create command OK


# サブスクリプションの情報一覧を取得する
$ azure account list
info:    Executing command account list
data:    Name                      Id                                    Current  State
data:    -------------------       ------------------------------------  -------  -------
data:    <your subscription name>  <your subscriptionid>                 true     Enabled
info:    account list command OK


# サブスクリプション一覧から特定のサブスクリプション情報を取得し、Tenant ID を取得する
$ azure account show <your subscriptionid>
info:    Executing command account show
data:    Name                        : <your subscription name>
data:    ID                          : <your subscriptionid>
data:    State                       : Enabled
data:    Tenant ID                   : <tenant-id>
data:    Is Default                  : true
data:    Environment                 : AzureCloud
data:    Has Certificate             : No
data:    Has Access Token            : Yes
data:    User name                   : my-mail-address@hotmail.com
data:
info:    account show command OK

# 作成済のサービスプリンシパルでログインする
$ azure login -u <your identifier-uris name. e.g.: http://normalianmylinuxapp.azurewebsite.net> --service-principal --tenant <tenant-id> -p <your password>

ご参考までに。

参考

詳細な情報を知りたい場合は以下のリンクを参考にしてほしい。

Azure AD へサービス プリンシパル認証をさせるための簡単な PowerShell スクリプト

今回はほぼ自分の備忘録としての記載となるが、Azure ARM SDK 等のアプリケーションから Microsoft Azure のリソースを操作する場合は Azure リソース マネージャーでのサービス プリンシパルの認証 に記載されている内容を一通り租借をしなければならない。

上記の記事における「パスワードで認証する: PowerShell」については、以下の PowerShell スクリプトを利用することでサービスプリンシパル認証が可能な情報を取得できる。

# ログイン
Login-AzureRmAccount

# 利用するサブスクリプションを確認
Get-AzureRmSubscription

# 利用するサブスクリプションを選択
$subscriptionId = 'your subscription id'
Select-AzureRmSubscription -SubscriptionId $subscriptionId

$displayName = 'your app name'
$homePage = 'your home page url'
$identifierUris = 'your identifier url'
$password = 'your password'

# Azure AD にアプリケーション オブジェクトを作成
$azureAdApplication = New-AzureRmADApplication -DisplayName $displayName -HomePage $homePage -IdentifierUris $identifierUris -Password $password

# サービスプリンシパル オブジェクトを作成
New-AzureRmADServicePrincipal -ApplicationId $azureAdApplication.ApplicationId

# サービス プリンシパル に権限を割り当て
New-AzureRmRoleAssignment -RoleDefinitionName Owner -ServicePrincipalName $azureAdApplication.ApplicationId

# アプリで使えるようにするため、サービス プリンシパルとしてログインする
$cred = Get-Credential # $azureAdApplication.ApplicationId/$password での認証情報を作成 
$subscription = Get-AzureRmSubscription -SubscriptionId $subscriptionId
Login-AzureRmAccount -Credential $cred -ServicePrincipal -TenantId $subscription.TenantId

# 以下の 4つの情報があれば SDK 等のアプリで利用可能
## subscription-id
$subscription.SubscriptionId

## tenant-id
$subscription.TenantId

## client-id
$azureAdApplication.ApplicationId

## secret
$password


上記の情報を利用して、Azure ARM SDK for Java で以下の様なコードが記述可能だ。

package org.mydomain.armsdksample;

import java.util.List;

import com.microsoft.azure.credentials.ApplicationTokenCredentials;
import com.microsoft.azure.credentials.AzureEnvironment;
import com.microsoft.azure.management.resources.ResourceManagementClient;
import com.microsoft.azure.management.resources.ResourceManagementClientImpl;
import com.microsoft.azure.management.resources.models.ResourceGroup;

public class Main {
	final static String subscriptionId = "your subscription id";
	final static String clientId = "your client id";
	final static String tenantId = "your tenant id";
	final static String secret = "your password";

	public static void main(String[] args) throws Exception {

		ResourceManagementClient client = new ResourceManagementClientImpl(
				new ApplicationTokenCredentials(clientId, tenantId, secret, AzureEnvironment.AZURE));
		client.setSubscriptionId(subscriptionId);

		List<ResourceGroup> rgList = client.getResourceGroupsOperations().list(null, null).getBody();
		for (ResourceGroup rg : rgList) {
			System.out.println(rg.getId());
		}

		System.out.println("end");
	}
}

備忘録に等しいが、ご参考までに。

Application Insights を Java のコンソールアプリで利用する

Application Insights のドキュメントを確認すると Web アプリでの利用が多いが、実はコンソールアプリケーションでも利用可能なことをご存じだろうか?
今回は Java コンソールアプリで Application Insights で利用する方法を紹介する。すでに Github にて Console App で Appinsights 利用するサンプル として公開中なので、必要な方は確認してほしい。

Application Insights をコンソールアプリで利用する場合の TIPS

まずはソースコードを見てほしい。

package com.mydomain.appinsightsconsole;

import com.microsoft.applicationinsights.TelemetryClient;
import com.microsoft.applicationinsights.TelemetryConfiguration;

public class App {
	public static void main(String[] args) {
		// Application Insights の設定を有効化
		TelemetryConfiguration configuration = TelemetryConfiguration.getActive();
		TelemetryClient telemetryClient = new TelemetryClient(configuration);

		telemetryClient.trackTrace("コンソールアプリからのトレースメッセージ");
		telemetryClient.trackException(new RuntimeException("コンソールアプリの自作例外"), null, null);

		// 最後に flush しないとリクエストがメモリ上に滞留したままアプリが終了する
		telemetryClient.flush();

		System.out.println("end");
	}
}

重要なのは以下の点だ。

  • TelemetryClient インスタンス作成前に TelemetryConfiguration#getActive() メソッドを呼び出して設定を有効化する
  • アプリケーション終了前に TelemetryClient#flush() メソッドを呼ぶこと

うまく動けば以下のように管理ポータル上に情報が即座に反映されるはずだ。
f:id:waritohutsu:20160324175238p:plain

Azure Toolkit for Eclipse の2016/3/6 更新と Maven プロジェクトを WebApps にデプロイする方法

2016年3月7日に Azure Toolkit for Eclipse がリリースされた。主なインストール手順は Azure Toolkit for Eclipse のインストール に記載があるので詳細は不要だと認識してるが、同更新での主な追加機能は以下となる。

  • Java の Web アプリ( Tomcat or Jetty で動くアプリ )を Azure Web Apps にデプロイできる!
  • ② Azure Explorer ビューを利用して WebApps の操作ができる!
  • クラウドサービスにデプロイ向けの Tomcat, Jetty, Zulu OpenJDK がサポートするバージョンを更新

上記の機能を簡単に紹介しよう。

① Azure Web Apps へのデプロイ

ずっとクラウドサービスにしかデプロイできなかったので悲しい気持ちになっていたが、ようやく WebApps のデプロイが可能になった。「Dynamic Web Project」形式で新規作成したプロジェクトに対し、右クリックのメニューから Azure - Plublish as Azure Web App... を選択することでデプロイ可能だ。
以下の様に API Apps も含めてごそっとでるが、ランタイムが JRE になっているものを選択してデプロイしよう。
f:id:waritohutsu:20160317173129p:plain
「Deploy to root」を選択すると ROOT.war の名前にリネームしてデプロイしてくれる点も便利だ。

② Azure Explorer ビューを利用する!

以下のノリで Eclipse のビューから Web Apps、ストレージ、サブスクリプションの簡易的な操作ができる。
f:id:waritohutsu:20160317173138p:plain


Tomcat, Jetty, Zulu OpenJDK がサポートするバージョンを更新

Tomcat, Jetty は以下のバージョンが利用可能。
f:id:waritohutsu:20160317173143p:plain
Zulu OpenJDK の最新版は以下となる。
f:id:waritohutsu:20160317173152p:plain

Azure Web Apps へ Maven 形式のプロジェクトをデプロイする方法

さて、冒頭で「Dynamic Web Project 形式で新規作成」という記載をしたが、まっとうな Java プロジェクトならば Gradle なり Maven なりを利用しているのが普通だろう。参考のために Maven プロジェクトを Azure Web Apps にデプロイする TIPS を紹介しておく。

まずは、以下の様に Maven 形式の Web アプリのプロジェクトを作成し、Eclipse 形式のファイルを生成する。

C:\opt\workspace>mvn archetype:generate -DgroupId=com.mydomain.deploy2webapp -DartifactId=Deploy2AzureWebApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
C:\opt\workspace>cd Deploy2AzureWebApp
C:\opt\workspace\Deploy2AzureWebApp>mvn eclipse:eclipse

次に、Eclipse に生成したプロジェクトをインポートする。この時点では右クリックメニューの Azure が存在しないので、右クリックメニューから「Properties」を選択し、以下のステップに従って設定を行う。
f:id:waritohutsu:20160317175118p:plain
左ツリーから Project Facets を選択し、Convert to faceted from.. を選択し、Dynamic Web Module にチェックボックスを追加した後、Further configuration available... を押下し、content directory: を Maven プロジェクトの形式に合わせた src/main/webapp に変更する。

上記の実施後に *.jsp ファイルに対して「The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path」エラーが発生するので、以下の画面に従って Tomcat(または Jetty )のサーバーランタイムを追加する。
f:id:waritohutsu:20160317175226p:plain

以上を実施すればプロジェクトの右クリックメニューに Azure が追加されるので、無事に Azure Web Apps にデプロイできるようになる。

現場からは以上だ(`・ω・´)ゞ

Microsoft Azure のリソースグループからテンプレートをエクスポートして環境をコピーする

Microsoft Azure がリソースグループと呼ばれる管理単位を利用し、仮想マシンや WebApps といったリソースをひとまとまりで管理することが可能になる。これにより、リソースの区切り単位が明確になった他、リソースグループ単位で一括で削除ができるために削除忘れが減る等の利点が存在した。
そんなリソースグループだが、昨今は「作成した既存環境のリソースグループをテンプレートとしてエクスポートする」という機能が追加された。これにより、お気軽に既存環境のコピーが可能となった。主に以下の用途で使えるのではないかという推察だ。

  • 開発チームが増員した際、増員者分の環境をコピーする
  • カスタマイズありの SaaS 系サービスの提供ベンダが、各顧客向けに用意する環境としてコピーする

早速使ってみる

最近 Application Insights の検証に利用していたリソースが残っているので、以下のリソースをコピーすることを考えてみる。
f:id:waritohutsu:20160314161435p:plain

設定 - テンプレートのエクスポート を選択すると、以下の画面が表示される。
f:id:waritohutsu:20160314161644p:plain

上記から ファイルに保存 を選択し、ExportedTemplate-"リソースグループ名".zip ファイルをダウンロードすると以下の中身になる。

  • deploy.ps1 … テンプレートデプロイ用のスクリプト
  • template.json … リソースグループのテンプレート、原則修正不要のはずだがちょくちょく修正が必要
  • parameters.json … テンプレートのパラメータ、こちらで値を設定する

上記のうち parameters.json を新規に作るリソース向けに仮想マシン名、ユーザ名、パスワード等々を修正して deploy.ps1 を実行すると以下のようになる。

PS C:\tmp\ExportedTemplate-arm-appinsights-linux-group> .\deploy.ps1
コマンド パイプライン位置 1 のコマンドレット deploy.ps1
次のパラメーターに値を指定してください:
subscriptionId: "サブスクリプションID"
resourceGroupName: "作成済みのリソースグループ、存在しないとエラーになる"
deploymentName: "任意名"
Logging in...

"中略"

Using existing resource group "作成済みのリソースグループ"

DeploymentName     : template
CorrelationId      : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ResourceGroupName  : "作成済みのリソースグループ"
ProvisioningState  : Succeeded
Timestamp          : 2016/03/14 6:28:29
Mode               : Incremental

"中略"

上記に実行するだけで容易に既存リソースのコピーが可能だ。まだ発展途上ではあるが、改善後は様々な用途が考えられる面白い機能といえる。

既知の注意点

まだプレビュー機能であるため、以下に注意が必要だ。

  • パブリック IP アドレス の重複に注意

仮想マシンにパブリック IP アドレスを付与済みであり、DNS 名を登録している場合、template.json の以下の個所を修正する必要がある。

        {
            "comments": "Generalized from resource: 'もろもろID'",
            "type": "Microsoft.Network/publicIPAddresses",
            "name": "[parameters('publicIPAddresses_AppInsightsVM2_name')]",
            "apiVersion": "2015-06-15",
            "location": "japaneast",
            "properties": {
                "publicIPAllocationMethod": "Dynamic",
                "idleTimeoutInMinutes": 4,
                "dnsSettings": {
                    "domainNameLabel": "'ここはそのままコピーすると重複してエラー'"
                }
            }
        },

何も修正しないと以下のようなエラーになる。

New-AzureRmResourceGroupDeployment : 13:19:16 - Resource Microsoft.Network/publicIPAddresses 'AppInsightsVMPubIP' failed with message 'DNS record '自身で設定済のdns名'.japaneast.cloudapp.azure.com is already used by another public IP.'
発生場所 C:\tmp\ExportedTemplate-arm-appinsights-linux-group\deploy.ps1:99 文字:5
+     New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGr ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResourceGroupDeploymentCommand

管理画面から閲覧可能だが、以下のようにサポートされていないリソースがあるので、テンプレートのエクスポート時に注意が必要だ。
f:id:waritohutsu:20160314161755p:plain

Application Insights の collectd プラグインを利用して Linux のCPUやメモリの負荷状況を取得する

Application Insights が発表されてからかなりの時間が経過したが、実は Application Insights に collectd と連携してログ情報を取り扱う機能が追加されているのをご存じだろうか?
Application Insights のライブラリはアプリケーション( war, ear の中身等)に仕込んで設定するのが原則のソリューションだ。
そんな Application Insights だが、Windows Server の場合は Application Insights Status Monitor をインストールすれば特に追加の対応が不要な一方、Linux 側には同等のコンポーネントが存在しなかった。
今回紹介する collectd と Application Insights を連携することで、特にアプリケーション自体を変更をすることなく OS に対して追加の設定のみで CPU 使用率、メモリ使用量、I/O 使用量を取得することが可能になる。

今回構築する環境

Application Insights と collectd を連携するためには以下が必要となる。

collectd 自体は collectdをインストールしてサーバの監視をしよう! を見て頂くとして、Application Insights と collectd を連携する手順を次から記載する。

環境構築に必要な手順

手順の概要は collectd: Application Insights での Unix パフォーマンス メトリック に記載があるが、こちらでもフォローアップする。

まずは CentOSSSH でログインし、以下のコマンドを叩き込む。collectd をインストールする場合、EPEL パッケージを入れる必要があるので、注意が必要だ。

yum install epel-release
yum update
yum install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64 
yum install httpd httpd-devel
yum install collectd collectd-rrdtool collectd-web collectd-java

次に以下の設定のために /etc/collectd/collectd.conf を編集する。

  • collectd の java, cpu, load, disk プラグインを有効化する
  • collectd の Application Insights Java Plugin を設定する

以下の様な記載になる認識だ。

...
# collectd plugins
LoadPlugin cpu
LoadPlugin disk
LoadPlugin load
...

# Enable Java Plugin
LoadPlugin "java"

# Configure Java Plugin
<Plugin "java">
  JVMArg "-verbose:jni"
  JVMArg "-Djava.class.path=/usr/share/collectd/java/applicationinsights-collectd-1.0.3.jar:/usr/share/collectd/java/collectd-api.jar"

  # Enabling Application Insights plugin
  LoadPlugin "com.microsoft.applicationinsights.collectd.ApplicationInsightsWriter"

  # Configuring Application Insights plugin
  <Plugin ApplicationInsightsWriter>
    InstrumentationKey "<自身の instrument key>"
  </Plugin>

</Plugin>

上記で記載した Application Insights collectd ライター プラグイン を取得する必要があるので、リンクより取得する。また、applicationinsights-collectd-x.x.x.jar はバージョンアップがこまめにされているので、リンクが切れていたら「バージョンが上がったのかな?」と推察してリンクからバージョンを修正して jar を取得する心意気が必要になる。
また、上記で記載した通り ApplicatinInsights.xml という構成ファイルが必要になる点にも注意が必要だ。

mv /home/azureuser/applicationinsights-collectd-1.0.3.jar /usr/share/collectd/java/
mv /home/azureuser/ApplicationInsights.xml /usr/share/collectd/java/ApplicationInsights.xml

ApplicatinInsights.xml を配置しない場合、以下の様なエラーが発生して ApplicationInsights の情報が Azure ポータル側に反映されない。

[root@AppInsightsVM ~]# tail -n 30 /var/log/messages
......
Mar  5 04:36:27 AppInsightsVM collectd: [Dynamic-linking native method java.io.FileOutputStream.writeBytes ... JNI]
<b><span style="color: #ff0000">Mar  5 04:36:27 AppInsightsVM collectd: AI: INFO 05-03-2016 04:36, 1: Configuration file 'ApplicationInsights.xml' was NOT found by default class loader
Mar  5 04:36:27 AppInsightsVM collectd: AI: INFO 05-03-2016 04:36, 1: Did not find configuration file 'ApplicationInsights.xml' in '/usr/share/collectd/java'
Mar  5 04:36:27 AppInsightsVM collectd: AI: INFO 05-03-2016 04:36, 1: Did not find configuration file 'ApplicationInsights.xml' in '/usr/share/collectd/java'
Mar  5 04:36:27 AppInsightsVM collectd: AI: WARN 05-03-2016 04:36, 1: Configuration file 'ApplicationInsights.xml' could not be found</span></b>

以上で設定は完了だが、SELinux の設定が有効化されている場合、collectd を実行した場合に以下のエラーが発生する。

[root@AppInsightsVM ~]# tail -n 30 /var/log/messages                                                                                                                   
Mar  5 04:13:38 AppInsightsVM systemd: collectd.service: main process exited, code=exited, status=1/FAILURE
Mar  5 04:13:38 AppInsightsVM systemd: Unit collectd.service entered failed state.
Mar  5 04:13:38 AppInsightsVM systemd: collectd.service failed.
Mar  5 04:13:38 AppInsightsVM systemd: collectd.service holdoff time over, scheduling restart.
Mar  5 04:13:38 AppInsightsVM systemd: Started Collectd statistics daemon.
Mar  5 04:13:38 AppInsightsVM systemd: Starting Collectd statistics daemon...
<span style="color: #ff0000"><b>Mar  5 04:13:38 AppInsightsVM collectd: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007fc7b780a000, 2555904, 1) failed; error='Permission denied' (errno=13)</b></span>
Mar  5 04:13:38 AppInsightsVM collectd: #
Mar  5 04:13:38 AppInsightsVM collectd: # There is insufficient memory for the Java Runtime Environment to continue.
Mar  5 04:13:38 AppInsightsVM collectd: # Native memory allocation (mmap) failed to map 2555904 bytes for committing reserved memory.
Mar  5 04:13:38 AppInsightsVM collectd: # An error report file with more information is saved as:

今回は以下のコマンドを利用して一時的に SELinux を無効化するが、自身の環境とポリシーに合わせて設定を行ってほしい。

[root@AppInsightsVM ~]# setenforce 0

上記の完了後、collectd と Apache を起動する。

[root@AppInsightsVM ~]# systemctl start collectd
[root@AppInsightsVM ~]# systemctl start httpd

設定がうまくいっている場合、管理ポータルから情報の取得が可能となる。以下の様にポータルの Application Insights 画面からメトリックスエクスプローラの「グラフの追加」から各種グラフを表示することができる。
f:id:waritohutsu:20160306122839p:plain