ja:documentation:08_technical_reference:05_anexo_server_plugins_development

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
最新のリビジョン両方とも次のリビジョン
ja:documentation:08_technical_reference:05_anexo_server_plugins_development [2021/07/16 22:55] – [パフォーマンス] junichija:documentation:08_technical_reference:05_anexo_server_plugins_development [2022/12/02 06:09] – [ヘッダー/定義] junichi
行 128: 行 128:
 ==== プラグインの手動登録 ==== ==== プラグインの手動登録 ====
  
-{{ wiki:Registro_manual_plugin.png?750 }}+{{  :wiki:pfms-server-plugins-manual_plugin_registration_1.png  }}
  
  
行 144: 行 144:
  
 プラグインの実行時間制限です。 この時間内に応答がない場合は、モジュールを不明として処理し、その値は更新されません。 プラグインを使用してモニタリングを実装する場合、これは非常に重要な要素です。そのため、プラグインの実行にかかる時間がこの数値より大きいと値を取得できません。この値は、プラグインとして使用されるスクリプトや実行ファイルが値を返すまでにかかる時間よりも常に大きくなければなりません。 何も設定しない場合は、plugin_timeout の設定値が使われます。 プラグインの実行時間制限です。 この時間内に応答がない場合は、モジュールを不明として処理し、その値は更新されません。 プラグインを使用してモニタリングを実装する場合、これは非常に重要な要素です。そのため、プラグインの実行にかかる時間がこの数値より大きいと値を取得できません。この値は、プラグインとして使用されるスクリプトや実行ファイルが値を返すまでにかかる時間よりも常に大きくなければなりません。 何も設定しない場合は、plugin_timeout の設定値が使われます。
 +
 +{{  :wiki:pfms-server-plugins-manual_plugin_registration_2.png  }}
  
   * **プラグインコマンド(Plug-in command)**   * **プラグインコマンド(Plug-in command)**
行 154: 行 156:
  
 コマンドのパラメータ文字列で、コマンドの引数としてしていするものです。パラメータフィールドには、_field1_ _field2_ ... _fieldN_ といったマクロが使えます。 コマンドのパラメータ文字列で、コマンドの引数としてしていするものです。パラメータフィールドには、_field1_ _field2_ ... _fieldN_ といったマクロが使えます。
 +
 +{{  :wiki:pfms-server-plugins-manual_plugin_registration_3.png  }}
  
   * **パラメータマクロ(Parameters macros)**   * **パラメータマクロ(Parameters macros)**
行 248: 行 252:
 {{:wiki:pfms-resources-manage_agents-modules-create_new_plugin_server_module_2.png?750}}Rememeber to add that the type of data to be collected must be "Generic boolean" **and for the name of the new Module, just add the web domain whose IP address you are going to verify with a specified DNS server****.** Save it and check it works. {{:wiki:pfms-resources-manage_agents-modules-create_new_plugin_server_module_2.png?750}}Rememeber to add that the type of data to be collected must be "Generic boolean" **and for the name of the new Module, just add the web domain whose IP address you are going to verify with a specified DNS server****.** Save it and check it works.
  
-{{:wiki:pfms-resources-manage_agents-modules-create_new_plugin_server_module_2.png?750}} 収集するデータのタイプは "Generic boolean" である必要があることを忘れないでください。また、 **新しいモジュールの名前、指定した DNS サーバで IP アドレスを確認する Web ドメインを追加します。** 保存して機能することを確認します。 +{{:wiki:pfms-resources-manage_agents-modules-create_new_plugin_server_module_2.png?750}} 
 + 
 +収集するデータのタイプは "Generic boolean" である必要があることを忘れないでください。また、 **新しいモジュールの名前、指定した DNS サーバで IP アドレスを確認する Web ドメインを追加します。** 保存して機能することを確認します。 
  
 The advantage of this method is that it will have both Modules and Web domains you need to check and they are easily identified in different components (Dashboards, reports, etc.) through its name. The advantage of this method is that it will have both Modules and Web domains you need to check and they are easily identified in different components (Dashboards, reports, etc.) through its name.
