Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager コマンド・定義ファイル・APIリファレンス


サービス定義ファイル(jpc_プログラム名_service.xml)

〈このページの構成〉

形式

<service>
  <id>サービスのID</id>
  <name>サービスの表示名</name>
  <description>説明</description>
  <workingdirectory>作業ディレクトリ</workingdirectory>
  <env name="環境変数名" value=""></env>
  <executable>"プログラムのパス"</executable>
  <arguments>プログラムの引数</arguments>
  <startmode>スタートアップの種類</startmode>
  <logpath>ログ出力先ディレクトリ</logpath>
  <log mode="roll-by-size">
    <sizeThreshold>ログファイルサイズ</sizeThreshold>
    <keepFiles>ログ面数</keepFiles>
  </log>
  <stoptimeout>終了タイムアウト時間</stoptimeout>
</service>

ファイル

格納先ディレクトリ

■統合エージェントホスト
  • 物理ホストのとき(モデルファイルの格納先)

    Agentパス\conf\

  • 物理ホストおよび論理ホストのとき(定義ファイルの格納先)

    Agentパス\bin\

説明

Windowsサービス化プログラムの定義ファイルです。

文字コード

UTF-8(BOM無し)

改行コード

CR+LF

定義の反映時期

定義ファイルの<startmode>を変更した場合は,サービスの再インストールにより反映されます。サービスの再インストールは,統合エージェント制御基盤またはアドオンプログラムのサービスごとに,次の表に示すコマンドで行います。

アドオンプログラムまたは統合エージェント制御基盤

サービス名

コマンド

Prometheus server

jpc_prometheus_server_service.exe

jpc_prometheus_server_service.exe

Alertmanager

jpc_alertmanager_service.exe

jpc_alertmanager_service.exe

Windows exporter

jpc_windows_exporter_service.exe

jpc_windows_exporter_service.exe

Blackbox exporter

jpc_blackbox_exporter_service.exe

jpc_blackbox_exporter_service.exe

Yet another cloudwatch exporter

jpc_ya_cloudwatch_exporter_service.exe

jpc_ya_cloudwatch_exporter_service.exe

Promitor

jpc_promitor_scraper_service.exe

jpc_promitor_scraper_service.exe

jpc_promitor_resource_discovery_service.exe

jpc_promitor_resource_discovery_service.exe

Script exporter

jpc_script_exporter_service.exe

jpc_script_exporter_service.exe

Fluentd

jpc_fluentd_service.exe

jpc_fluentd_service.exe

imagent

jpc_imagent_service.exe

jpc_imagent_service.exe

imagentproxy

jpc_imagentproxy_service.exe

jpc_imagentproxy_service.exe

imagentaction

jpc_imagentaction_service.exe

jpc_imagentaction_service.exe

定義ファイルの<arguments>または<stoptimeout>を変更した場合は,サービスの再起動により反映されます。

記述内容

項目名

説明

変更可否

JP1/IM - Agentでユーザーが設定する内容

JP1/IM - Agentのデフォルト値

<service>

サービスの設定をします。

<id>

サービスのID(Windowsがサービスを識別するために内部的に使用するID)を指定します(必須)。

このIDは,システムにインストールされているすべてのサービスの中で一意,かつ,すべて英数字で構成されている必要があります。

  • Prometheus serverの場合

    jpc_prometheus

  • Alertmanagerの場合

    jpc_alertmanager

  • Windows exporterの場合

    jpc_windows_exporter

  • Blackbox exporterの場合

    jpc_blackbox_exporter

  • 統合エージェント制御基盤(imagent)の場合

    jpc_imagent

  • 統合エージェント制御基盤(imagentproxy)の場合

    jpc_imagentproxy

  • 統合エージェント制御基盤(imagentaction)の場合

    jpc_imagentaction

  • Fluentdの場合

    jpc_fluentd

  • Yet another cloudwatch exporterの場合

    jpc_ya_cloudwatch_exporter

  • Promitor Scraperの場合

    jpc_promitor_scraper

  • Promitor Resource Discoveryの場合

    jpc_promitor_resource_discovery

  • Script exporterの場合

    jpc_script_exporter

  • OracleDB exporterの場合

    oracledb_exporter_インスタンス名

