ja:documentation:pandorafms:installation:05_configuration_agents

ソフトウエアエージェント設定

They are small pieces of software that are installed in the operating systems and remain running on them to extract monitoring information and regularly send it to the Pandora FMS Data server, which processes and stores it in the database.

OS にインストールされ、監視情報を抽出して Pandora FMS (のデータを処理して DB へ保存する)データサーバへ定期的に送信するための小さなソフトウエアです。

The operation of the Software Agent (operation parameters and modules) is determined by its configuration file.

ソフトウェアエージェントの動作 (動作パラメータとモジュール) は、その設定ファイルによって決定されます。

  • On MS Windows®:
  • MS Windows® の場合:
%ProgramFiles%\pandora_agent\pandora_agent.conf
  • On GNU/Linux® systems:
  • GNU/Linux® システムの場合
/etc/pandora/pandora_agent.conf

Most of the parameters are common for MS Windows® and GNU/Linux® systems. After having modified any general parameter, you must restart the Software Agent.

パラメータのほとんどは、MS Windows® および GNU/Linux® システムで共通です。 一般パラメータを変更した後は、ソフトウェアエージェントを再起動する必要があります。

The agent configuration file encoding is UTF-8 on both GNU/Linux® and MS Windows® systems.

エージェント設定ファイルのエンコードは、GNU/Linux® システムと MS Windows® システム共に UTF-8 です。ただし、日本語 Windows の場合は Shift_JIS の利用を推奨します。

The first time data is received from the Software Agent, all the information is saved in the database. For successive information submissions (and depending on whether the learning mode is enabled) only the following fields of the XML will be updated: version, timestamp (date) and os_version (operating system version), as well as the following configuration file parameters gis_exec, latitude, longitude, altitude, parent_agent_name, timezone_offset, address, custom_field .

ソフトウェア エージェントから初めてデータを受信すると、すべての情報がデータベースに保存されます。 連続した情報の送信では (学習モードが有効かどうかに応じて)、XML の次のフィールドのみが更新されます: versiontimestamp (日付) および os_version (オペレーティングシステムのバージョン)、また、次の設定ファイルパラメータ: gis_execlatitudelongitudealtitudeparent_agent_nametimezone_offsetaddresscustom_field

データを保持する Pandora FMS サーバのホスト名もしくは IP アドレスを設定します。

エージェントから送られるデータを受け取るサーバのディレクトリパスを設定します。通常は、/var/spool/pandora/data_in です。

エージェントがサーバにデータを送信する前にローカルで利用するフォルダのパスを設定します。

XML でエージェントが送る「説明」を設定します。Pandora FMS はエージェントを作成する時に、この「説明」を取り込みます。

エージェントが所属するグループ名を設定します。このパラメータで指定された名前のグループがある場合、サーバが特定のグループにエージェントを作成するようにしていなければ、指定したグループ内にエージェントが作成されます。

If the free space (in megabytes) of the partition where the temporary directory is located is less than this value (by default one megabyte), the generation of data packets is stopped. This prevents the disk from filling up if for some reason the connection to the primary and/or secondary PFMS server is lost for an extended interval of time.

テンポラリディレクトリのパーティション空き容量がここで指定したサイズ (MB 単位) より小さくなったら、データパケットの生成を停止します。 (デフォルトは 1MB) 何らかの理由でプライマリおよびセカンダリの Pandora FMS サーバへの接続が長時間切れた場合に、ディスクがいっぱいになるのを避けます。

In the Pandora FMS event view you will be able to know in a timely manner if a Software Agent, whatever the cause, has stopped delivering data to its main and/or secondary PFMS server, since in these cases its status becomes UNKNOWN. See also, if desired, the creation of alert conditions.

In this particular example with four days offline, monitoring data will be saved until only 1 megabyte (or the value you set) of free disk space is left.

Pandora FMS イベント表示で、原因が何であれ、ソフトウェアエージェントがメインおよびセカンダリ Pandora FMS サーバへのデータ配信を停止したかどうかをタイムリーに知ることができます。この場合、その状態は 不明 になります。必要に応じて、アラート条件の作成も参照してください。

4日間オフラインのこの例では、1メガバイト(または設定した値)の空きディスク容量が残るまで、監視データが保存されます。

Because of the above, you should always keep in mind that when the Software Agent finally connects to its primary and/or secondary PFMS server, the amount of accumulated data may overload the PFMS data server.

上記の理由により、ソフトウェアエージェントが改めてプライマリおよびセカンダリ Pandora FMS サーバに接続するときに、蓄積された量のデータでPandora FMS データサーバの高負荷が発生する可能性があることに注意が必要です。

Maximum size (in megabytes) allowed for the XML buffer, default value 1024.

XML バッファの最大サイズ(メガバイト)です。デフォルトは 1024 です。

See also temporal_min_size .

temporal_min_size も確認してください。

Maximum number of files allowed for the XML buffer, default value 1024.

XML バッファの最大ファイル数です。デフォルトは 1024 です。

See also temporal_min_size .

temporal_min_size も確認してください。

Pandora FMS エージェントのログファイルのパスです。

エージェントの秒単位のデータ収集間隔です。この間隔でエージェントは情報を収集し、Pandora FMS サーバへ送ります。

このパラメータは、pandora_agent.log へのログ出力を無効化します。Windows のみ。

有効化すると、エージェントのデータファイルはテンポラリディレクトリ内に名前を変えて保存され、サーバへ送信したあとも削除されません。XML ファイルを開いて内容を確認することができます。

カスタム名を設定できます。設定していない場合、エージェント名はマシンのホスト名になります。

外部コマンドを使ってエージェント名を定義したい場合に設定します。これはオプションです。このパラメータを設定した場合、'agent_name' は無視されます。外部コマンドはエージェント名を標準出力に返す必要があります。複数行を返した場合、1行目がエージェント名として扱われます。

バージョン NG 7 以上

外部コマンドを使ってエージェントの別名を定義したい場合に設定します。このパラメータを設定した場合、'agent_alias' は無視されます。外部コマンドはエージェントの別名を標準出力に返す必要があります。複数行を返した場合、1行目がエージェントの別名として扱われます。

これは、ソフトウエアエージェントの IP アドレスです。X.X.X.X というフォーマットの IP アドレス、'localhost' のようなホスト名、または 'auto' を設定できます。IP アドレスまたはホスト名を指定した場合は、そのアドレスがエージェントに追加され、メインのアドレスとなります。'auto' を指定した場合は、ホストから IP アドレスを取得してエージェントに追加されます。

ISO-8859-15 や UTF-8 のように、システムのエンコーディングの種類を設定します。

このパラメータは、リモートのサーバの待ち受けポートの設定です。Tentacle のデフォルトは 41121 です。

このパラメータには、エージェントからサーバへデータを送信するための方法を設定します。デフォルトは Tentacle です。

バージョン 6.0 以上

データ転送プログラムの実行タイムアウトを秒単位で指定します。設定されていない場合のデフォルトは 30 です。

Windows の FTP もしくは Tentacle 転送モードのパスワードを設定します。Tentacle モードの場合はパスワードは必須ではありません。このパスワードでサーバでの認証を行います。

It specifies the Tentacle transfer mode. Allows to enable ( yes ) or disable ( no ) SSL network encryption. Learn more about Tentacle safe communication in this section.

Tentacle の転送モードを設定します。SSL による暗号化を有効化(yes)または、無効化(no)できます。Tentacle の暗号化通信については、こちらの章も参照してください。

Tentacle の転送モードを設定します。Tentacle クライアントの拡張設定のために渡す、追加パラメータを設定します。

バージョン 3.2 以降のエージェントでは、tentacle がサーバへデータを送信するのに HTTP プロキシをサポートしています。プロキシを利用するには、つぎのような拡張オプションを使います。

server_opts "-y user:pass@proxy.inet:8080"

この例では、tentacle クライアントがポート 8080、ユーザ “user”、パスワード “pass” でプロキシ 'proxy.inet' に接続します。プロキシサーバが 192.168.1.2 で、ポート番号が 9000、また、認証が無い場合は次のようにします。

server_opts "-y 192.168.1.2:9000"

デフォルトでは無効です。 エージェント起動後、処理を開始するまでの待ち時間( または )です。MS Windows 以外のソフトウエアエージェントで利用できます。

デフォルトでは無効です。 エージェント起動後、処理を開始するまでの秒単位の待ち時間です。MS Windows のみ。

このパラメータには、Pandora FMS エージェントプロセスの優先順位を設定します。この設定は、Unix/Linux エージェントにのみ存在します。

これを有効に設定 (1 に設定) すると、エージェントが送信する時間データを無視し、サーバに接続した時間をサーバのローカル時間で認識するようになります。この設定は、何らかの理由によりエージェントの時刻がおかしかったり、サーバの時刻と大きくずれている場合に利用します。

このパラメータを有効にすると、エージェントをそれ自身の実行の仕組みではなく、Linux の crontab から指定した時刻に実行できるようになります。デフォルトでは無効になっています。

(Pandora FMS Enterprise のみ)

リモートエージェント設定を有効化(1)または無効化(0)します。Tentacle 転送モードでのみ利用できます。

有効化(1)すると、エージェントは接続障害等でサーバに XML ファイルを送信できなかったとき、それをテンポラリディレクトリに保存します。それらは、通信が復旧したときに送られます。

The agent can now install its timezone offset with the server. This allows the server to make a scrolling of the time collected by the agent, so that it matches the local time of the server.

エージェントではサーバのタイムゾーンとのオフセットを設定できます。これは、エージェントが異なるタイムゾーンのサーバで稼働しているとき、同じ時間に合わせる場合にとても便利です。エージェントは、調整したタイムゾーンでサーバに送信します。

 # Timezone offset: Difference with the server timezone
 timezone_offset 3

サーバのタイムゾーンからエージェントのタイムゾーンを差し引いて計算されます。例えば、サーバのタイムゾーンが UTC+1 で、エージェントのタイムゾーンが UTC-5 であれば、タイムゾーンのオフセットは、6 = 1 - (-5) です。

ソフトウエアエージェントの親を指定します。Pandora FMS に存在するエージェント名である必要があります。