行 254: 行 260:
 この方法の良い点は、モジュールとしてチェックする必要のある Web ドメインがあり、名前によってさまざまなコンポーネント(ダッシュボード、レポートなど)で簡単に識別できることです。  この方法の良い点は、モジュールとしてチェックする必要のある Web ドメインがあり、名前によってさまざまなコンポーネント(ダッシュボード、レポートなど)で簡単に識別できることです。 
  
 +=== マクロ一覧 ===
 +
 +  * ''_agent_''  : Agent alias to be used in the macro. If no alias is assigned, the name of the agent will be used.
 +  * ''_agentalias_''  : Agent alias to be used in the macro.
 +  * ''_agentdescription_''  : Description of the agent to be used in the macro.
 +  * ''_agentstatus_''  : Current status of the Agent when used in the macro.
 +  * ''_agentgroup_''  : Name of the Agent group to be used in the macro.
 +  * ''_agentname_''  : Name of the Agent to be used in the macro (see also ''_agente_''  > ).
 +  * ''_address_''  : Agent adress to be used in the macro.
 +  * ''_module_''  : Name of the Module to be used in the macro.
 +  * ''_modulegroup_''  : Name of the Module group to be used in the macro.
 +  * ''_moduledescription_''  : Description of the module to be used in the macro.
 +  * ''_modulestatus_''  : Status of the module to be used in the macro.
 +  * ''_moduletags_''  : URL associated to the module tags.
 +  * ''_id_module_''  : ID of the module to be used in the macro.
 +  * ''_id_agente_''  : ID of the agent to be used in the macro, useful for building the URL of access to Pandora FMS console.
 +  * ''_id_group''  : ID of the agent group to be used for the macro.
 +  * ''_interval_''  : Interval of the modules execution to be used for the macro.
 +  * ''_target_ip_''  : Target IP address of the module to be used for the macro.
 +  * ''_target_port_''  : Target port of the module to be used for the macro.
 +  * ''_policy_''  : Name of the policy the module belongs to (if it applies).
 +  * ''_plugin_parameters_''  : Plugin parameters of the module to be used in the macro.
 +  * ''_email_tag_''  : Email inboxes associated to the module tags.
 +  * ''_phone_tag_''  : Phone numbers associated to the module tags.
 +  * ''_name_tag_''  : Name of the tags associated to the module for the macro.
 +
 +  * ''_agent_''  : エージェントの別名。別名が割り当てられていない場合は、エージェント名が使用されます。 
 +  * ''_agentalias_''  : エージェントの別名。
 +  * ''_agentdescription_''  : エージェントの説明。
 +  * ''_agentstatus_''  : エージェントの現在の状態。
 +  * ''_agentgroup_''  : エージェントグループ名。
 +  * ''_agentname_''  : エージェント名。(''_agent_'' も参照してください)
 +  * ''_address_''  : エージェントのアドレス。
 +  * ''_module_''  : モジュール名。
 +  * ''_modulegroup_''  : モジュールグループ名。
 +  * ''_moduledescription_''  : モジュールの説明。
 +  * ''_modulestatus_''  : モジュールの状態。
 +  * ''_moduletags_''  : モジュールタグに関連付けられた URL。
 +  * ''_id_module_''  : モジュールの ID。
 +  * ''_id_agente_''  : エージェントの ID。Pandora FMS コンソールへアクセスする URL を生成するのに便利です。
 +  * ''_id_group''  : エージェントグループの ID。
 +  * ''_interval_''  : モジュールの実行間隔。
 +  * ''_target_ip_''  : モジュールのターゲット IP。
 +  * ''_target_port_''  : モジュールのターゲットポート番号。
 +  * ''_policy_''  : モジュールが所属するポリシー名。(適用される場合)
 +  * ''_plugin_parameters_''  : モジュールのプラグインパラメータ。
 +  * ''_email_tag_''  : モジュールタグに関連付けられた Email。
 +  * ''_phone_tag_''  : モジュールタグに関連付けられた電話番号。
 +  * ''_name_tag_''  : モジュールに関連付けられたタグ名。
 ==== PSPZ パッケージ ==== ==== PSPZ パッケージ ====
 === Pandora サーバプラグイン Zip ファイル (.pspz) === === Pandora サーバプラグイン Zip ファイル (.pspz) ===