<name>

サービスの表示名(サービスの短い表示名)を指定します(任意)。

空白文字やほかの文字を含めることができます。<id>のように長い文字列は指定しないでください。また,特定のシステム内のすべてのサービス間で一意である必要があります。

  • Prometheus serverの場合

    JP1/IM3-Agent Metric forwarder

  • Alertmanagerの場合

    JP1/IM3-Agent Alert forwarder

  • Windows exporterの場合

    JP1/IM3-Agent Windows metric collector

  • Blackbox exporterの場合

    JP1/IM3-Agent Synthetic metric collector

  • 統合エージェント管理基盤(imbase)の場合

    ■通常ホストの場合

    JP1/IM-Agent Base Server

    ■クラスタ環境の場合

    JP1/IM-Agent Base Server_論理ホスト名

  • 統合エージェント管理基盤(imbaseproxy)の場合

    ■通常ホストの場合

    JP1/IM-Agent Base Proxy Server

    ■クラスタ環境の場合

    JP1/IM-Agent Base Proxy Server_論理ホスト名

  • 統合エージェント制御基盤(imagent)の場合

    JP1/IM3-Agent

  • 統合エージェント制御基盤(imagentproxy)の場合

    JP1/IM3-Agent proxy

  • 統合エージェント制御基盤(imagentaction)の場合

    JP1/IM3-Agent action

  • Fluentdの場合

    JP1/IM3-Agent Log trapper

  • Yet another cloudwatch exporterの場合

    JPC YA Cloudwatch exporter

  • Promitor Scraperの場合

    JPC Promitor Scraper

  • Promitor Resource Discoveryの場合

    JPC Promitor Resource Discovery

  • Script exporterの場合

    JPC Script exporter

  • OracleDB exporterの場合

    OracleDB metric collector インスタンス名

<description>

説明を(長い説明文)を指定します(任意)。

この説明は,サービスが選択されたときに,Windowsサービスコントロールマネージャーに表示されます。

  • Prometheus serverの場合

    Prometheus server

  • Alertmanagerの場合

    Alertmanager

  • Windows exporterの場合

    windows_exporter

  • Blackbox exporterの場合

    blackbox_exporter

  • 統合エージェント管理基盤(imbase)の場合

    JP1 IMA Base Service

  • 統合エージェント管理基盤(imbaseproxy)の場合

    JP1 IMA Base Proxy Service

  • 統合エージェント制御基盤(imagent)の場合

    JPC IM-Agent Service

  • 統合エージェント制御基盤(imagentproxy)の場合

    JPC IM-Agent Proxy Service

  • 統合エージェント制御基盤(imagentaction)の場合

    JPC IM-Agent Action Service

  • Fluentdの場合

    Fluentd

  • Yet another cloudwatch exporterの場合

    jpc_ya_cloudwatch_exporter

  • Promitor Scraperの場合

    jpc_promitor_scraper

  • Promitor Resource Discoveryの場合

    jpc_promitor_resource_discovery

  • Script exporterの場合

    jpc_script_exporter

  • OracleDB exporterの場合

    OracleDB exporter

<workingdirectory>

作業ディレクトリ(サービスのカレントディレクトリ)を指定します。

  • Prometheus server,Alertmanager,Windows exporter,およびBlackbox exporterの場合

    セットアップ時に自動設定します。

  • 統合エージェント管理基盤(imbaseおよびimbaseproxy)の場合

    Managerパス\bin\imdd\imagent

  • 統合エージェント制御基盤(imagent,imagentproxy,およびimagentaction)およびFluentdの場合

    Agentパス\bin