モジュールを並行して実行するエージェントのスレッド数です。デフォルトではシングルスレッドで、すべての処理完了まで 1つずつモジュールを実行します。これは、UNIX エージェントのみの機能です。

 # Number of threads to execute modules in parallel
 agent_threads 4
include <file>

It allows to include an additional configuration < file >. This file can contain additional modules and collections alongside the ones found in the main configuration file. This token is optional. The file can be uploaded by those users with (AW) Agent writing Profiles_in_Pandora_FMS.

別の設定 <ファイル> をインクルードすることができます。このファイルには、メインの設定ファイルに加えて追加のモジュールや収集を含めることができます。これはオプションです。ファイルのアップロードには、ユーザにエージェント書き込み(AW)のプロファイル が必要です。

broker_agent < broker_name >

It enables broker agent feature. To activate it, you only need to uncomment the parameter and indicate the name (< broker_name >) that will be assigned to the broker agent.

ブローカーエージェント機能を有効化します。有効化するにはパラメータのコメントを外し、ブローカーエージェントに割り当てる名前 (< broker_name >) を指定する必要があるだけです。メインの設定ファイルに記載したブローカーエージェントの名前で新たな設定ファイルが生成されます。この設定はメインのエージェントでのみ利用でき、作成された新たなエージェント設定内では利用できません。

pandora_user <user>

