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

アドオン管理機能に対応しているOSSについては,マニュアル「JP1/Integrated Management 3 - Manager 導入・設計ガイド」の「3.15 JP1/IM - Agentによる監視機能」を参照してください。

ファイル

格納先ディレクトリ

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

    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

Windows exporter(Hyper-V監視)

jpc_windows_exporter_hyperv_service.exe

jpc_windows_exporter_hyperv_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

Web exporter

jpc_web_exporter_service.exe

jpc_web_exporter_service.exe

VMware exporter

jpc_vmware_exporter_service.exe

jpc_vmware_exporter_service.exe

SQL exporter

sql_exporter_service.exe

sql_exporter_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_インスタンス名

  • Web exporterの場合

    jpc_web_exporter

  • VMware exporterの場合

    jpc_vmware_exporter

  • Windows exporter(Hyper-V監視)の場合

    jpc_windows_exporter_hyperv

  • SQL exporterの場合

    sql_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

  • 統合エージェント制御基盤(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 インスタンス名

  • Web exporterの場合

    JP1/IM3-Agent Synthetic web metric collector

  • VMware exporterの場合

    JP1/IM3-Agent VMware metric collector

  • Windows exporter(Hyper-V監視)の場合

    JP1/IM3-Agent Windows Hyper-V metric collector

  • SQL exporterの場合

    SQL Exporter

<description>

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

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

  • Prometheus serverの場合

    Prometheus server

  • Alertmanagerの場合

    Alertmanager

  • Windows exporterの場合

    windows_exporter

  • Blackbox exporterの場合

    blackbox_exporter

  • 統合エージェント制御基盤(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

  • Web exporterの場合

    Web exporter

  • VMware exporterの場合

    vmware_exporter

  • Windows exporter(Hyper-V監視)の場合

    jpc_windows_exporter_hyperv

  • SQL exporterの場合

    MSSQL metric collector

<workingdirectory>

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

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

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

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

    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,Alertmanager,Windows exporter,Windows exporter(Hyper-V監視),Yet another cloudwatch exporter,Promitor Scraper,Promitor Resource Discovery,Blackbox exporter,Script exporter,Web exporter,VMware exporter,およびFluentdの場合

    osswrapper.exe

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

    imagent

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

    imagentproxy

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

    imagentaction

  • OracleDB exporterの場合

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

  • SQL exporterの場合

    配置先\sql_exporter_windows\jp1ima¥bin\sql_exporter.exe

<arguments>

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

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

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

  • Prometheus serverの場合

    "Agentパス\bin\prometheus.exe"

    prometheus.exeの引数

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

  • Alertmanagerの場合

    "Agentパス\bin\alertmanager.exe"

    alertmanager.exeの引数

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

  • Windows exporterの場合

    "Agentパス\bin\windows_exporter.exe"

    windows_exporter.exeの引数

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

  • Blackbox exporterの場合

    "Agentパス\bin\blackbox_exporter.exe"

    blackbox_exporter.exeの引数

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

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

    ■通常ホストの場合

    なし

    ■クラスタ環境の場合

    -hostname 論理ホスト名

    ■複数マネージャーホストへのデータ配信機能を使用し,統合エージェント制御基盤をセカンダリーとして起動する場合

    -imagid imagentグループ識別子

  • Fluentdの場合

    "Agentパス\lib\ruby\ruby.exe"

    fluentdコマンドの引数

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

  • Yet another cloudwatch exporterの場合

    "Agentパス\bin\ya_cloudwatch_exporter.exe"

    ya_cloudwatch_exporter.exeの引数

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

  • Promitor Scraperの場合

    "Agentパス\bin\promitor_scraper.exe"

    promitor_scraper.exeの引数

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

  • Promitor Resource Discoveryの場合

    "Agentパス\bin\promitor_resource_discovery.exe"

    promitor_resource_discovery.exeの引数

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

  • Script exporterの場合

    "Agentパス\bin\script_exporter.exe"

    script_exporter.exeの引数

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

  • OracleDB exporterの場合

    oracledb_exporter.exeの引数

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

  • Web exporterの場合

    "Agentパス\bin\web_exporter.exe"

    web_exporter.exeの引数

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

  • VMware exporterの場合

    "Agentパス\bin\vmware_exporter.exe"

    vmware_exporter.exeの引数

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

  • Windows exporter(Hyper-V監視)の場合

    windows_exporter.exe(Hyper-V監視)の引数

    注 windows_exporter.exe(Hyper-V監視)の引数については,「windows_exporterコマンドのオプション(Hyper-V監視)」を参照してください。

  • SQL exporterの場合

    sql_exporter.exeの引数

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

<startmode>

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

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

  • Automatic(自動)

  • Manual(手動)

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

  • Prometheus server,Alertmanager,Windows exporter,Blackbox exporter,統合エージェント制御基盤(imagentおよびimagentproxy),Fluentd,OracleDB exporter,Web exporter,VMware exporter,Windows exporter(Hyper-V監視),およびSQL exporterの場合

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

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

    Automatic

<logpath>

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

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

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

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

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

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

<sizeThreshold>

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

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

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

10240(imagent,imagentproxy,imagentaction,OracleDB exporterの場合だけ1024)

<keepFiles>

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

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

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

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

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

7(Fluentdの場合だけ99。OracleDB exporterの場合3。imagent,imagentproxy,imagentactionの場合1。)

<stoptimeout>

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

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

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

  • Prometheus serverの場合

    110sec

  • Alertmanager,Windows exporter,Blackbox exporter,Yet another cloudwatch exporter,Promitor Scraper,Promitor Resource Discovery,Script exporter,Fluentd,OracleDB exporter,Web exporter,VMware exporter,Windows exporter(Hyper-V監視),およびSQL exporterの場合

    60sec

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

    90sec

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

    140sec

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

    60sec

<env name="IMA_OSSWRAPPER_RESTART_INTERVAL" value="OSSラッパーがOSSのプロセスを再起動する間隔">

環境変数IMA_OSSWRAPPER_RESTART_INTERVALの値(OSSラッパーがOSSのプロセスを再起動する間隔)を時間単位で指定します。

指定できる値は0〜2160(90日)です。デフォルト値は0です。

次の場合はOSSのプロセスを再起動は行いません。

  • この環境変数を設定していない場合

  • この環境変数の値に0が指定された場合

  • 指定された値を整数値に変換できない場合

  • 指定できる範囲外の値が指定された場合

OSSのプロセスを起動する直前を基点とし,デフォルト値または指定された値の時間が経過したときに,OSSのプロセスを再起動します。

name="IMA_OSSWRAPPER_RESTART_INTERVAL" value="0"

(凡例)

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

注※

複数マネージャーホストへのデータ配信機能を使用する場合のサービス定義ファイルの記述内容については,マニュアル「JP1/Integrated Management 3 - Manager 導入・設計ガイド」の「3.15.7(5)(c)セカンダリーのサービス起動の設定」の「サービス定義ファイル(Windowsの場合)」を参照してください。

(凡例)

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

(凡例)

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

(凡例)

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

(凡例)

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

(凡例)

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

(凡例)

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

(凡例)

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

(凡例)

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

(凡例)

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

(凡例)

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

(凡例)

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