<env name="環境変数名" value="">

環境変数名を指定します。

Promitor Scraper,Promitor Resource Discovery,およびOracleDB exporterの場合に指定します。

  • Promitor ScraperおよびPromitor Resource Discoveryの場合

  • OracleDB exporterの場合

  • Promitor Scraperの場合

    name="PROMITOR_CONFIG_FOLDER" value="インストール先/jp1ima/conf/promitor/scraper"

  • Promitor Resource Discoveryの場合

    name="PROMITOR_CONFIG_FOLDER" value="インストール先/jp1ima/conf/promitor/resource-discovery"

  • OracleDB exporterの場合

    マニュアル「JP1/Integrated Management 3 - Manager 構築ガイド」の「1.23.1(4)(a) 監視対象を追加する(必須)」の「監視対象を追加するための準備」の手順3と4を参照してください。

<executable>

プログラムのパス(起動する実行ファイルのパス)を指定します(必須)。

絶対パスを指定,または実行ファイル名を指定してPATHから検索させることができます。

ただし,サービスは別のユーザーアカウントで実行されることが多いため,シェルとは異なるPATHを持つ可能性があることに注意してください。

空の文字列を指定してもエラーにならないため,注意してください。

  • Prometheus serverの場合

    prometheus.exe

  • Alertmanagerの場合

    alertmanager.exe

  • Windows exporterの場合

    windows_exporter.exe

  • Blackbox exporterの場合

    blackbox_exporter.exe

  • 統合エージェント管理基盤(imbase)の場合

    imbase

  • 統合エージェント管理基盤(imbaseproxy)の場合

    imbaseproxy

  • 統合エージェント制御基盤(imagent)の場合

    imagent

  • 統合エージェント制御基盤(imagentproxy)の場合

    imagentproxy

  • 統合エージェント制御基盤(imagentaction)の場合

    imagentaction

  • Fluentdの場合

    Agentパス\lib\ruby\ruby.exe

  • Yet another cloudwatch exporterの場合

    ya_cloudwatch_exporter.exe

  • Promitor Scraperの場合

    promitor_scraper.exe

  • Promitor Resource Discoveryの場合

    promitor_resource_discovery.exe

  • Script exporterの場合

    script_exporter.exe

  • OracleDB exporterの場合

    配置先\oracledb_exporter_windows\jp1ima\bin\oracledb_exporter.exe

<arguments>

プログラムの引数(起動する実行ファイルに渡す引数)を指定します。

値を変更する場合は,値を変更したあとで,サービスを再起動してください。

引数を変更したいときに設定を変更します。

  • Prometheus serverの場合

    prometheus.exeの引数については,「prometheusコマンドのオプション」を参照してください。

    --config.file="Agentパス/conf/jpc_prometheus_server.yml"

  • Alertmanagerの場合

    alertmanager.exeの引数については,「alertmanager.コマンドのオプション」を参照してください。

  • Windows exporterの場合

    windows_exporter.exeの引数については,「windows_exporterコマンドのオプション」を参照してください。

  • Blackbox exporterの場合

    blackbox_exporter.exeの引数については,「blackbox_exporterコマンドのオプション」を参照してください。

  • 統合エージェント管理基盤(imbaseおよびimbaseproxy)および統合エージェント制御基盤imagent,imagentproxy,およびimagentaction)の場合

    ■通常ホストの場合

    なし

    ■クラスタ環境の場合

    -hostname 論理ホスト名

  • Fluentdの場合

    fluentdコマンドの引数については,「fluentdコマンドのオプション」を参照してください。

  • Yet another cloudwatch exporterの場合

    ya_cloudwatch_exporter.exeの引数については,「ya_cloudwatch_exporterコマンドのオプション」を参照してください。

  • Promitor Scraperの場合

    promitor_scraper.exeの引数については,「promitor_scraperコマンドのオプション」を参照してください。

  • Promitor Resource Discoveryの場合

    promitor_resource_discovery.exeの引数については,「promitor_resource_discoveryコマンドのオプション」を参照してください。

  • Script exporterの場合

    script_exporter.exeの引数については,「script_exporterコマンドのオプション」を参照してください。

  • OracleDB exporterの場合

    oracledb_exporter.exeの引数については,「oracledb_exporterコマンドのオプション」を参照してください。