This parameter is optional and allows the agent to be executed with a specified system user(<user> . This user must have permissions to execute the agent and all associated resources.

このパラメータはオプションで、システムの特定のユーザ (<user>) でエージェントを実行させるためのものです。指定するユーザは、エージェントの実行権限等を持つ必要があります。

外部アプリケーションのための、エージェントのカスタム ID です。

コンソールでエージェントから開くカスタム URL です。

システムに設定済のエージェントのカスタムフィールド名です。存在しない場合は無視されます。

例:

custom_field1_name Model

前述のパラメータで定義されたカスタムフィールド X の値です。

例:

custom_field1_value C1700

Software Agent for Unix/Linux.

Unix/Linux 用ソフトウエアエージェント

module_macro<_macro_name_ > < value >

It defines a Local_execution_macros that can be used in the definition of a module. These macros are used in the Metaconsole system and local module components system to “abstract” the difficulty of using a module by directly editing the code, presenting a local interface that allows to “fill in” values to a less advanced user. These values are used below, using a macros system, relatively similar to the macros system of the local plugins.

モジュールの定義で利用可能なローカル実行マクロを定義します。これらのマクロは、メタコンソールシステムとローカルモジュールコンポーネントシステムで使用され、コードを直接編集することで難しくなるモジュール定義を「抽象化」し、高度なユーザに値を「入力」できるローカルインターフェイスを提供します。 これらの値は、ローカルプラグインのマクロシステムに比較的似たマクロシステムを使用して、以下のように使用できます。

Local execution macros start by _fieldx_.

_fieldx_ で始まるローカル拡張マクロ。

Example:

例:

module_begin
module_name Particion_opt
module_type generic_data
module_exec df -kh _field1_ | tail -1 |  awk '{ print $5}' | tr -d "%"
module_macro_field1_ /opt
module_end
group_password <password>

Password for the agent group. Leave it commented if the group is not password-protected.

エージェントグループのパスワードです。グループのパスワード保護をしない場合は、コメントアウトした状態にしてください。

ehorus_conf <path>

Absolute path to a valid eHorus agent configuration file. The agent will create a custom field named eHorusID that contains the eHorus agent's identifying key.

有効な eHorus エージェント設定ファイルへの絶対パス。エージェントは、eHorus エージェントの識別キーを含む eHorusID という名前のカスタムフィールドを作成します。

transfer_mode_user <user>

User of files copied in the local transfer mode. In console folders, this user must have reading and writing permissions for the remote configuration to work properly. By default it is apache.

ローカル転送モードでコピーされるファイルのユーザでえす。正しく動作するためには、コンソールのフォルダで、このユーザがリモート設定ファイルを読み書きできる権限が必要です。デフォルトは apache です。

secondary_groups <group name1>, <group name2>, ... <group nameN>

エージェントに割り当てるセカンダリグループ名です。複数のセカンダリグループをカンマ区切りで指定できます。サーバ上に存在しないグループを指定した場合はグループは割り当てられませんが、エージェントの作成には影響ありません。

standby <1|0>

エージェントがスタンバイモード(standby 1)の場合、エージェントは監視を実行せず XML の生成や送信を行いません。この設定は、リモート設定がある Enterprise 版の利用時に意味があります。これにより、エージェントを無効化した場合に動作を停止することができます。

デバッグモードの場合はこの機能を上書きし、エージェントは通常動作をします。

module_absoluteinterval <interval>[s,m,h,d]
module_absoluteinterval once

Specifies the execution interval for the module, but unlike module_interval:

モジュールの実行間隔を指定しますが、module_interval とは異なります。

- Remember the last run date when the agent is restarted. The module will not run until the specified interval has passed. - Allows you to specify the interval in seconds, minutes, hours or days (e.g., 30s, 5m, 1h, 7d). - It is possible to configure modules to be executed only once by specifying once as the interval value.

- エージェントを再起動するときに、最後の実行日を記憶します。 モジュールは、指定された間隔が経過するまで実行されません。 - 間隔を秒、分、時間、または日単位で指定できます (例: 30s5m1h7d)。 - 間隔値として once を指定することで、モジュールが 1 回だけ実行されるように設定できます。

データを送信するセカンダリサーバを設定することができます。設定により二種類の動作モードがあります。

  • on_error: プライマリサーバにデータを送信出来なかった場合のみ、セカンダリサーバにデータを送信します。
  • always: プライマリサーバにデータが送信できるかどうかに関わらず、常にセカンダリサーバにもデータを送信します。

Bear in mind that UDP is unsafe by nature (but efficient to send messages without compromising a true response).

UDPは本質的に安全ではないことに注意してください(ただし、応答を必須としないメッセージを送信するには効率的です)。

Pandora FMS エージェントは、 リモートからコマンドを受け取る設定ができます。このサーバは、ユーザが指定した UDP のポートで待ち受けており、アラートが発生したときに何らかのコマンドを実行するなど、リモートシステム (基本的には Pandora FMS) から命令を受け取ることができます。

UDP リモートサーバの設定には、いくつかのオプションがあり、pandora_agent.conf にて設定します。

  • udp_server:UDP サーバを有効にする場合は 1 を設定します。デフォルトでは無効です。
  • udp_server_port: 待ち受けポート番号を設定します。
  • udp_server_auth_address: 命令の送信を許可する IPアドレスを設定します。カンマ区切りで複数のアドレスを指定できます。0.0.0.0 に設定すると、UDP サーバはすべてのアドレスからのリクエストを受け付けます。

Although it can be set to 0.0.0.0 for accepting from all sources, said practice is not recommended. If you have several Pandora FMS servers and/or use IPv6, you may add different IP adresses separated by commas. For instance, if you have in IPv6:2001:0db8:0000:130F:0000:0000:087C:140B and its abbreviation is 2001:0db8:0:130F::87C:140B, use both separated by commas.

すべてのソースからのコマンド受け入れのために 0.0.0.0 に設定できますが、この方法はお勧めしません。複数の Pandora FMS サーバがある場合、または IPv6 を使用している場合は、カンマで区切って異なる IP アドレスを追加できます。たとえば、 IPv6:2001:0db8:0000:130F:0000:0000:087C:140B があり、その省略形が 2001:0db8:0:130F::87C:140B の場合は、両方をカンマで区切って指定します。

  • process_<name>_start <command>: ユーザ定義プロセスを起動するコマンドを設定します。
  • process_<name>_stop <command>: プロセスを停止するコマンドを設定します。
  • service_<name> 1: リモートから停止や起動ができるサービス名 <name> を設定します。

設定例:

 udp_server 1
 udp_server_port 4321
 udp_server_auth_address 192.168.1.23
 process_firefox_start firefox
 process_firefox_stop killall firefox
 service_messenger 1

サーバは、次のコマンドを受け付けます。

 * **<START|STOP> SERVICE <サービス名>**: サービスの起動や停止を行います。
 * **<START|STOP> PROCESS <プロセス名>**: プロセスの起動や停止を行います。
 * **REFRESH AGENT <エージェント名>**: エージェントの強制実行および、データの更新を行います。

例:

 STOP SERVICE messenger
 START PROCESS firefox
 REFRESH AGENT 007

サーバの /util/udp_client.pl に、Pandora FMS サーバでアラート発生時にプロセスやサービスを起動できる実行コマンドとして利用できるスクリプトがあります。次のような書式で利用します。

./udp_client.pl <address> <port> <command>

例えば、エージェントを再起動するには次のようにします。

./udp_client.pl 192.168.50.30 41122 "REFRESH AGENT"

The local execution modules are defined in the configuration file pandora_agent.conf. The general syntax is the following:

設定ファイル pandora_agent.conf にてローカルモジュールの実行を定義します。利用可能な全パラメータを以下に説明します。一般的な書式は次の通りです。

 module_begin
 module_name <モジュール名>
 module_type generic_data
 module_exec <実行するローカルコマンド>
 module_end

モジュールのフィールド情報はモジュール作成時にのみ反映されます(モジュールデータ、説明、拡張情報を除く)。モジュールがすでに存在する場合は更新されません。

module_begin

モジュール定義の開始を示す、必須項目です。

module_name

モジュールの名前です(必須)。重複した名前は設定できません。

module_name <名前>

module_type

module_type <タイプ>

モジュールが返すデータタイプです。いずれか一つを選択することが必須です。指定可能なデータタイプは次の通りです。

  • Numeric ( generic_data ): Single, floating point, or integer numeric data.
  • Incremental ( generic_data_inc ): Numeric data equal to the difference between the current value and the previous value divided by the number of seconds elapsed. When this difference is negative, the value is reset, this means that when the difference becomes positive again, the previous value will be taken as long as the increment returns to a positive value.
  • Incremental absolute ( generic_data_inc_abs ): Numeric data equal to the difference between the current value and the previous value, without dividing by the number of seconds elapsed, to measure total increment instead of increment per second. When this difference is negative, the value is reset, this means that when the difference becomes positive again, the last value from which the current increment obtained is positive will be used.
  • Alphanumeric ( generic_data_string ): Returns alphanumeric text strings.
  • Booleans ( generic_proc ): For values that can only be correct or affirmative (1) or incorrect or negative (0). Useful to check if a computer is alive, or a process or service is running. A negative value (0) is pre-assigned to the critical state, while any higher value will be considered correct.
  • Asynchronous alphanumeric ( async_string ): For asynchronous text strings. Asynchronous monitoring depends on events or changes that may or may not occur, so this type of Module is never in an unknown state.
  • Async Boolean ( async_proc ): For boolean values of async type.
  • Asynchronous Numeric ( async_data ): For numeric values of asynchronous type.
  • Numerical (generic_data): 小数または整数の数値データです。小数値の場合は整数に切り捨てられます。
  • Incremental (generic_data_inc): 前の値と現在の値の差分を間隔の時間で割ったデータです。差分がマイナスの場合は値はリセットされます。これは、差分は再びプラスになること、増分がプラスの値である限りは前のデータとの差が利用されることを意味します。
  • Incremental absolute (generic_data_inc_abs): 前の値と現在の値の差分データです。絶対的な差分の値であり、単位時間あたりの差分ではありません。差分がマイナスの場合は値はリセットされます。差分が再びプラスになった場合はベースの値として利用され、そこから差分が計算されます。
  • Alphanumeric (generic_data_string): 文字列です。
  • Booleans (generic_proc): 正常(1)または異常(0)をとる値です。コンピュータが動いているか、プロセスやサービスが動いているかどうかのチェックに便利です。異常値(0)には障害状態があらかじめ設定されています。それよりも大きい任意の値(1より大きい数字も扱えます)は正常と判断されます。
  • Asynchronous Alphanumeric (async_string): (定期実行ではない)非同期の文字列収集に使います。非同期監視は、任意のタイミングで発生するイベントや変更に依存するため、このタイプのモジュールは不明状態にはなりません。
  • Async Boolean (async_proc): generic_proc と似ていますが、非同期のデータタイプです。
  • Asynchronous Numeric (async_data): generic_data と似ていますが、非同期のデータタイプです。

module_min

module_min <値>

そのモジュールが返すことを許容されるデータの最小値です。範囲を外れたデータはサーバにより削除されます。

module_max

module_max <値>

そのモジュールが返すことを許容されるデータの最大値です。範囲を外れたデータはサーバにより削除されます。

module_min_warning

module_min_warning <値>

モジュールが警告状態になる最小値です。

module_max_warning

module_max_warning <値>

モジュールが警告状態になる最大値です。

module_min_critical

module_min_critical <値>

モジュールが障害状態になる最小値です。

module_max_critical

module_max_critical <値>

モジュールが障害状態になる最大値です。

module_disabled

module_disabled <値>

モジュールが、有効(0)か無効(1)かを表します。

module_min_ff_event

module_min_ff_event <値>

連続抑制回数を指定します。連続抑制回数とは、収集データに揺らぎがあるような場合に、それを変化としてとらえないように抑止するものです。

module_each_ff

module_each_ff <0|1>

有効化(1)すると、module_min_ff_event の代わりに連続抑制回数に個別状態変化(module_min_ff_event_normal, module_min_ff_event_warning および module_min_ff_event_critical)を利用します。

module_min_ff_event_normal

module_min_ff_event_normal <値>

個別状態変化で、正常状態へ移行する場合の連続抑制回数です。

module_min_ff_event_warning

module_min_ff_event_warning <値>

個別状態変化で、警告状態へ移行する場合の連続抑制回数です。

module_min_ff_event_critical

module_min_ff_event_critical <値>

個別状態変化で、障害状態へ移行する場合の連続抑制回数です。

module_ff_timeout

module_ff_timeout <秒>

指定した秒数が経過したら連続抑制回数のカウンターをリセットします。これは、module_min_ff_event に指定した抑制回数の状態変化が module_ff_timeout に指定の秒数以内に発生する必要があることを意味します。

module_ff_type

module_ff_type <値>

これは、連続抑制の高度なオプションで、モジュールの状態を制御します。 “カウンタを保持する” ことによって、値の代わりに、受け取った値を持つモジュールの状態に応じて、ある状態から別の状態に渡すカウンタ値をいくつか設定します。

有効(1)か無効(0)かを指定します。

module_ff_event

module_ff_event X

This is the flip flip execution threshold of the module (in seconds).

これは、モジュールの連続抑制実行のしきい値(秒単位)です。

module_description

module_description <テキスト>

モジュールの任意のコメントです。

module_interval

module_interval <間隔倍率>

それぞれのモジュールの実行間隔をエージェントの間隔の倍率で設定することができます。例えば、エージェントが 300 (5 分)間隔の設定であった場合に、あるモジュールだけ 15分間隔にしたいときに、module_interval 3 を設定します。そのモジュールは、300秒 x 3 = 900秒 (15分) 間隔で実行されます。

ブローカーエージェントで module_interval が動作するようにするには、元のエージェントと同じ間隔に設定する必要があります。 そうしないと、正しく動作しない可能性があります。

module_timeout

module_timeout <秒数>

モジュールの最大実行時間を秒単位で指定します。実行中にこの時間を超過した場合は、実行が中止されます。

module_postprocess

module_postprocess <倍率>

モジュールから返される値を何倍するかの値です。データの単位を変換するのに便利です。もし、エージェントが取得した値に 1024 を掛けたい場合は、1024 を設定します。また、1024 で割りたい場合は、1/1024 を意味する 0.000976563 を設定します。

module_save

module_save <変数名>

このパラメータで定義された名前の変数にモジュールから返された値を保存します。この値はあとから他のモジュールで利用できます。

例:

 module_begin
 module_name echo_1
 module_type generic_data
 module_exec echo 41121
 module_save ECHO_1
 module_end

“ECHO_1” という変数に、値 41121 を保存します。

 module_begin
 module_name echo_2
 module_type generic_data
 module_exec echo $ECHO_1
 module_end

2つ目のモジュールでは、“$ECHO_1” という変数の内容を表示します。“41121” となります。

Windows エージェントでは、変数は $var ではなく %var% で指定します。 以下に例を示します。

 module_begin
 module_name echo_2
 module_type generic_data
 module_exec echo %ECHO_1%
 module_end

module_crontab

From version 3.2, it's possible to schedule modules in the order they'll be executed on a specific date. To do this, you're required to define the module_crontab', using a similar format to that of the crontab file:

バージョン 3.2 から、モジュールを指定した日時に実行させるようにすることができます。この設定は、module_crontab にて、crontab ファイルに似た設定を行うことにより実現します。

module_crontab <分> <時間> <日> <月> <曜日>

指定可能な範囲は次の通りです。

  • 分 0-59
  • 時間 0-23
  • 日 1-31
  • 月 1-12
  • 曜日 0-6 (0 が日曜です)

期間を指定する - を利用することも可能です。

例えば、あるモジュールを毎週月曜の 12時から 15時の間に実行するには、次のような設定をします。

 module_begin
 module_name crontab_test
 module_type generic_data
 module_exec script.sh
 module_crontab * 12-15 * * 1
 module_end

コマンドを毎時 10分に実行したい場合は、次のようにします。

 module_begin
 module_name crontab_test3
 module_type generic_data
 module_exec script.sh
 module_crontab 10 * * * *
 module_end

module_condition

module_condition <評価式> <コマンド>

バージョン 3.2 から、モジュールが特定の値を返す場合にコマンドを実行させることが可能です。次に示すオプションの一つを定義します。

  • > [値]: モジュールの値が指定された値よりも大きい場合にコマンドを実行します。
  • < [値]: モジュールの値が指定された値よりも小さい場合にコマンドを実行します。
  • = [値]: モジュールの値が指定された値と同じ場合にコマンドを実行します。
  • != [値]: モジュールの値が指定された値と異なる場合にコマンドを実行します。
  • =~ [正規表現]: モジュールの値が指定された正規表現にマッチする場合にコマンドを実行します。
  • ( 値, 値): モジュールの値が指定された値の範囲の場合にコマンドを実行します。

同一のモジュールに複数の条件を設定することも可能です。以下の例では、モジュールの値が 1 と 3 の間の時にscript_1.sh が実行されます。また、モジュールの値が 5.5 より大きい時に script_2.sh が実行されます。module_exec の結果が 2.5 なので、最初の script_1.sh のみ実行されます。

 module_begin
 module_name condition_test
 module_type generic_data
 module_exec echo 2.5
 module_condition (1, 3) script_1.sh
 module_condition> 5.5 script_2.sh
 module_end

例:

 module_begin
 module_name MyProcess
 module_type generic_data
 module_exec tasklist | grep MyProcess | wc -l
 module_condition> 2 taskkill /IM MyProcess* /F
 module_end
 module_begin
 module_name PandoraLogSize
 module_type generic_data
 module_exec ls -la "c:\Archivos de programa\pandora_agent\pandora_agent.log" | gawk "{ print $5 }"
 module_condition> 10000 del "c:\Archivos de programa\pandora_agent\pandora_agent.log"
 module_end
 module_begin
 module_name Service_Spooler
 module_type generic_proc
 module_service Spooler
 module_condition = 0 net start Spooler
 module_end
  • 注意: Windows プラットホームでは、コマンドの実行にはそれが正しく実行されていることを確認するために cmd.exe /c を利用することをお勧めします。例えば次の通りです。
 module_begin
 module_name condition_test
 module_type generic_data
 module_exec echo 5
 module_condition (2, 8) cmd.exe /c script.bat
 module_end

module_precondition

module_precondition <評価式> <コマンド>

事前状態定義にマッチした場合モジュールを実行します。次に示すオプションの一つを定義します。

  • > [値]: コマンドの実行結果が指定された値よりも大きい場合にモジュールを実行します。
  • < [値]: コマンドの実行結果が指定された値よりも小さい場合にモジュールを実行します。
  • = [値]: コマンドの実行結果が指定された値と同じ場合にモジュールを実行します。
  • != [値]: コマンドの実行結果が指定された値と異なる場合にモジュールを実行します。
  • =~ [正規表現]: コマンドの実行結果が指定された正規表現にマッチする場合にモジュールを実行します。
  • ( 値, 値): コマンドの実行結果が指定された値の範囲の場合にモジュールを実行します。

以下の例では、precondition で設定した実行結果が 2 と 8 の間の場合に、モジュール monitoring_variable.bat が実行されます。この例では module_precondition の実行結果が 5 であるため、値が 2 と 8 の間であり、monitoring_variable.bat が実行されます。

 module_begin
 module_name Precondition_test1
 module_type generic_data
 module_precondition (2, 8) echo 5
 module_exec monitoring_variable.bat
 module_end

module_condition と同様に、複数の事前状態定義を利用することができます。モジュールは、すべての事前状態定義にマッチした場合のみ実行されます。

 module_begin
 module_name Precondition_test2
 module_type generic_data
 module_precondition (2, 8) echo 5
 module_precondition <3 echo 5
 module_exec monitoring_variable.bat
 module_end
  • 注意: Windows プラットホームでは、コマンドの実行にはそれが正しく実行されていることを確認するために cmd.exe /c を利用することをお勧めします。例えば次の通りです。
 module_begin
 module_name Precondition_test3
 module_type generic_data
 module_precondition (2, 8) cmd.exe /c script.bat
 module_exec monitoring_variable.bat
 module_end

module_unit

module_unit <単位>

これは、モジュールの値に付与する単位です。

例:

module_unit %

module_group

module_group <値>

これは、モジュールグループ名です。

例:

module_group Networking

module_custom_id

module_custom_id <値>

モジュールのカスタム ID です。

例:

module_custom_id host101

module_str_warning

module_str_warning <値>

文字列タイプのモジュールで警告状態を定義する正規表現です。

例:

module_str_warning .*NOTICE.*

module_str_critical

module_str_critical <値>

文字列タイプのモジュールで障害状態を定義する正規表現です。

例:

module_str_critical .*CRITICAL.*

module_warning_instructions

module_warning_instructions <値>

モジュールが警告状態に変化したときのオペレータへの指示です。

例:

module_warning_instructions Increase incident priority

module_critical_instructions

module_critical_instructions <値>

モジュールが障害状態に変化したときのオペレータへの指示です。

例:

module_critical_instructions Call to sys department

module_unknown_instructions

module_unknown_instructions <値>

モジュールが不明状態に変化したときのオペレータへの指示です。

例:

module_unknown_instructions Open incident

module_tags

module_tags <値>

カンマ区切りでモジュールに割り当てるタグを指定します。

例:

module_tags tag1,tag2,tag3

module_warning_inverse

module_warning_inverse <値>

警告閾値範囲の反転を有効化(1)します。

例:

module_warning_inverse 1

module_critical_inverse

module_critical_inverse <値>

障害閾値範囲の反転を有効化(1)します。

例:

module_critical_inverse 1

module_native_encoding

On Win32 only.

Win32 のみ

module_native_encoding <値>

この設定トークンは、module_exec によってコマンドラインから実行されるモジュールにのみ影響します。

Windows では、コマンドラインエンコーディング(OEM)、システムエンコーディング(ANSI)および、UTF-16 の 3つのプロセスのエンコーディングがあります。いずれのエンコーディングも通常の文字を扱うことができますが、アクセントを表したものなどいくつかの文字に違いがあります。このトークンにより、Pandora エージェントが設定ファイル(pandora_agent.conf)で指定したエンコーディングに出力を変換します。

module_native_encoding は、次の 4種類の値を設定できます。

  • module_native_encoding OEM: コマンドラインエンコーディングに変換
  • module_native_encoding ANSI: システムエンコーディングに変換
  • module_native_encoding UTFLE: UTF-16 のリトルエンディアンに変換
  • module_native_encoding UTFBE: UTF-16 のビッグエンディアンに変換

module_native_encoding の設定が無い場合は、変換は行われません。

module_quiet

module_quiet <値>

If enabled (1) the module will be in silent mode: it will not generate events nor trigger alerts.

有効化(1)すると、モジュールは静観モードになります。イベントやアラートを生成しません。

Example:

例:

module_quiet 1

module_ff_interval

module_ff_interval <値>

収集データに揺らぎがあるような場合に、それを変化としてとらえるべきかを判断する期間のデータ収集間隔です。(秒単位)

例:

module_ff_interval 2

module_macro

module_macro<マクロ> <値>

コンソールから、ローカルコンポーネントにのみ適用できます。設定ファイルで直接設定しません。

module_alert_template

module_alert_template <テンプレート名>

このマクロは、パラメータ名(アラートテンプレート 参照)に対応したモジュールにアラートテンプレートを割り当てます。

例:

 <module>
 <name><![CDATA[CPU usage]]></name>
 <type>generic_data</type>
 <module_interval>1</module_interval>
 <min_critical>91</min_critical>
 <max_critical>100</max_critical>
 <min_warning>70</min_warning>
 <max_warning>90</max_warning>
 <alert_template><![CDATA[Critical condition]]></alert_template>
 <data><![CDATA[92]]></data>
 </module>

intensive_interval

Intensive monitoring interval. Modules using module_intensive_monitorig can report whether their state is incorrect in this range.

高頻度モニタリング間隔です。module_intensive_monitoring を設定したモジュールは、障害状態の場合にこの間隔で実行できます。

module_intensive_condition

Condition for intensive monitoring. When an intensive monitoring module reaches the value configured in this parameter, it must notify in the intensive_interval defined.

高頻度モニタリングのための状態です。高頻度監視モジュールがこのパラメータで設定された値に達した場合、intensive_interval で設定した間隔で実行されます。

module_end

モジュール定義の終わりを表します。必須項目です。

In each Module only one of these types can be used.

各モジュールでは、これらのタイプのうち 1 つだけ使用できます。

module_exec

module_exec <コマンド>

General < command > execution line. The desired run must be specified to obtain the information in a single line.

一般的な<コマンド>実行行です。 1行で情報を取得するコマンドを指定する必要があります。

On GNU/Linux, the command will be executed using the default command prompt. The default interpreter will be determined by the symbolic link /bin/sh. Usually the link points to bash, but in systems like Ubuntu this is not the case (in this case it points to dash). Therefore, it could happen that a command is tested in the terminal and then there is an error when the agent executes it. A solution that will work in most cases will be forcing the bash execution of the command as follows:

GNU/Linux では、コマンドはデフォルトのシェルを使って実行されます。デフォルトのシェルは、 /bin/sh のシンボリックリンクによって決まります。通常は、bash ですが、Ubuntu のシステムでは異なります(この場合 dash)。端末でコマンドをテストしても、エージェントからの実行ではエラーが発生する可能性があります。解決策としては、次のようにコマンドラインの実行で明示的に bash を記載します。

module_exec bash -c "<command>"

実行結果が '0' 以外を返す場合は、実行エラーであり情報は取り込まれません。

Windows エージェントでのデータ取得のためのディレクティブは他にもあります。以下に示します。

module_service

module_service <サービス>

指定したサービスが実行中であるかどうかをチェックします。

MS Windows

サービス名にスペースが含まれる場合は、“ ” でくくるのを忘れないようにしてください。

 module_begin
 module_name Service_Dhcp
 module_type generic_proc
 module_service Dhcp
 module_description Service DHCP Client
 module_end

サービスは、Windows サービスマネージャに表示される短い名前 (サービス名) で識別されます。

非同期モード

Pandora FMS は通常、(モジュールによって定義される)一定の秒間隔にてチェックを実行します (デフォルトでは、300秒 = 5分)。そのため、チェックの直後にサービスがダウンすると、それがダウンであると認識するのに、さらに 300秒かかります。非同期モジュールでは、Pandora に “今すぐ” サービスの障害を通知するようにできます。これは、非同期 操作モードと呼んでいます。非同期モードにするには、以下のディレクティブを設定してください。

module_async yes

この機能は、ブローカーエージェントでは利用できません。

Windows Home Edition では、この非同期機能はサポートされていません。Pandora エージェントはサービスが動作しているかどうかを定期的に確認します。大量のサービスを監視する場合システムリソースを消費するため、同期モードを利用することをお勧めします。

サービスのウォッチドッグ

サービスがダウンしたときに再起動するためのウォッチドッグモードがあります。サービスを起動するためのパラメータは Windows が認識しているため必要ありません。設定は簡単で、以下に例を示します。

 module_begin
 module_name ServiceSched
 module_type generic_proc
 module_service Schedule
 module_description Service Task scheduler
 module_async yes
 module_watchdog yes
 module_end
Unix

Unix でも Windows と同様に動作します。違いは Unix であることだけで、プロセスおよびサービスは同じ考え方です。例えば、bash プロセスが動作しているかを確認するには次のようにします。

 module_begin
 module_name Service_bash
 module_type generic_proc
 module_service /bin/bash
 module_description Process bash running
 module_end

Watchdog mode and asynchronous detection are not possible in the Unix agent.

Unix エージェントでは、ウォッチドッグと非同期検出はできません。

For module_service you must put full path just as you see with command command ps aux . In example, search for SSH service:

module_service では、ps aux で表示されるコマンドのフルパスを指定する必要があります。以下の例では、SSH サービスをチェックします。

 ps aux | grep ssh

Configure it:

module_begin
module_name MY_SSHD
module_type generic_proc
module_service /usr/sbin/sshd -D
module_description Is sshd running?
module_end

module_proc

module_proc <プロセス>

指定した名前のプロセスがいるかどうかをチェックします。

Windows

プロセス名にスペースが含まれていても、“ ” は使わない でください。プロセス名に拡張子 .exe がつくかどうかを良く確認してください。モジュールは、指定した名前で実行されているプロセスの数を返します。

以下に cmd.exe プロセスをモニタリングする例を示します。

 module_begin
 module_name CMDProcess
 module_type generic_proc
 module_proc cmd.exe
 module_description Process Command line
 module_end

非同期モード

サービスと同じように、モニタリングしているプロセスにて何らかの原因で障害が発生することがあります。Windows エージェントでは、module_proc モジュールで非同期チェックをサポートしています。この場合、プロセスの状態が変化したとき、通常のモニタリング間隔における次のチェックタイミングを待たずにすぐに 通知されます。これにより、プロセスに障害が発生したのとほぼ同時にそれを知ることができます。以下にプロセスの非同期モニタリング設定の例を示します。

 module_begin
 module_name Notepad
 module_type generic_proc
 module_proc notepad.exe
 module_description Notepad
 module_async yes
 module_end

違いは、“module_async yes” が設定されている点です。

プロセスのウォッチドッグ This feature is not supported on broker agents.

ウォッチドッグは、ダウンしたプロセスを見つけた場合にそれをすぐに起動させることができます。Pandora FMS の Windows エージェントは、プロセスがダウンしたときにウォッチドッグとして動作させることができます。

プロセスの実行には、いくつかのパラメータが必要です。このモジュールには、いくつかの追加設定オプションがあります。ウォッチドッグ モードは、モジュールタイプが非同期 の場合のみ動作することに注意してください。ウォッチドッグでの module_proc の設定例を見てみます。

 module_begin
 module_name Notepad
 module_type generic_proc
 module_proc notepad.exe
 module_description Notepad
 module_async yes
 module_watchdog yes
 module_start_command c:\windows\notepad.exe
 module_startdelay 3000
 module_retrydelay 2000
 module_retries 5
 module_end

以下に、ウォッチドッグを行う場合の module_proc の追加パラメータを示します。

  • module_retries:ウォッチドッグによりプロセスを起動させるリトライ回数を指定します。指定した回数に達した場合、該当モジュールのウォッチドッグは無効になり、ユーザによる復旧 (少なくともエージェントの再起動) がされるまでプロセスの起動を行わなくなります。デフォルトでは上限はありません。
  • module_startdelay:プロセスのダウンを認識した後、最初にプロセスを起動させるまでの待ち時間をミリ秒単位で指定します。
  • module_retrydelay:プロセスダウンを検知した後に起動に失敗した場合の再実行の待ち時間をミリ秒単位で指定します。
  • module_user_session: プロセスの起動をどのセッションで行うかを制御します。'no' に設定すると、プロセスはサービスセッションで起動し、バックグラウンドで動作します(デフォルト)。'yes' に設定すると、プロセスはユーザセッションで起動し、PC のデスクトップに表示されます。

Windows Vista 以前のバージョンでは、Pandora FMS サービスプロパティで、“Interactive access with desktop” を有効にすることにより module_user_session を設定することができます。以下のスクリーンショットに示します。

また、Pandora FMS は “SYSTEM” アカウントのサービスとして動作するため、実行されるコマンドはこのユーザおよびこのユーザの環境で動作することに注意してください。したがって、特定のプロセスを特定のユーザで実行したい場合は、環境変数の設定やその他事前処理を行う呼び出し用スクリプト (.bat など) を用意し、そのスクリプトをウォッチドッグの起動プログラムとして設定する必要があります。

module_cpuproc <プロセス> (Unix のみ)

特定のプロセスの CPU 使用率を返します。

 module_begin
 module_name myserver_cpu
 module_type generic_data
 module_cpuproc myserver
 module_description Process Command line
 module_end

Unix

UNIX では、このモジュールは module_service のように動作します。非同期およびウォッチドッグモードはサポートしません。

module_memproc

module_memproc <プロセス>

Unixのみです。 特定のプロセスが利用しているメモリ量を返します。

 module_begin
 module_name myserver_mem
 module_type generic_data
 module_memproc myserver
 module_description Process Command line
 module_end

module_freedisk

module_freedisk <ドライブ名:>|<ボリューム>

It checks for the free space in the disk unit.

このモジュールは、ディスクの空き容量をチェックします。

In Windows®

Windows® の場合

Place : after the <disk_letter:>

ドライブ名の後に : を記載します。

module_begin
module_name freedisk
module_type generic_data
module_freedisk C:
module_end

In Unix®

Unix® の場合

The volume to check, such as /var.

/var のようにチェックするボリュームを指定します。

module_begin
module_name disk_var
module_type generic_data
module_freedisk /var
module_end

module_freepercentdisk

module_freepercentdisk <ドライブ名:>|<ボリューム>

このモジュールは、ディスクの空きをパーセントで返します。

Windows

ドライブ名: (“:“を忘れないようにしてください) を指定します。

 module_begin
 module_name freepercentdisk
 module_type generic_data
 module_freepercentdisk C:
 module_end

Unix

/var などのボリュームを指定します。

 module_begin
 module_name disk_var
 module_type generic_data
 module_freepercentdisk /var
 module_end

module_occupiedpercentdisk

module_occupiedpercentdisk <ドライブ名:>|<ボリューム>

Unix のみです。 このモジュールは、/var 等の Unix ファイルシステムのディスク使用率(%)を返します。

 module_begin
 module_name disk_var
 module_type generic_data
 module_occupiedpercentdisk /var
 module_end

module_cpuusage

module_cpuusage <cpu id|all>

このモジュールは、UNIX および Windows 双方で使えます。指定した CPU 番号の CPU 使用率を返します。CPU が 1つしかない場合は番号を指定しないか、all を指定します。

次のように、マルチ CPU 環境で全 CPU の平均使用率を得ることができます。

 module_begin
 module_name SystemCPU
 module_type generic_data
 module_cpuusage all
 module_description Average CPU use in systme
 module_end

1つ目の CPU 使用率を確認するのは次のようにします。

 module_begin
 module_name SystemCPU_1
 module_type generic_data
 module_cpuusage 1
 module_description Average CPU use in system for CPU #1
 module_end

module_freememory

Windows および Unix 双方で使えます。システム全体の空きメモリ量を取得します。

 module_begin
 module_name FreeMemory
 module_type generic_data
 module_freememory
 module_description Non-used memory on system
 module_end

module_freepercentmemory

Windows および Unix 双方で使えます。システム全体の空きメモリ量のパーセンテージを取得します。

 module_begin
 module_name freepercentmemory
 module_type generic_data
 module_freepercentmemory
 module_end

module_tcpcheck

Windows のみです。 このモジュールは、指定された IPアドレスおよびポート番号への接続確認を行います。成功すると 1 が返り、失敗すると 0 が返ります。なお、タイムアウトを設定する必要があります。

 module_begin
 module_name tcpcheck
 module_type generic_proc
 module_tcpcheck www.artica.es
 module_port 80
 module_timeout 5
 module_end

module_regexp

Windows のみです。このモジュールは、 正規表現を使ってファイル(ログ)の内容の比較を行います。モニタリングを開始した時点ですでに存在している行については無視します。モジュールが返す値はモジュールタイプにより異なります。

  • generic_data_string, async_string: 正規表現にマッチした行全体を返します。
  • generic_data: 正規表現にマッチした行数を返します。
  • generic_proc: 正規表現にマッチしたら 1、そうでなければ 0 を返します。
  • module_noseekeof: 0 がデフォルトです。これを有効にすると、それぞれのモジュールの実行において、ターゲットのファイル更新からは独立して、ファイルの EOF を確認することなくチェック処理が実行されます。これにより、常に検索パターンにマッチするすべての行が XML 出力に展開されます。
 module_begin
 module_name regexp
 module_type generic_data_string
 module_regexp C:\WINDOWS\my.log
 module_pattern ^\[error\].*
 module_noseekeof 1
 module_end

module_wmiquery

Windows のみです。WMI モジュールは、外部ツールを使わずにローカルで WMI クエリを実行できます。2つのパラメータで設定します。

  • module_wmiquery: 利用する WQL クエリを設定します。さまざまなデータを含む複数の行で結果を得ることができます。
  • module_wmicolumn:データソースとして利用するカラム名を設定します。

例えば、インストールされているサービス一覧を取得するには次のようにします。

 module_begin
 module_name Services
 module_type generic_data_string
 module_wmiquery Select Name from Win32_Service
 module_wmicolumn Name
 module_end

現在の CPU 負荷であれば次のようにします。

 module_begin
 module_name CPU_speed
 module_type generic_data
 module_wmiquery SELECT LoadPercentage FROM Win32_Processor
 module_wmicolumn LoadPercentage
 module_end

module_perfcounter

Windowsのみです。 PDH インタフェースを通して、パフォーマンスカウンタ (http://msdn.microsoft.com/ja-jp/library/aa373083(v = vs.85).aspx パフォーマンスカウンタドキュメント) からデータを取得します。Windows のライブラリの pdh.dll がインストールされている必要があります。もしインストールされていない場合は、Windows パフォーマンス解析ツールをインストールする必要があります (通常はデフォルトでインストールされています)。

 module_begin
 module_name perfcounter
 module_type generic_data
 module_perfcounter \Memory\Pages/sec
 module_end

Windows パフォーマンスモニタは、モニタリングに利用できる何百ものパラメータを持つ強力なツールです。加えて、各ベンダによる独自のモニタ項目も追加されています。

パフォーマンスツールから、パフォーマンスカウンターを確認できます。

システムツールを用いて新たなパフォーマンスカウンターを追加することができます。その構成には、要素とサブ要素を含む管理構造があります。ここでは、Processor, % of processor time および _Total です。

このように、OS のツールを使うことにより、システムパフォーマンスのさまざまな要素を取り込むことができます。この場合、モジュールの設定は次のようになります。

 module_begin
 module_name Processor_Time
 module_type generic_data_inc
 module_perfcounter \Processor(_Total)\% of time processor
 module_end

デフォルトでは、カウンタの生データが表示されます。調整値を取得するには、module_cooked 1 を設定します。

 module_begin
 module_name Disk_E/S_Sec
 module_type generic_data
 module_cooked 1
 module_perfcounter \PhysicalDisk(_Total)\E/S by second
 module_end

多くのデータは、カウンタ値として返ってきます。そのため、データタイプとしては generic_data_inc を使う必要があります。また、とても大きなスケール (数百万) のデータが返ってくることがありますので、事前処理モジュールで 0.000001 などを設定して値を小さくすると良いです。

module_inventory (廃止)

Windows および Linux/UNIX 双方で、現在この機能はエージェントプラグインによるインベントリで置き換えられています。

(Win32 のみ。Linux/Unix ではエージェントプラグインとして実装されています。)

前述の WMI を利用することにより、このモジュールはソフトウエアおよびハードウエアの違った情報を取得します。

モジュールは、取得した情報の種類を分類し収集します。以下に情報の種類の一覧を示します。

  • cpu: システムの CPU 情報を取得します。(プロセッサ名、クロック数、説明)
  • CDROM: CD-ROM の情報を取得します。(名称およびドライブ名)
  • Video: ビデオカードの情報を取得します。(説明、RAM容量、プロセッサ)
  • HDs: ハードディスクの情報を取得します。(モデル、サイズおよび、システムにおける名前)
  • NICs: ネットワークコントローラの情報を取得します。(説明、MAC アドレスおよび、IPアドレス)
  • Patches: インストール済のパッチ情報を取得します。(ID、説明、コメント)
  • Software: MSI パッケージの情報を取得します。(名前およびバージョン)
  • RAM: RAM モジュールの情報を取得します。(タグ、容量および名前)
  • Service: インストールされたサービスの情報を取得します。最初のカラムに、Pandora FMS がサービスのモニタリングに使う、サービスの短い名前が表示されます。

追加モジュールパラメータ:

  • module_interval: このモジュールは、日単位で 情報収集するための間隔を定義する追加設定です。

このモジュールの利用例を以下に示します。

 module_begin
 module_name Inventory
 module_interval 7
 module_type generic_data_string
 module_inventory RAM Patches Software Services
 module_description Inventory
 module_end

module_logevent

Windows のみです。指定されたパターンに基づいて Windows イベントログから情報を取得し、ソースおよびイベントタイプに従ってフィルタリングする機能を提供します。

このモジュールの一般的な書式は次の通りです。

 module_begin
 module_name MyEvent
 module_type async_string
 module_logevent
 module_source <logName>
 module_eventtype <event_type/level>
 module_eventcode <event_id>
 module_application <source>
 module_pattern <text substring to match>
 module_description
 module_end

すでに表示されたものを再度表示するのを防ぐために、エージェントが実行された最終時間より後のイベントのみを対象とします。

module_logevent には、次のパラメータを設定できます。(すべて大文字小文字を区別します)

  • module_source: イベントソース (System, Application, Security) を指定します。このフィールドは必須項目です。
  • module_eventtype: イベントタイプ (Error, Information 等) を指定します。このフィールドはオプションです。
  • module_pattern: 検索するパターン (文字列) を指定します。このフィールドはオプションです。
  • module_eventcode: 5112 等のイベント ID 番号です。このフィールドはオプションです。
  • module_application: イベント発生元のアプリケーションを指定します。イベントが検索される名前やログファイルを示す module_source と混同しないように注意してください。

例えば、system の error に分類される全てのイベントを表示するには、次のように設定します。

 module_begin
 module_name log_events
 module_type generic_data_string
 module_description System errors
 module_logevent
 module_source System
 module_eventtype error
 module_end

PandoraAgent という文字を含む全イベントを表示するには次のようにします。

 module_begin
 module_name log_events_pandora
 module_type async_string
 module_description PandoraAgent related events
 module_logevent
 module_source System
 module_pattern PandoraAgent
 module_end

その他例として、以下にイベントフィルタリングのスナップショットを示します。

 module_begin
 module_name MyEvent
 module_type async_string
 module_source Application
 module_eventtype Information
 module_eventcode 6000
 module_application Winlogon
 module_pattern unavailable to handle
 module_description
 module_end

Pandora FMS は、ログを収集するシステムではない ということを理解してください。このツールは、これらのクリティカルまたは重要なイベントを選択し、監視するためのシステムです。すべてのイベントを未分類で収集すると、データベースが飽和状態になりシステムパフォーマンスが著しく低下し、長期的に問題をもたらします。Pandora FMS を一般的なイベント収集ツールとして使うべきではありません。

module_logchannel

バージョン NG 715 以上および、Windows のみ

Windows ログチャネルに関する情報を取得するモジュールです。module_logevent は Windows ログにのみアクセスしますが、これは、チャネルとして設定された他のログファイルからデータを展開することができます。これにより、サービスやアプリケーションログを含めたログ取得が可能になります。

このモジュールの一般的な書式は次の通りです。

 module_begin
 module_name MyEvent
 module_type async_string
 module_logchannel
 module_source <ログチャネル>
 module_eventtype <イベントタイプ/レベル>
 module_eventcode <イベントID>
 module_application <ソース>
 module_pattern <マッチするテキスト文字列>
 module_description <説明>
 module_end

すでに表示されたものを再度表示するのを防ぐために、エージェントが実行された最終時間より後のイベントのみを対象とします。

module_logchannel には、次のパラメータを設定できます。(すべて大文字小文字を区別します)

  • module_source: イベントチャネルを指定します。wevtutil.exe enum-logs を実行すると、ローカルログチャネルの一覧を取得できます。このフィールドは必須項目です。
  • module_eventtype: イベントタイプ (critical, error, warning, info, verbose) を指定します。このフィールドはオプションです。
  • module_pattern: 検索するパターン (文字列) を指定します。このフィールドはオプションです。
  • module_eventcode: 5112 等のイベント ID 番号です。このフィールドはオプションです。
  • module_application: イベント発生元のアプリケーションを指定します。イベントが検索される名前やログファイルを示す module_source と混同しないように注意してください。

例えば、チャネル Microsoft-Windows-TaskScheduler/Operationalinformation タイプ、コード 201 、文字列 code 0 を含むすべてのイベントを表示するモジュールは次のようになります。

 module_begin
 module_name New logs
 module_type async_string
 module_logchannel
 module_description Successfully completed tasks
 module_source Microsoft-Windows-TaskScheduler/Operational
 module_eventtype information
 module_eventcode 201
 module_pattern code 0
 module_end

このモジュール設定により、Pandora FMS エージェントは次のようなログを収集します。

イベントチャネルの名前を取得するには、チャネルを右クリックして、”プロパティ(properties)” を選択し、パラメータ “フルネーム(Full name)” をコピーします。これは、module_source で必要です。

module_plugin

プラグインから取得したデータを定義するためのパラメータです。これは、特殊なモジュールで、'module_begin' や 'module_type' などの 他の識別子は必要ありません

次のような書式です。

module_plugin plugin_filename parameter_1 parameter_2 (...) parameter_X

ただし、プラグインに状態や実行間隔などの追加パラメータを設定する場合は、次のように通常の書式を利用します。

 module_begin
 module_plugin plugin_filename parameter_1 parameter_2 (...) parameter_X
 module_interval 2
 module_condition (0, 1) script.sh
 module_end

それぞれのプラグインには個別のパラメータが使われます。そのため、それぞれの特定のドキュメントを参照する必要があります。ここでは、エージェントにデフォルトで付属しているプラグインの一つであるファイル内を検索する grep_log で説明します。

module_plugin grep_log /var/log/syslog Syslog ssh

In this example, the name of the plugin is grep_log and it's going to search for the regular expression ssh in the file /var/log/syslog which will be kept in a module called Syslog.

この例では、プラグインの名前が grep_log で、/var/log/syslog を正規表現 ssh で検索する Syslog というモジュールであることを意味します。

Windows システムの場合の別の例を示します。(バージョン 3.1 以上)

module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df_percent.vbs"

module_ping

Windows のみ。

module_ping <ホスト>

このモジュールは、指定したホストに ping を行い、応答があれば 1、そうでなければ 0 を返します。

次のパラメータを設定できます。

  • module_ping_count x: 送信する ECHO_REQUEST パッケットの数 (1 がデフォルト)
  • module_ping_timeout x: 応答を待つタイムアウトミリ秒数 (1000 がデフォルト)
  • module_advanced_options: ping.exe の拡張オプション

例:

 module_begin
 module_name Ping
 module_type generic_proc
 module_ping 192.168.1.1
 module_ping_count 2
 module_ping_timeout 500
 module_end

module_snmpget

Windows のみ。

このモジュールは snmpget を実行し、その応答を返します。

次のパラメータを設定できます。

  • module_snmpversion [1_2c_3]: SNMP バージョン (1 がデフォルト)
  • module_snmp_community <community>: SNMP コミュニティ (public がデフォルト)
  • module_snmp_agent <host>: 対象の SNMP エージェント
  • module_snmp_oid <oid>: 対象の OID
  • module_advanced_options: snmpget.exe の拡張オプション

例:

 module_begin
 module_name SNMP get
 module_type generic_data
 module_snmpget
 module_snmpversion 1
 module_snmp_community public
 module_snmp_agent 192.168.1.1
 module_snmp_oid .1.3.6.1.2.1.2.2.1.1.148
 module_end

module_wait_timeout

Windows のみ。

module_wait_timeout X

Expiration time used when the module module_exec and module_plugin output is checked. Value by default 500 miliseconds. Modify to 5 if the execution of a module that generates lots of outputs is slow. It is recommended no to use in the rest of cases.

モジュールの module_exec および module_plugin 出力がチェックされる際のタイムアウト時間。デフォルトの値は 500ミリ秒です。大量の出力を生成するモジュールで実行が遅い場合は、5に変更します。それ以外の場合は使用しないことをお勧めします。

module_advanced_options

Only for MS Windows®.

MS Windows® のみ

module_advanced_options <parameter>

For module_ping y module_snmpgetlet use additional parameters. For example, for ping it can specify a 512 bytes packet size:

module_ping および module_snmpget では追加パラメータを使用します。たとえば、ping の場合、512 バイトのパケット サイズを指定できます。

module_advanced_options -l 512

In the agent configuration process, you may set a series of rules for your agents to be configured automatically. It works like this:

エージェント設定処理では、エージェントを自動的に設定するための一連のルールを設定できます。 それはこのように動作します:

  1. Prepare automatic configurations in your Pandora FMS Console o Pandora FMS Metaconsole.
  2. Install the agents reporting towards your Pandora FMS (if you have a Metaconsole with the automatic provisioning system configured, set the Metaconsole itself as server).
  3. Pandora FMS Server will receive an XML (.data) with the agent's data for the first time.
  4. Rules will be evaluated for determining the automatic configuration to be applied.
  5. The agent will retrieve the new configuration and report in the next cycle with the updated configuration.
  1. Pandora FMS コンソールまたは、Pandora FMS メタコンソールで、自動設定の準備をします。
  2. Pandora FMS へ接続するエージェントをインストールします。(単一のコンソールの場合はエージェントの接続先は Pandora FMS サーバです。自動プロビジョニングを設定したメタコンソールがある場合は、メタコンソールをサーバとして設定します。)
  3. Pandora FMS サーバが、エージェントのデータを含む XML (.data) を初回受信します。
  4. 適用される自動設定を決定するためのルールが評価されます。
  5. エージェントが新たな設定を受け取り、次回の処理から更新された設定で動作します。

Console

コンソール

Access the management of automatic configurations through ConfigurationManage agent autoconfiguration.

自動設定画面へは 設定(Configuration)自動エージェント設定管理(Manage agent autoconfiguration) からアクセスします。

Metaconsole

メタコンソール

Go to Centralized managementAgent management → automatic agent configuration icon.

中央管理(Centralized management)エージェント管理(Agent management) → エージェント自動設定アイコン:

By accessing the administration page you can create new automatic configurations by pressing the Add new configuration definition button. You will need to choose a name and description for your automatic configuration.

管理ページにアクセスしたら、新たな設定定義の追加(Add new configuration definition) ボタンをクリックすることにより新たな自動設定を作成することができます。自動設定の名前と説明を設定します。

Once the new auto configuration is created, you can display the configuration forms by clicking on the section you need: Rules, Agent autoconfiguration or Extra actions.

新たな自動設定を作成したら、必要な項目 (ルール(Rules)エージェント自動設定(Agent autoconfiguration)追加アクション(Extra actions)) をクリックすることにより設定フォームを表示できます。

ルール

To define the Agents to which the automatic configuration will be applied, you can first add rules to identify them.

自動設定が適用されるエージェントを定義するには、まずエージェントを識別するルールを追加します。

Expand the rules section within your automatic configuration, and select Add new rule. You can choose a series of options in the rules selector to identify the agents that are going to be configured.

自動設定内のルールセクションを展開し、新しいルールの追加(Add new rule) を選択します。 ルールセレクターで一連のオプションを選択して、設定するエージェントを識別できます。

  • Server name: Match on server name.
  • Group name: Match on group name.
  • OS: Match operating system name using regular expressions.
  • Custom field: Match by key/value based on a custom field reported by the Agent. Indicate the name of the custom field and the value it should have.
  • IP range: Match by range of IP (network) addresses, use IP/mask notation.
  • Script output (> 0): Intended to execute a script whose execution result is evaluated as valid when the standard output is greater than 0.
  • Rules script call: Supports the following macros in the 'arguments' field (you can choose between AND and OR operators to modify the logic of the rules):
    • _agent_ : Will be replaced by the name of the Agent.
    • _agentalias_ : Will be replaced by the Agent's alias.
    • _address_ : Will be replaced by the primary IP address reported by the Agent.
    • _agentgroup_ : Will be replaced by the name of the group reported by the Agent.
    • _agents_ : Will be replaced by the Agent operating system.
  • Server name: マッチするサーバ名
  • Group name: マッチするグループ名
  • OS: マッチする OS 名 (正規表現)
  • Custom field: エージェントが報告してくる、キー/値 のカスタムフィールドマッチ。カスタムフィールド名と値を指定する必要があります。
  • IP range: IP の範囲(ネットワーク)にマッチ。IP/ネットマスク の書式を追加います。
  • Script output (> 0): スクリプトの実行結果で、標準出力の結果が 0より大きい場合にルールにマッチしたと評価されます。
  • Rules script call: 'arguments' フィールドに次のマクロが使えます。(演算子 ANDOR のどちらかを選択して、ルールロジックを変更できます)
    • _agent_ : エージェント名に置き換えられます。
    • _agentalias_ : エージェントの別名に置き換えられます。
    • _address_ : エージェントから報告された IP アドレスに置き換えられます。
    • _agentgroup_ : エージェントから報告されたグループ名に置き換えられます。
    • _agentos_ : エージェントの OS で置き換えられます。

If you don't add any rules, the automatic settings will not be applied. If you need a single configuration for all agents, you can use the following regular expression to match any alias: .*

ルールが無い場合は、自動設定は適用されません。全てのエージェントに対して一つの設定でよい場合は、すべての別名にマッチする正規表現 .* を使うことができます。

設定

  • Agent Group: You can keep it unchanged or force it to be a specific one.
  • Secondary Groups: The groups selected here will be added as secondary groups to the Agent.
  • Policies: You can select policies to be applied automatically when the Agent reaches the server.
  • Configuration Block: Adds the extra raw configuration to the Agent configuration file.
  • エージェントグループ(Agent Group): 変更せずにそのままとするか、強制的に変更します。
  • セカンダリグループ(Secondary Group): エージェントにセカンダリグループとして追加するグループを選択します。
  • ポリシー(Policies): エージェントがサーバに接続してきたときに適用するポリシーを選択できます。
  • 設定ブロック(Configuration Block): エージェントの設定ファイルに追加する設定内容です。

If you try to access the automatic configuration administration from a node that belongs to a Metaconsole, with centralized administration active, the view will be read-only.

集中管理が有効なメタコンソールに属するノードから自動設定管理を行おうとすると、リードオンリー表示になります。

追加アクション

From this section you can associate other actions to the autoconfiguration, such as:

ここでは、自動設定に追加のアクションを行うことができます。例えば以下のような処理です。

  1. Launch a custom event (Launch custom event).
  2. Execute an alert action (Launch alert action).
  3. Execute a script (Launch script).
  1. 独自イベントを出す (Launch custom event)
  2. アラートアクションを実行する (Launch alert action)
  3. スクリプトを実行する (Launch script)

The system supports the following macros:

システムは、次のマクロをサポートします。

  • _agent_ Will be replaced by the name of the Agent.
  • _agentalias_ Will be replaced by the Agent's alias.
  • _address_ Will be replaced by the primary IP address reported by the agent.
  • _agentgroup_ Will be replaced by the name of the group reported by the Agent.
  • _togentos_ Will be replaced by the Agent operating system.
  • _agentid_ Replaced by the Agent ID.
  • _agent_ エージェント名に置き換えられます。
  • _agentalias_ エージェントの別名に置き換えられます。
  • _address_ エージェントが報告した IP アドレスに置き換えられます。
  • _agentgroup_ エージェントが報告したグループ名に置き換えられます。
  • _togentos_ エージェントの OS に置き換えられます。
  • _agentid_ エージェント ID に置き換えられます。

The fundamental paths and directories to take into account are:

把握しておくべき基本的なファイルとディレクトリは次のとおりです。

  • /usr/share/pandora_agent : Where the Pandora FMS Agent is installed. On systems where this is not allowed by policy, it is recommended to create a link to this path from the actual installation path, for example /opt/pandora/usr/share/pandora_agent.
  • /etc/pandora/pandora_agent.conf : Main configuration file of the Agent. Local Runtime Modules and Agent plugins are configured here.
  • /usr/local/bin/pandora_agent: Agent executable binary. It usually has a link to /usr/bin/pandora_agent.
  • /usr/local/bin/tentacle_client: Tentacle executable binary, for file transfer to the server. It usually has a link to /usr/bin/tentacle_client.
  • /etc/init.d/pandora_agent_daemon: Script start/stop/restart.
    • On AIX systems the daemon is/etc/rc.pandora_agent_daemon.
  • /var/log/pandora/pandora_agent.log: Text file where the activity of the Pandora FMS Agent is saved, when the Agent runs in debugging mode.
  • /etc/pandora/plugins: Directory that contains the agent plugins. It is linked to the /usr/share/pandora_agent/plugins directory.
  • /etc/pandora/collections: Directory containing the collections deployed to the Agent. It is linked to the /usr/share/pandora_agent/collections directory.
  • /usr/share/pandora_agent : Pandora FMS エージェントがインストールされる場所です。厳密なシステムポリシーがあり、ここにインストールできないシステムでは、実際のインストールパスからこのパスへのリンクを作成することを推奨します。例: /opt/pandora/usr/share/pandora_agent
  • /etc/pandora/pandora_agent.conf : エージェントのメインの設定ファイルです。ここにデータの収集に使うコマンドの定義がされています。
  • /usr/local/bin/pandora_agent : エージェントの実行バイナリです。通常、/usr/bin/pandora_agent にリンクされています。
  • /usr/local/bin/tentacle_client : サーバにデータファイルを送信するため Tentacle 実行バイナリです。通常、/usr/bin/tentacle_client にリンクされています。
  • /etc/init.d/pandora_agent_daemon : start/stop/restart のためのスクリプトです。
    • AIX システムでは、/etc/rc.pandora_agent_daemon です。
  • /var/log/pandora/pandora_agent.log : Pandora FMS エージェントがデバッグモードで動作している時にログが出力されるログファイルです。
  • /etc/pandora/plugins : エージェントプラグインを置くディレクトリです。これは /usr/share/pandora_agent/plugins にリンクされています。
  • /etc/pandora/collections : エージェントのコレクションを置くディレクトリです。これは /usr/share/pandora_agent/collections にリンクされています。

エージェントの起動は以下のようにします。

/etc/init.d/pandora_agent_daemon start

エージェントの停止は以下のようにします。

/etc/init.d/pandora_agent_daemon stop

起動スクリプトで Pandora FMS エージェントの起動・停止ができます。デフォルトでは起動後はデーモーンとして動作します。

As we saw in the configuration section, there are some modules that obtain the information in a predefined way without having to specify a command with module_exec. These modules are:

設定の章で示した通り、module_exec で特定のコマンドを実行することなく定義済の情報を取得できるモジュールがあります。以下がそれらです。

  • module_procmem
  • module_freedisk
  • module_freepercentdisk
  • module_cpuproc
  • module_proc
  • module_procmem
  • module_cpuusage
  • module_freememory
  • module_freepercentmemory

It is possible to modify the operation of these modules by directly editing the agent executable (/usr/bin/pandora_agent by default). Pandora FMS agent is generally located in /usr/bin/pandora_agent.

これらのモジュールの動作は、エージェントの実行ファイル (デフォルトでは /usr/bin/pandora_agent) を直接編集することにより変更できます。Pandora FMS エージェントは一般的に /usr/bin/pandora_agent にあります。

Search for the Commands to retrieve string that contains the code with the internal commands. You may make the modifications you need to adapt them to your system.

コマンド名で検索することにより、内部コマンドを含むコードを見つけます。システムに合わせて変更する場合は、修正を行います。

# Commands to retrieve total memory information in kB
use constant TOTALMEMORY_CMDS => {
   linux => 'cat /proc/meminfo | grep MemTotal: | awk \'{ print $2 }\,
   solaris => 'MEM=`prtconf | grep Memory | awk \'{print $3}\'` bash -c \'echo $(( 1024 * $MEM ))\,
   hpux => 'swapinfo -t | grep memory | awk \'{print $2}\
};

# Commands to retrieve partition information in kB
use constant PART_CMDS => {
    # total, available, mount point
    linux => 'df -P | awk \'NR> 1 {print $2, $4, $6}\,
    solaris => 'df -k | awk \'NR> 1 {print $2, $4, $6}\,
    hpux => 'df -P | awk \'NR> 1 {print $2, $4, $6}\,
    aix => 'df -kP | awk \'NR> 1 {print $2, $4, $6}\
};

To change any of the predefined values to get the information, just edit the command but be careful with the following:

情報取得のための定義済の値を変更するには、コマンドを編集するだけですが、以下に注意します。

  1. Check that blocks { }; always end in semi-colon.
  2. Check that commands are between ' ' symbols.
  3. In turn, within said simple quotation marks, you may need additional ones, like ` ` (see the previous example).
  4. Check that any simple quotation mark that you may want to use in the command is preceded by \, that means \'. For instance, this command that usually would be:
  1. ブロックの終わりに { }; のようにセミコロンがあるがことを確認
  2. コマンドが ' ' でくくられているか確認
  3. シングルクォーテーションを使う場合は、` ` のような追加の引用符が必要になる場合があります(前の例を参照)。
  4. コマンドで使用するシングルクォーテーションの前に \ が付いていることを確認してください。これは \' を意味します。 たとえば、このコマンドは通常次のようになります。
df -P | awk 'NR> 1 {print $2, $4, $6}'

上記は以下のようになります。

df -P | awk \'NR> 1 {print $2, $4, $6}\'

The fundamental paths and directories in the Windows agent installation will be found in the directory where the agent is installed, by default %ProgramFiles%.

Windows エージェントの基本的なパスやディレクトリは、エージェントをインストールした場所になります。デフォルトでは %ProgramFiles% です。

理解しておきたい基本的なファイルは次の通りです。

%ProgramFiles%\pandora_agent

Where Pandora FMS agent, its executable and its directories are installed.

Pandora FMS エージェントの実行ファイルやディレクトリがあるインストール先です。

%ProgramFiles%\pandora_agent\pandora_agent.conf

Agent configuration main file. Local execution modules and agent plugins are configured here.

エージェントの設定ファイルです。実行モジュールおよびエージェントプラグインの設定はここにあります。

%ProgramFiles%\pandora_agent\PandoraAgent.exe

Executable agent binary.

エージェントの実行バイナリです。

%ProgramFiles%\pandora_agent\util\tentacle_client.exe

Tentacle executable binary for transferring files to the server.

サーバへファイルを転送するための Tentacle 実行バイナリです。

%ProgramFiles%\pandora_agent\scripts

Pandora FMS agent start/stop/restart scripts.

Pandora FMS エージェントの起動・停止・再起動スクリプトです。

%ProgramFiles%\pandora_agent\pandora_agent.log

Text file where Pandora FMS agent activity is saved, when the agent is executed in debug mode.

Pandora FMS エージェントがデバッグモードで実行されたときに出力されるログファイルです。

%ProgramFiles%\pandora_agent\util

Directory containing the agent plugins.

エージェントプラグインを含むディレクトリです。

%ProgramFiles%\pandora_agent\collections

Directory containing the agent's collections.

エージェントのコレクションを含むディレクトリです。

You may deploy software agents by using the deployment central through the Discovery system, more information in this link.

自動検出システムを通したデプロイの仕組みを使ってソフトウエアエージェントをデプロイすることができます。より詳細は、 こちらを参照してください。

ファイルコレクションと pandora_update ツールを使って、ソフトウエアエージェントは自分自身の更新ができます。

The pandora_update tool needs the Perl module Digest::MD5 to work. As of Perl version 5.14, this module is built in by default, but in earlier versions you will need to install it manually.

pandora_update ツールは、Perl の Digest:MD5 モジュールが必要です。Perl 5.14 からはデフォルトで含まれていますが、古いバージョンでは手動でインストールしておく必要があります。

これは、次のように動作します。

1. エージェントが、例えば次のようなファイルコレクションの incoming ディレクトリに新たなバイナリを受信します。

Windows の例:

c:\program files\pandora_agent\collections\fc_1\PandoraAgent.exe

Linux の例:

/etc/pandora/collections/fc_1/pandora_agent

2. エージェントは、pandora_update プラグインを実行します。このプラグインは、コレクションの短い名前をパラメータとして受け取ります(この例では fc_1)。コレクションディレクトリ内のエージェントバイナリをスキャンし、現在動作しているものと比較します。違いがあれば、pandora_update がエージェントを停止し、バイナリを置き換え、新しいバイナリを使ってエージェントを再起動します。

異なるアーキテクチャのアップデートを行うには、それぞれ異なるコレクションを用意する必要があります。例えば、32bit および 64bit の Windows エージェントをアップデートする必要がある場合は、2つのコレクションを作成し、それぞれに対応した PandoraAgent.exe バイナリを含める必要があります。

3. Pandora_update はまた、async_string モジュールを使うことによって、次の実行タイミングでユーザに通知を出せるように、エージェントのアップデートプロセスに関するアップデートイベントログを出力します。

以下がアップデートプロセスで使うモジュールです。間隔は長めに設定します。

Unix 通常インストール

 module_begin
 module_name Pandora_Update
 module_type async_string
 module_interval 20
 module_exec nohup /etc/pandora/plugins/pandora_update fc_1 2> /dev/null && tail -1 nohup.out 2> /dev/null
 module_description Module to check new version of pandora agent and update itself
 module_end

Unix カスタムインストール

 module_begin
 module_name Pandora_Update
 module_type async_string
 module_interval 20
 module_exec nohup /var/opt/PandoraFMS/etc/pandora/plugins/pandora_update fc_1 /var/opt/PandoraFMS 2> /dev/null && tail -1 nohup.out 2> /dev/null
 module_description Module to check new version of pandora agent and update itself
 module_end

The pandora_update command accepts the path of the Pandora FMS installation directory as a second parameter; it is unnecessary to specify it if the installation was done in the default path.

pandora_update コマンドの 2つ目のパラメータは、Pandora FMS のインストールパスです。このパラメータは、デフォルトのパスにインストールした際は不要です。

Windows

 module_begin
 module_name Pandora_Update
 module_type async_string
 module_interval 20
 module_exec pandora_update.exe fc_1
 module_description Module to check new version of pandora agent and update itself
 module_end

Agents can be configured from the Console in three work modes:

エージェントは、コンソールから 3つの動作モードを設定できます。

  • Learning mode: If the XML received from the Software Agent contains new Modules, they will be automatically created. This is the default behavior.
  • Normal mode: New Modules that arrive in the XML will not be created if they have not been previously declared in the console.
  • Self-disabled mode: Similar to learning mode, in this mode, in addition, if all the Modules go to an unknown state, the Agent will automatically disable itself, becoming enabled again if it receives new information.
  • 学習モード(Learning mode): ソフトウエアエージェントから新たなモジュールを含む XML を受け取ると、それらが自動的に作成されます。これがデフォルト動作です。
  • 通常モード(Normal mode): コンソールに存在しない新たなモジュールを XML で受け取っても作成しません。
  • 自動無効化モード(Self-disabled mode): 学習モードに似ていますが、すべてのモジュールが不明状態になった場合にエージェントを自動的に無効化します。新たな情報を受け取ったときに改めて自動化します。

XML を受け取ったときにエージェントの作成とともに自動的に取り込まれるデータは次の通りです。

  • エージェント名
  • エージェントのIPアドレス
  • エージェントの説明
  • エージェントの親
  • タイムゾーンオフセット
  • グループ
  • OS
  • エージェントの実行間隔
  • エージェントのバージョン
  • カスタムフィールド
  • カスタムID
  • URL アドレス
  • エージェントモード: 学習、通常、自動無効化
  • エージェントの IP アドレス
  • エージェントの親
  • OSバージョン
  • エージェントのバージョン
  • タイムゾーン
  • カスタムフィールド

GIS データは(GIS が有効の場合)、学習モードが有効であるか無効であるかに関わらず、常に更新されます。

加えて、学習モードが有効の場合、XML ファイルで受け取った新たなモジュールは、Pandora で作成されます。

初回の各モジュールの XML 受信時に反映されるデータは次の通りです。

  • 名前
  • タイプ
  • 説明
  • フィルタの最大・最小値
  • 保存倍率
  • モジュール実行間隔
  • 障害の最大・最小値
  • 警告の最大・最小値
  • 無効化モジュール
  • 単位
  • モジュールグループ
  • カスタムID
  • 文字列の警告・障害
  • 障害時手順
  • 警告時手順
  • 不明時手順
  • タグ
  • 障害反転モード
  • 警告反転モード
  • 静観モード
  • 連続抑制回数
  • アラートテンプレート
  • Crontab

すでに存在するモージュールのデータを XML で受け取った場合は、モジュールのデータに加えて説明および拡張情報のみ更新されます。

Pandora FMS ドキュメント一覧に戻る

  • ja/documentation/pandorafms/installation/05_configuration_agents.txt
  • 最終更新: 2023/11/01 06:06
  • by 127.0.0.1