行 269: 行 324:
 === plugin_definition.ini の構造 === === plugin_definition.ini の構造 ===
 == ヘッダー/定義 == == ヘッダー/定義 ==
-これがオプションセクションを持つ標準的なINIファイルです。 + 
-最初のセクションは最も重要で、セクション名は"plugin_definition"固定です。 +This is a [[https://en.wikipedia.org/wiki/INI_file|classic INI file]] with optional sections. The first section, the most important, is a fixed name section called ''plugin_definition'', and this is an example: 
-以下に例を示します。+ 
 +これがオプションセクションを持つ[[https://en.wikipedia.org/wiki/INI_file|標準的なINIファイル]]です。最初のセクションは最も重要で、セクション名は ''plugin_definition'' 固定です。以下に例を示します。
  
 <code> <code>
行 302: 行 358:
  
 == モジュール定義 / ネットワークコンポーネント == == モジュール定義 / ネットワークコンポーネント ==
-これは動的セクション(セクション名に増加する数値を持つ)として定義され、必要な数だけ作成することができます。ここで定義したモジュール数と同じ値、前のセクションの**total_modules_provided**に設する必要があります。 + 
-もし4個のモジュールがある場合、セクション名はmodule1, module2, module3module4+<WRAP center round important 60%>\\ 
 +Define the same number of modules as those defined in ''total_modules_provided'' from the previous section.\\ 
 +</WRAP> 
 + 
 +<WRAP center round important 60%>\\ 
 +前のセクションの ''total_modules_provided'' で定義したものと同じ数のモジュールを定義します。 \\ 
 +</WRAP> 
 + 
 +If you have for example four modules, the names of those sections must be: ''module1'', ''module2'', ''module3'' and ''module4''
 + 
 +もし4個のモジュールがある場合、セクション名は ''module1''''module2''''module3'' および ''module4''ければいけせん
  
 以下にモジュール定義の例を示します。 以下にモジュール定義の例を示します。
行 434: 行 500:
 </code> </code>
  
-===== 古い PSPZ (Pandora バージョン 4のアップグレード =====+===== 古い PSPZ のアップグレード ===== 
 + 
 +From Pandora FMS version 4, some PSPZ prior to parameter dynamic field creation for plugins and had fixed parameters, **will not work in new versions**. 
 + 
 +Pandora FMS バージョン 4 までサーバプラグインの動的パラメータが無い、パラメータが静的な以前の PSPZ は、 **新しいバージョンの pandora では動作しません。** 
 + 
 +To migrate them, execute them with the appropriate credentials and after carrying out the upgrading process, the following: 
 + 
 +それらを移行するには、適切な権限でアップグレードプロセスを実行した後、次の手順を実行します。  
 + 
 +<code>/usr/share/pandora_server/util/pandora_migrate_plugins.pl <dbname> <dbhost> <dbuser> <dbpass> 
 + 
 + 
 +</code>
  
-サーバプラグインの動的パラメータが無い、パラメータが静的な以前の PSPZ は、新しいバージョンの pandora では動作しません。これを修正する手順は以下にあります。+Find more information about major and minor version update in [[https://prewebs.pandorafms.com/manual/en/documentation/02_installation/02_annex_upgrade|this link]].
  
-[[:ja:documentation:02_installation:02_anexo_upgrade#.E3.83.97.E3.83.A9.E3.82.B0.E3.82.A4.E3.83.B3|以前のバージョンからのアップグレード → メジャーバージョンのアップデート → バージョン 4.x から 5.0 へのアップデート → プラグイン]]+メジャーおよびマイナーバージョンのアップデートに関する詳細は、[[:ja:documentation:02_installation:02_anexo_upgrade|こちら]]を参照してください。