<startmode>

スタートアップの種類(Windowsサービスの開始モード)を指定します(任意)。

次のどちらかの値を指定します。

  • Automatic(自動)

  • Manual(手動)

値を変更する場合は,一度サービスのアンインストールを実行し,値を変更したあとで,サービスの再インストールを実行してください。

  • Prometheus server,Alertmanager,Windows exporter,Blackbox exporter,統合エージェント制御基盤(imagentおよびimagentproxy),Fluentd,およびOracleDB exporterの場合

    クラスタ運用のときはManualを指定します。

  • Prometheus server,Alertmanager,Windows exporter,Blackbox exporter,Yet another cloudwatch exporter,Promitor Scraper,Promitor Resource Discovery,Script exporter,統合エージェント制御基盤(imagentおよびimagentproxy),およびFluentdの場合

    Automatic

  • 統合エージェント管理基盤(imbaseおよびimbaseproxy)の場合

    Manual

<logpath>

ログ出力先ディレクトリ(ログファイルが作成されるディレクトリ)を指定します。

指定を省略した場合,設定ファイルが存在するディレクトリがデフォルトとなります。

値を変更する場合は,値を変更したあとで,サービスを再起動してください。

セットアップ時に自動設定します。

<log mode="roll-by-size">

ログ出力のモードはroll-by-sizeモードです。appendモードと同様に動作しますが,ログファイルサイズに設定した値を超えた場合は,myapp.1.out.log,myapp.2.out.logなどにロールされます。

<sizeThreshold>

ログファイルサイズ(ローテーションのしきい値)を変更するときにKB単位で指定します。

値を変更する場合は,値を変更したあとで,サービスを再起動してください。

サポート窓口から値の変更を指示されたときに設定を変更します。

10240

<keepFiles>

ログ面数(保持するロールファイルの数)を変更するときに指定します。

指定した面数+1面のログが作成されます。

値を変更する場合は,値を変更したあとで,サービスを再起動してください。

設定できる値の範囲は7〜511です。

サポート窓口から値の変更を指示されたときに設定を変更します。

7(Fluentdの場合だけ99)

<stoptimeout>

サービスの停止待ち時間(プログラムに停止要求を出してから,サービスが停止するまでの最大待ち時間)を指定します。

値を変更する場合は,値を変更したあとで,サービスを再起動してください。

停止待ち時間を変更したいときに設定を変更します。

  • Prometheus serverの場合

    110sec

  • Alertmanager,Windows exporter,Blackbox exporter,Yet another cloudwatch exporter,Promitor Scraper,Promitor Resource Discovery,Script exporter,およびFluentdの場合

    60sec

  • 統合エージェント管理基盤(imbase)および統合エージェント制御基盤(imagent)の場合

    90sec

  • 統合エージェント管理基盤(imbaseproxy)および統合エージェント制御基盤(imagentproxy)の場合

    140sec

  • OracleDB exporterの場合

    60sec

(凡例)

〇:変更可 △:変更不可 −:該当なし

(凡例)

〇:変更可 △:変更不可 −:該当なし

(凡例)

〇:変更可 △:変更不可 −:該当なし

(凡例)

〇:変更可 △:変更不可 −:該当なし

(凡例)

〇:変更可 △:変更不可 −:該当なし

(凡例)

○:変更可 △:変更不可 −:該当なし

(凡例)

〇:変更可 △:変更不可 −:該当なし

(凡例)

〇:変更可 △:変更不可 −:該当なし