intra-mart Accel Platform Kibana ポートレットセットアップガイド 初版 2017-04-01

5. intra-mart Accel Platform をセットアップする

intra-mart Accel Platform システム管理者 向けの作業です。 intra-mart Accel Platform のセットアップは「intra-mart Accel Platform セットアップガイド」を参照してください。 ここでは追加で必要な手順を説明します。

5.1. モジュールの選択

intra-mart Accel Platform セットアップガイド」-「プロジェクトの作成とモジュールの選択」より、Kibana ポートレット を選択します。

Kibana ポートレット を選択した際、画面上部にエラーメッセージが表示されている場合、エラーメッセージリンクをクリックして、依存関係を解決したり、設定ファイルの解決より設定ファイルをプロジェクトに配置したりしてください。

../../_images/modules_01.png

../../_images/modules_02.png

../../_images/modules_03.png

5.2. 設定ファイルの編集

Kibana ポートレット を利用するための設定ファイルを編集します。 設定ファイルの詳細については「設定ファイルリファレンス」-「設定ファイルリファレンス - Kibanaポートレットの設定」を参照してください。

  1. 「ProjectNavigator」内の <(プロジェクト名)/im-kibana-config/kibana-config.xml> ファイルをダブルクリックで開き、「ソース」タブを選択してください。

  2. 「kibana-config」の「id」属性に任意のIDを指定してください。

    <im-kibana-config>
      <kibana-config id="sample">
        ・・・
      </kibana-config>
    </im-kibana-config>
    
  3. root-url」に接続先の Kibana のURLを、「version」に接続先の Kibana のバージョン番号を指定します。

    <im-kibana-config>
      <kibana-config id="sample">
        <root-url>http://kibana.example.com:5601</root-url>
        <version>5.2.1</version>
      </kibana-config>
    </im-kibana-config>
    

5.2.1. Kibana ポートレット 設定ファイルの確認

Kibana ポートレット 設定ファイルの例を以下に示します。

<?xml version="1.0" encoding="UTF-8"?>
<im-kibana-config
    xmlns="http://www.intra-mart.jp/system/im-kibana/config/im-kibana-config"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.intra-mart.jp/system/im-kibana/config/im-kibana-config ../../schema/im-kibana-config.xsd ">

    <kibana-config-list>
        <kibana-config id="sample">
            <root-url>http://localhost:5601</root-url>
            <kibana-version>5.2.1</kibana-version>
        </kibana-config>
    </kibana-config-list>
</im-kibana-config>

5.3. Web Server の設定

Web Server を利用している場合、追加で設定を行う必要があります。 Web Server の設定の詳細は Web Server を参照してください。

5.3.1. Apache HTTP Server

Apache設定ファイルの編集 での設定に RewriteCond %{REQUEST_URI} !^/imart/kibana/ を追記します。

AllowEncodedSlashes On
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/imart/reverse_proxy/
RewriteCond %{REQUEST_URI} !^/imart/kibana/
RewriteCond %{REQUEST_URI} ^/imart/(.*\.gif|.*\.GIF)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.png|.*\.PNG)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.jpg|.*\.JPG)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.css|.*\.CSS)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.js|.*\.JS)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.swf|.*\.SWF)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.ico|.*\.ICO)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.json|.*\.JSON)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.jar|.*\.JAR)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.xml|.*\.XML)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.yaml|.*\.YAML)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.txt|.*\.TXT)$ [OR]
RewriteCond %{REQUEST_URI} ^/imart/(.*\.html|.*\.HTML|.*\.htm|.*\.HTM)$
RewriteRule ^/imart/(.*)?$ /imart/$1

ProxyPreserveHost On
ProxyPass /imart/ http://192.168.1.1:8080/imart/ nocanon
ProxyPassReverse /imart/ http://192.168.1.1:8080/imart/ nocanon
ProxyTimeout 1200

5.3.2. Internet Information Services(IIS)

Internet Information Services(IIS) での設定に (?!kibana/) を追記します。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.web>
    <httpRuntime maxRequestLength="102400" requestPathInvalidCharacters="" />
    <customErrors mode="Off" />
  </system.web>
  <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="104857600" />
      </requestFiltering>
    </security>
    <httpErrors errorMode="Detailed" />
    <rewrite>
      <rules>
        <clear />
        <rule name="ReverseProxyInboundStatic" stopProcessing="true">
          <match url="^imart/(?!reverse_proxy/)(?!kibana/)(.*\.gif|.*\.png|.*\.jpg|.*\.css|.*\.js|.*\.swf|.*\.ico|.*\.json|.*\.jar|.*\.xml|.*\.yaml|.*\.txt|.*\.html|.*\.htm)$" />
          <action type="None" />
        </rule>
        <rule name="ReverseProxyInboundDynamic" stopProcessing="true">
          <match url="^imart/(.*)" />
          <action type="Rewrite" url="http://192.168.1.1:8080/imart/{R:1}" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

設定を編集後、 Internet Information Services(IIS) を再起動してください。

5.4. テナント環境セットアップ