ja:documentation:08_technical_reference:11_pfms_plugis

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
最新のリビジョン両方とも次のリビジョン
ja:documentation:08_technical_reference:11_pfms_plugis [2022/12/14 08:55] – [Compatibility] junichija:documentation:08_technical_reference:11_pfms_plugis [2022/12/15 01:31] junichi
行 3: 行 3:
 {{indexmenu_n>11}} {{indexmenu_n>11}}
  
-[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] +[[:ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]
  
 ===== 概要 ===== ===== 概要 =====
行 44: 行 43:
   * **Open**: Plugins with open license can be downloaded by any user without having to have an Enterprise license, these plugins are not usually compiled so it may be necessary to install certain dependencies for their use.   * **Open**: Plugins with open license can be downloaded by any user without having to have an Enterprise license, these plugins are not usually compiled so it may be necessary to install certain dependencies for their use.
   * **Enterprise**: Enterprise-licensed plugins can only be downloaded by the owners of this license, Enterprise plugins are usually compiled and include all dependencies in their executable, so the dependency installation is not necessary for their use.   * **Enterprise**: Enterprise-licensed plugins can only be downloaded by the owners of this license, Enterprise plugins are usually compiled and include all dependencies in their executable, so the dependency installation is not necessary for their use.
- 
   * **オープンソース**: オープンライセンスのプラグインは、Enterprise ライセンスを持っていなくても、すべてのユーザがダウンロードできます。これらのプラグインは通常、コンパイルされていないため、使用するために特定の依存関係をインストールする必要がある場合があります。   * **オープンソース**: オープンライセンスのプラグインは、Enterprise ライセンスを持っていなくても、すべてのユーザがダウンロードできます。これらのプラグインは通常、コンパイルされていないため、使用するために特定の依存関係をインストールする必要がある場合があります。
   * **Enterprise**: Enterprise 版ライセンスのプラグインは、このライセンスの所有者のみがダウンロードできます。Enterprise プラグインは通常、コンパイルされ、実行可能ファイルにすべての依存関係が含まれているため、依存関係のインストールは必要ありません。   * **Enterprise**: Enterprise 版ライセンスのプラグインは、このライセンスの所有者のみがダウンロードできます。Enterprise プラグインは通常、コンパイルされ、実行可能ファイルにすべての依存関係が含まれているため、依存関係のインストールは必要ありません。
- 
 By execution type: By execution type:
  
行 56: 行 53:
  
   * エージェントプラグイン: エージェントプラグインは Pandora FMS ソフトウェアエージェントによって実行されます。通常はローカルにあり、リモートでは動作しないため、エージェントデーモンによって実行されます。 エージェントプラグインは通常、実行時に XML を出力し、モジュールにはデータが含まれます。   * エージェントプラグイン: エージェントプラグインは Pandora FMS ソフトウェアエージェントによって実行されます。通常はローカルにあり、リモートでは動作しないため、エージェントデーモンによって実行されます。 エージェントプラグインは通常、実行時に XML を出力し、モジュールにはデータが含まれます。
-  * サーバプラグイン: サーバプラグインは [[:ja:documentation:01_understanding:02_architecture#プラグインサーバ|プラグインサーバ]] によって実行され、通常は API または別の方法でリモートでデータを取得します。(ほとんどの場合)エージェントプラグインとして設定することもできますが、推奨されるオプションは、サーバプラグインとして設定することです。 サーバプラグインは、実行の成功を示す ''1'' などの 1 つの値のみを返します。+  * サーバプラグイン: サーバプラグインは [[:ja:documentation:01_understanding:02_architecture#プラグインサーバ|プラグインサーバ]] によって実行され、通常は API または別の方法でリモートでデータを取得します。(ほとんどの場合)エージェントプラグインとして設定することもできますが、推奨されるオプションは、サーバプラグインとして設定することです。 サーバプラグインは、実行の成功を示す ''1''  などの 1 つの値のみを返します。
  
 ===== プラグインの見つけ方 ===== ===== プラグインの見つけ方 =====
行 126: 行 123:
 It is important to be clear about what solution you intend to achieve with the plugin. It could be monitoring a service of interest, managing to unify all data in Pandora FMS which can be an advantage in time or costs, or it can also be automating a process, such as a plugin that reads emails and with which an alarm can be activated when a certain message arrives. It is important to be clear about what solution you intend to achieve with the plugin. It could be monitoring a service of interest, managing to unify all data in Pandora FMS which can be an advantage in time or costs, or it can also be automating a process, such as a plugin that reads emails and with which an alarm can be activated when a certain message arrives.
  
-プラグインで達成しようとしているソリューションを明確にすることが重要です。 関心のあるサービスを監視し、Pandora FMS ですべてのデータを統合することで、時間やコストの面で有利になる場合があります。また、プラグインにより電子メールを読み込んで特定のメッセージが到着したときアラームを鳴らすといった自動化をすることもできます。 +プラグインで達成しようとしているソリューションを明確にすることが重要です。 関心のあるサービスを監視し、Pandora FMS ですべてのデータを統合することで、時間やコストの面で有利になる場合があります。また、プラグインにより電子メールを読み込んで特定のメッセージが到着したときアラームを鳴らすといった自動化をすることもできます。
  
 Plugins seek to solve a need or make interaction, processing and data display easier. Plugins seek to solve a need or make interaction, processing and data display easier.
行 200: 行 197:
 If the plugin is written in python3, it will be necessary to have ''python3''  installed in the machine you wish to use the plugin in, which could be a great obstacle for possible potential users of that plugin. If the plugin is written in python3, it will be necessary to have ''python3''  installed in the machine you wish to use the plugin in, which could be a great obstacle for possible potential users of that plugin.
  
-プラグインが python3 で記述されている場合、プラグインを使用するマシンに ''python3'' をインストールする必要があります。これは、そのプラグインのユーザにとって、潜在的な大きな障害になる可能性があります。+プラグインが python3 で記述されている場合、プラグインを使用するマシンに ''python3''  をインストールする必要があります。これは、そのプラグインのユーザにとって、潜在的な大きな障害になる可能性があります。
  
 One option, for plugins created in python is to provide a ''requirements.txt''  file next to the plugin that can include all the dependencies used by the plugin, so installing this file will automatically install all the necessary dependencies. One option, for plugins created in python is to provide a ''requirements.txt''  file next to the plugin that can include all the dependencies used by the plugin, so installing this file will automatically install all the necessary dependencies.
  
-Python で作成されたプラグインでの一つのオプションとしては、プラグインで使用されるすべての依存関係をプラグインと共に ''requirements.txt'' ファイルで提供することです。このファイルをインストールすると、必要なすべての依存関係が自動的にインストールされます。+Python で作成されたプラグインでの一つのオプションとしては、プラグインで使用されるすべての依存関係をプラグインと共に ''requirements.txt''  ファイルで提供することです。このファイルをインストールすると、必要なすべての依存関係が自動的にインストールされます。
  
 Example of the plugin ''requirements.txt''  file, specifically that of remote MongoDB. Example of the plugin ''requirements.txt''  file, specifically that of remote MongoDB.
  
-リモート MongoDB プラグインの ''requirements.txt'' ファイルの例。 +リモート MongoDB プラグインの ''requirements.txt''  ファイルの例。
 <code> <code>
  
行 223: 行 219:
 The file can be written by hand, but you may also generate a ''requirements.txt''  file that includes all the installed virtual environment dependencies with the ''pip freeze''  command. The file can be written by hand, but you may also generate a ''requirements.txt''  file that includes all the installed virtual environment dependencies with the ''pip freeze''  command.
  
-このファイルは手動で作成できますが、''pip freeze'' コマンドを使用して、インストールされたすべての仮想環境の依存関係を含む ''requirements.txt'' ファイルを生成することもできます。+このファイルは手動で作成できますが、''pip freeze''  コマンドを使用して、インストールされたすべての仮想環境の依存関係を含む ''requirements.txt''  ファイルを生成することもできます。
  
 <code> <code>
行 247: 行 243:
 In the case of python to create executables, the ''pyinstaller''  library is available: In the case of python to create executables, the ''pyinstaller''  library is available:
  
-python で実行可能ファイルを作成する場合、''pyinstaller'' ライブラリが利用可能です:+python で実行可能ファイルを作成する場合、''pyinstaller''  ライブラリが利用可能です:
  
 <WRAP center round download 60%> <WRAP center round download 60%>
行 258: 行 254:
  
 これは、次のコマンドでインストールできます。 これは、次のコマンドでインストールできます。
- 
 <code> <code>
  
行 285: 行 280:
 A folder called ''dist''  will be generated with the binary inside. A folder called ''dist''  will be generated with the binary inside.
  
-''dist'' というフォルダーが生成され、その中にバイナリが生成されます。+''dist''  というフォルダーが生成され、その中にバイナリが生成されます。
  
 It may be the case that a plugin that has been compiled on one operating system does not work on another, it is recommended to compile the plugins in CentOS 7, since the plugins compiled on this system usually work on all other GNU/Linux operating systems. It may be the case that a plugin that has been compiled on one operating system does not work on another, it is recommended to compile the plugins in CentOS 7, since the plugins compiled on this system usually work on all other GNU/Linux operating systems.
行 325: 行 320:
 Python and perl have a tool developed by Pandora FMS that plugin creation easier called **Plugin Tools**, this tool has a lot of features designed to make plugin creation easier as well as automate it, so it can be a decisive advantage when choosing the right language. Python and perl have a tool developed by Pandora FMS that plugin creation easier called **Plugin Tools**, this tool has a lot of features designed to make plugin creation easier as well as automate it, so it can be a decisive advantage when choosing the right language.
  
-Python と perl には、Pandora FMS によって開発された **Plugin Tools** と呼ばれるプラグイン作成を容易にするツールがあります。このツールには、プラグイン作成を容易にし、自動化するように設計された多くの機能があるため、言語を選択する際の決定的な利点となる可能性があります。+Python と perl には、Pandora FMS によって開発された **Plugin Tools**  と呼ばれるプラグイン作成を容易にするツールがあります。このツールには、プラグイン作成を容易にし、自動化するように設計された多くの機能があるため、言語を選択する際の決定的な利点となる可能性があります。
  
 ==== テスト環境構築に便利なツール ==== ==== テスト環境構築に便利なツール ====
行 348: 行 343:
  
 他の XML ドキュメントと同様に、データファイルは XML 宣言で開始する必要があります。 他の XML ドキュメントと同様に、データファイルは XML 宣言で開始する必要があります。
- 
 <code> <code>
 +
 <?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
  
行 356: 行 351:
 However, although the plugins and their data is based on XML, only the agent plugins will print an XML in a terminal execution, the server plugins only show a simple data, like a one, which will be the value that will contain the module that activates it, so the most normal thing in these cases is that it emits a ''1''  if it works and a ''0''  if on the contrary it has given some kind of error. However, although the plugins and their data is based on XML, only the agent plugins will print an XML in a terminal execution, the server plugins only show a simple data, like a one, which will be the value that will contain the module that activates it, so the most normal thing in these cases is that it emits a ''1''  if it works and a ''0''  if on the contrary it has given some kind of error.
  
-ただし、プラグインとそのデータが XML に基づいているのはエージェントプラグインのみです。エージェントプラグインのみがターミナル実行で XML を出力します。サーバプラグインは単純なデータのみを表示します。サーバプラグインにおける最も基本的なことは、正常な場合は ''1'' を出力し、逆に何らかのエラーが発生した場合は ''0'' を出力することです。+ただし、プラグインとそのデータが XML に基づいているのはエージェントプラグインのみです。エージェントプラグインのみがターミナル実行で XML を出力します。サーバプラグインは単純なデータのみを表示します。サーバプラグインにおける最も基本的なことは、正常な場合は ''1''  を出力し、逆に何らかのエラーが発生した場合は ''0''  を出力することです。
  
 ===== エージェントとモジュール ===== ===== エージェントとモジュール =====
行 370: 行 365:
 The element ''agent_data'', which defines the agent that sends the data, supports the following attributes: The element ''agent_data'', which defines the agent that sends the data, supports the following attributes:
  
-データを送信するエージェントを定義する要素 ''agent_data'' は、次の属性をサポートします。+データを送信するエージェントを定義する要素 ''agent_data''  は、次の属性をサポートします。
  
   * ''description'': Agent description.   * ''description'': Agent description.
行 388: 行 383:
   * ''custom_id'': Agent custom ID.   * ''custom_id'': Agent custom ID.
   * ''url_address'': Agent login URL.   * ''url_address'': Agent login URL.
- 
   * ''description'': エージェントの説明。   * ''description'': エージェントの説明。
   * ''group'': エージェントが属するグループの名前 (Pandora FMS データベースに存在する必要があります)。 空のままにし、サーバにデフォルトで設定されたグループがない場合、エージェントは作成されません。   * ''group'': エージェントが属するグループの名前 (Pandora FMS データベースに存在する必要があります)。 空のままにし、サーバにデフォルトで設定されたグループがない場合、エージェントは作成されません。
行 405: 行 399:
   * ''custom_id'': エージェントカスタム ID。   * ''custom_id'': エージェントカスタム ID。
   * ''url_address'': エージェントログイン URL。   * ''url_address'': エージェントログイン URL。
- 
 XML heading example: XML heading example:
  
行 421: 行 414:
 An module element is needed for each ''module'', and the following elements can be nested to define the module: An module element is needed for each ''module'', and the following elements can be nested to define the module:
  
-各 ''モジュール'' にはモジュール要素が必要であり、次の要素をネストして定義できます。+各 ''モジュール''  にはモジュール要素が必要であり、次の要素をネストして定義できます。
  
   * **name**: Module name.   * **name**: Module name.
行 462: 行 455:
   * **module_parent**: Module name in the same agent that will be the parent of this module.   * **module_parent**: Module name in the same agent that will be the parent of this module.
   * **ff_type**: It activates the Keep counters of the FF threshold. [0/1].   * **ff_type**: It activates the Keep counters of the FF threshold. [0/1].
- 
   * **name**: モジュール名。   * **name**: モジュール名。
   * **description**: モジュールの説明。   * **description**: モジュールの説明。
行 480: 行 472:
   * **status**: モジュールの状態(NORMAL, WARNING または CRITICAL)。ステータスが指定されている場合、障害およびアラートステータスの制限は無視されます。   * **status**: モジュールの状態(NORMAL, WARNING または CRITICAL)。ステータスが指定されている場合、障害およびアラートステータスの制限は無視されます。
   * **datalist**: モジュールデータを datalist フォーマットで送信。(受け取った値ごとに 1 つのデータベースエントリ) [0/1]   * **datalist**: モジュールデータを datalist フォーマットで送信。(受け取った値ごとに 1 つのデータベースエントリ) [0/1]
-  * **unit**: モジュールの単位。timeticks フォーマットを ''dd/hh/mm/ss'' に変換する ''_timeticks_'' マクロをサポートします。+  * **unit**: モジュールの単位。timeticks フォーマットを ''dd/hh/mm/ss''  に変換する ''_timeticks_''  マクロをサポートします。
   * **timestamp**: モジュールから受信したデータにタイムスタンプを設定します。   * **timestamp**: モジュールから受信したデータにタイムスタンプを設定します。
   * **module_group**: モジュールが追加されるモジュールグループ。   * **module_group**: モジュールが追加されるモジュールグループ。
行 502: 行 494:
   * **module_parent**: このモジュールの親になる同じエージェント内のモジュール名。   * **module_parent**: このモジュールの親になる同じエージェント内のモジュール名。
   * **ff_type**: 連続抑制でのカウンタ値の維持の有効化。[0/1]   * **ff_type**: 連続抑制でのカウンタ値の維持の有効化。[0/1]
- 
 From Pandora FMS version 749, new tokens are available to force thresholds: From Pandora FMS version 749, new tokens are available to force thresholds:
  
行 515: 行 506:
   * A module must have at least one name, type and data element.   * A module must have at least one name, type and data element.
  
-  * **min_warning_forced**: モジュールが存在する場合でも、min_warning を新しい指定値に強制し、**min_warning** よりも優先されます。 +  * **min_warning_forced**: モジュールが存在する場合でも、min_warning を新しい指定値に強制し、**min_warning**  よりも優先されます。 
-  * **max_warning_forced**: モジュールが存在する場合でも、max_warning を新しい指定値に強制し、**max_warning** よりも優先されます。 +  * **max_warning_forced**: モジュールが存在する場合でも、max_warning を新しい指定値に強制し、**max_warning**  よりも優先されます。 
-  * **min_critical_forced**: モジュールが存在する場合でも、min_critical を新しい指定値に強制し、**min_critical** よりも優先されます。 +  * **min_critical_forced**: モジュールが存在する場合でも、min_critical を新しい指定値に強制し、**min_critical**  よりも優先されます。 
-  * **max_critical_forced**: モジュールが存在する場合でも、max_critical を新しい指定値に強制し、**max_critical** よりも優先されます。 +  * **max_critical_forced**: モジュールが存在する場合でも、max_critical を新しい指定値に強制し、**max_critical**  よりも優先されます。 
-  * **str_warning_forced**: モジュールが存在する場合でも、str_warning を新しい指定値に強制し、**str_warning** よりも優先されます。 +  * **str_warning_forced**: モジュールが存在する場合でも、str_warning を新しい指定値に強制し、**str_warning**  よりも優先されます。 
-  * **str_critical_forced**: モジュールが存在する場合でも、str_critical を新しい指定値に強制し、**str_critical** よりも優先されます。+  * **str_critical_forced**: モジュールが存在する場合でも、str_critical を新しい指定値に強制し、**str_critical**  よりも優先されます。
   * モジュールには、少なくとも 1 つの名前、型、およびデータ要素が必要です。   * モジュールには、少なくとも 1 つの名前、型、およびデータ要素が必要です。
  
行 526: 行 517:
  
 例: 例:
- 
 <code> <code>
  
行 550: 行 540:
 <WRAP center round important 60%> <WRAP center round important 60%>
  
-''agent_data'' タグを閉じることを忘れないでください!+''agent_data''  タグを閉じることを忘れないでください!
  
 </WRAP> </WRAP>
行 713: 行 703:
  
 サーバプラグインを利用するための推奨パスは次のとおりです。 サーバプラグインを利用するための推奨パスは次のとおりです。
-<code> 
  
 +<code>
 /usr/share/pandora_server/util/plugin/ /usr/share/pandora_server/util/plugin/
  
行 729: 行 719:
 In plugin parameters enter them followed by the macro ''_field_''. In plugin parameters enter them followed by the macro ''_field_''.
  
-プラグインパラメータでは、マクロ ''_field_'' に続いてそれらを入力します。+プラグインパラメータでは、マクロ ''_field_''  に続いてそれらを入力します。
  
 ''–SERVER'' ''–SERVER''
  
-{{  :wiki:pfms-plugins-development-16.png  }}{{  :wiki:pfms-plugins-development-15.png  }}+{{  :wiki:pfms-plugins-development-15.png  }}
  
-''–SUBJECT''{{  :wiki:pfms-plugins-development-17.png  }}+''–SUBJECT'' {{  :wiki:pfms-plugins-development-17.png  }}
  
-''–BODY''{{  :wiki:pfms-plugins-development-18.png  }}+''–BODY'' {{  :wiki:pfms-plugins-development-18.png  }}
  
 Once this is done, click on "create". Once this is done, click on "create".
行 759: 行 749:
 If the module is displayed with ''1'', it means it is running correctly. If the module is displayed with ''1'', it means it is running correctly.
  
-モジュールの値が ''1'' で表示されている場合、それは正しく実行されていることを意味します。+モジュールの値が ''1''  で表示されている場合、それは正しく実行されていることを意味します。
  
 {{  :wiki:pfms-plugins-development-20.png  }} {{  :wiki:pfms-plugins-development-20.png  }}
行 767: 行 757:
 In order to monitor from Pandora FMS with an agent plugin, call it from the software agent ''.conf''  file that is in the following path, in GNU/Linux: In order to monitor from Pandora FMS with an agent plugin, call it from the software agent ''.conf''  file that is in the following path, in GNU/Linux:
  
-エージェントプラグインを使用して Pandora FMS で監視するには、GNU/Linux の次のパスにあるソフトウェアエージェントの ''.conf'' ファイルから呼び出します。 +エージェントプラグインを使用して Pandora FMS で監視するには、GNU/Linux の次のパスにあるソフトウェアエージェントの ''.conf''  ファイルから呼び出します。
 <file> <file>
 +
 /etc/pandora/pandora_agent.conf /etc/pandora/pandora_agent.conf
  
行 776: 行 766:
 The execution on the last conf line can be created with the ''module_plugin''  command, followed by the execution command. The execution on the last conf line can be created with the ''module_plugin''  command, followed by the execution command.
  
-conf では ''module_plugin'' コマンドを用いて設定し、実行コマンドを続けます。+conf では ''module_plugin''  コマンドを用いて設定し、実行コマンドを続けます。
  
 Example of a possible plugin execution: Example of a possible plugin execution:
行 789: 行 779:
 This can also be done from the console if remote configuration is enabled. [[:en:documentation:03_monitoring:02_operations#advanced_agent_plugin_management_from_the_console|Example]]: This can also be done from the console if remote configuration is enabled. [[:en:documentation:03_monitoring:02_operations#advanced_agent_plugin_management_from_the_console|Example]]:
  
-リモート設定が有効になっている場合は、コンソールからも設定を行えます。 +リモート設定が有効になっている場合は、コンソールからも設定を行えます。 [[:ja:documentation:03_monitoring:02_operations#コンソールからの高度なエージェントプラグイン管理|例]]:
-[[:ja:documentation:03_monitoring:02_operations#コンソールからの高度なエージェントプラグイン管理|例]]:+
  
 {{  :wiki:plugin_editor_advanced2.png  }} {{  :wiki:plugin_editor_advanced2.png  }}
行 804: 行 793:
 In many plugins it could be the case that many agents are created, such as the Xenserver plugin that creates an agent for each virtual server machine, but luckily you may define a prefix for the agents, in this case for example the prefix ''xen-''  could be used, so when viewing the agents you may see that some have that structure in the name and you will know that those agents come from that particular plugin. In many plugins it could be the case that many agents are created, such as the Xenserver plugin that creates an agent for each virtual server machine, but luckily you may define a prefix for the agents, in this case for example the prefix ''xen-''  could be used, so when viewing the agents you may see that some have that structure in the name and you will know that those agents come from that particular plugin.
  
-仮想サーバマシンごとにエージェントを作成する Xenserver プラグインなど、多くのプラグインでは複数のエージェントが作成される場合があります。この場合、エージェントのプレフィックスに例えば ''xen-'' を定義できるため、エージェントを表示した際に名前にその構造が含まれていることがわかり、それらのエージェントがその特定のプラグインに由来するものであることがわかります。+仮想サーバマシンごとにエージェントを作成する Xenserver プラグインなど、多くのプラグインでは複数のエージェントが作成される場合があります。この場合、エージェントのプレフィックスに例えば ''xen-''  を定義できるため、エージェントを表示した際に名前にその構造が含まれていることがわかり、それらのエージェントがその特定のプラグインに由来するものであることがわかります。
  
 ===== PSPZ2 ===== ===== PSPZ2 =====
行 810: 行 799:
 A **pspz2**  file is a **zip**  compressed file made up of two files, the plugin and a ''plugin_definition.ini''  file that contains the plugin and module specification. A **pspz2**  file is a **zip**  compressed file made up of two files, the plugin and a ''plugin_definition.ini''  file that contains the plugin and module specification.
  
-**pspz2** ファイルは、プラグインとモジュールの定義を含む ''plugin_definition.ini'' ファイルの 2 つのファイルを **zip** 圧縮したファイルです。+**pspz2**  ファイルは、プラグインとモジュールの定義を含む ''plugin_definition.ini''  ファイルの 2 つのファイルを **zip**  圧縮したファイルです。
  
 {{  :wiki:pfms-plugins-development-22.png  }} {{  :wiki:pfms-plugins-development-22.png  }}
行 820: 行 809:
 Example of ''plugins_definition.ini''  of a plugin: Example of ''plugins_definition.ini''  of a plugin:
  
-プラグインの ''plugins_definition.ini'' ファイルの例: +プラグインの ''plugins_definition.ini''  ファイルの例:
 <code> <code>
  
行 855: 行 843:
 **filename**: It should have the same name as the script included in file ''.pspz'', previously named as ''< script_file >''. In this example it is a shell script ( ''.sh''  format) named ''ssh_pandoraplugin.sh''. **filename**: It should have the same name as the script included in file ''.pspz'', previously named as ''< script_file >''. In this example it is a shell script ( ''.sh''  format) named ''ssh_pandoraplugin.sh''.
  
-**filename**: ファイル ''.pspz'' に含まれるスクリプトと同じ名前にする必要があります。以前は ''< script_file >'' という名前でした。 この例では、''ssh_pandoraplugin.sh'' という名前のシェルスクリプト (''.sh'' 形式) です。+**filename**: ファイル ''.pspz''  に含まれるスクリプトと同じ名前にする必要があります。以前は ''< script_file >''  という名前でした。 この例では、''ssh_pandoraplugin.sh''  という名前のシェルスクリプト (''.sh''  形式) です。
  
 **plugin_type**: ''0''  for a Pandora FMS standard plugin, and ''1''  for a Nagios plugin. **plugin_type**: ''0''  for a Pandora FMS standard plugin, and ''1''  for a Nagios plugin.
  
-**plugin_type**: ''0'' は Pandora FMS 標準のプラグイン、''1'' は Nagios プラグインです。+**plugin_type**: ''0''  は Pandora FMS 標準のプラグイン、''1''  は Nagios プラグインです。
  
 **total_modules_provided**: It specifies how many modules are defined in the following sections of the ''.ini''  file. Set at least one (for use in an example at least). **total_modules_provided**: It specifies how many modules are defined in the following sections of the ''.ini''  file. Set at least one (for use in an example at least).
  
-**total_modules_provided**: ''.ini'' ファイルの次のセクションで定義されているモジュールの数を指定します。 少なくとも 1 つ設定します (少なくとも例で使用)。+**total_modules_provided**: ''.ini''  ファイルの次のセクションで定義されているモジュールの数を指定します。 少なくとも 1 つ設定します (少なくとも例で使用)。
  
 **execution_command**: If it is used, it must be placed before script. It could be an interpreter, such as ''java -jar''. Therefore, the plugin will be called for execution, from the Pandora FMS Plugin Server, with the following code: ''java -jar < plugin_path/ plugin_filename''. **execution_command**: If it is used, it must be placed before script. It could be an interpreter, such as ''java -jar''. Therefore, the plugin will be called for execution, from the Pandora FMS Plugin Server, with the following code: ''java -jar < plugin_path/ plugin_filename''.
  
-**execution_command**: 使用する場合は、script の前に置かなければなりません。これは、''java -jar'' のようなインタプリタかもしれません。プラグインは Pandora FMS プラグインサーバから次のようなコードで呼び出され実行されます: ''java -jar < plugin_path/ plugin_filename''+**execution_command**: 使用する場合は、script の前に置かなければなりません。これは、''java -jar''  のようなインタプリタかもしれません。プラグインは Pandora FMS プラグインサーバから次のようなコードで呼び出され実行されます: ''java -jar < plugin_path/ plugin_filename''
  
 **execution_postcommand**: If used, it defines the additional parameters transmitted to the plugin after ''< plugin_filename >'', which is invisible to the user. **execution_postcommand**: If used, it defines the additional parameters transmitted to the plugin after ''< plugin_filename >'', which is invisible to the user.
  
-**execution_postcommand**: 使用すると、''< plugin_filename >'' の後にプラグインに送信される追加パラメータを定義できます。ユーザからは見えません。+**execution_postcommand**: 使用すると、''< plugin_filename >''  の後にプラグインに送信される追加パラメータを定義できます。ユーザからは見えません。
  
 **total_macros_provided**: It defines the number of dynamic macros the plugin has. **total_macros_provided**: It defines the number of dynamic macros the plugin has.
行 904: 行 892:
 OSによっては、他の OS には存在しないパッケージがあり、コンパイルしたプラグインの実行でエラーが発生することがあるため、必要なプラグインの依存関係がすべてインストールされている CentOS 7 OS の環境でプラグインをコンパイルすることをお勧めします。 OSによっては、他の OS には存在しないパッケージがあり、コンパイルしたプラグインの実行でエラーが発生することがあるため、必要なプラグインの依存関係がすべてインストールされている CentOS 7 OS の環境でプラグインをコンパイルすることをお勧めします。
  
-===== Error control =====+===== エラー制御 =====
  
 Having good error control can help maintain the plugin over time, as it can help detect potential future errors in the plugin and locate them more quickly. Having good error control can help maintain the plugin over time, as it can help detect potential future errors in the plugin and locate them more quickly.
 +
 +適切なエラー制御を行うと、プラグインの潜在的な将来起こりうるエラーを検出し、迅速に原因を見つけることができるため、長期にわたってプラグインを維持するのに役立ちます。
  
 It can also help to detect what the error is accurately, since without error control in certain cases the error output may be too generic and it may be difficult to figure out what the problem is. It can also help to detect what the error is accurately, since without error control in certain cases the error output may be too generic and it may be difficult to figure out what the problem is.
  
-==== Plugin tests and validation ====+また、エラーを正確に検出するのにも役立ちます。エラー制御がないと、特定のケースではエラー出力があまりにも一般的になり、問題が何であるかを理解するのが難しくなる可能性があるためです。 
 + 
 +==== プラグインのテストと検証 ====
  
 Once the plugin has been developed, it is suitable to perform tests in environments to check its operation, in fact it would be great to be able to test it in more than one test environment. Once the plugin has been developed, it is suitable to perform tests in environments to check its operation, in fact it would be great to be able to test it in more than one test environment.
 +
 +プラグインを開発したら、環境でテストを実行してその動作を確認すると良いです。複数のテスト環境でテストできると良いです。
  
 A good testing process can help to solve possible errors and to make the plugin's operation more solid over time, as it is usually said, better safe than sorry. A good testing process can help to solve possible errors and to make the plugin's operation more solid over time, as it is usually said, better safe than sorry.
  
-==== Plugin launching ====+良いテストプロセスは、起こりうるエラーを解決し、長期にわたってプラグインの動作をより強固にするのに役立ちます。よく言われる「転ばぬ先の杖」です。 
 + 
 +==== プラグインの公開 ====
  
 When publishing the plugin, it is important to take certain aspects into account. When publishing the plugin, it is important to take certain aspects into account.
  
-=== Plugin documentation ===+プラグインを公開する際には、ある点を考慮することが重要です。 
 + 
 +=== プラグインのドキュメント ===
  
 Using some plugins could be at first difficult to understand. Some may have several options and it can be a bit hard to understand them. Using some plugins could be at first difficult to understand. Some may have several options and it can be a bit hard to understand them.
 +
 +プラグインの中には、最初は理解しにくいものがあります。いくつかのプラグインにはいくつかのオプションがあり、それらを理解するのは少し難しいかもしれません。
  
 Good documentation can help you understand it, it can even be useful for plugin creators themselves in the future, to help them remember certain things about the plugin that they may have forgotten over time. Good documentation can help you understand it, it can even be useful for plugin creators themselves in the future, to help them remember certain things about the plugin that they may have forgotten over time.
 +
 +良いドキュメントは、それを理解するのに役立ちますし、将来的にはプラグイン制作者自身が、時間が経つにつれて忘れてしまったプラグインのある事柄を思い出すのに役立つことさえあります。
  
 Pandora FMS has a system of online quick guides that makes documentation maintenance easier, which can be accessed from the following link: Pandora FMS has a system of online quick guides that makes documentation maintenance easier, which can be accessed from the following link:
 +
 +Pandora FMS には、ドキュメントのメンテナンスを容易にするためのオンラインクイックガイドのシステムがあり、以下のリンクからアクセスできます。
  
 <WRAP center round download 60%> <WRAP center round download 60%>
  
-[[https://pandorafms.com/guides/public/shelves/es-guias-rapidas|https://pandorafms.com/guides/public/shelves/es-guias-rapidas]]+[[https://pandorafms.com/guides/public/shelves/en-quick-guides|https://pandorafms.com/guides/public/shelves/en-quick-guides]]
  
 </WRAP> \\ The alternative to the documentation in quick-guide format is the PDF format. </WRAP> \\ The alternative to the documentation in quick-guide format is the PDF format.
  
-=== Upload a plugin to the library ===+クイックガイド形式のドキュメントに代わるものとして、PDF 形式のものもあります。 
 + 
 +=== ライブラリへのプラグインのアップロード ===
  
 The process when uploading a plugin to Pandora FMS library is very simple. Just access the "upload new module" section within "my plugins" section of the library. The process when uploading a plugin to Pandora FMS library is very simple. Just access the "upload new module" section within "my plugins" section of the library.
 +
 +Pandora FMS ライブラリにプラグインをアップロードする方法は非常に簡単です。ライブラリの "my plugins" セクションにある "upload new module" セクションにアクセスするだけです。
  
 {{  :wiki:pfms-plugins-development-23.png  }} {{  :wiki:pfms-plugins-development-23.png  }}
  
 Once all the sections of the entry have been configured, such as the title, a description of the plugin, the compressed plugin in zip format, the documentation, categories and tags, the plugin can be published by clicking on **submit**. Once all the sections of the entry have been configured, such as the title, a description of the plugin, the compressed plugin in zip format, the documentation, categories and tags, the plugin can be published by clicking on **submit**.
 +
 +タイトル、プラグインの説明、zip 形式で圧縮されたプラグイン、ドキュメント、カテゴリ、タグなど、エントリーのすべてのセクションを設定したら、**submit**  をクリックしてプラグインを公開することができます。
  
 All plugins uploaded to the library are reviewed and need a review time, before their final release. All plugins uploaded to the library are reviewed and need a review time, before their final release.
 +
 +ライブラリにアップロードされたすべてのプラグインは、最終的なリリース前にレビューが行われます。レビュー時間がかかります。
  
 Once the plugin is published, it will appear in the "latest uploads" section: Once the plugin is published, it will appear in the "latest uploads" section:
 +
 +プラグインが公開されると、"latest uploads" に表示されるようになります。
  
 {{  :wiki:pfms-plugins-development-24.png  }} {{  :wiki:pfms-plugins-development-24.png  }}
  
-===== Good practices to help review and maintain a plugin =====+===== プラグインのレビューとメンテナンスに役立つグッドプラクティス =====
  
 Some good practices can help decrease the time spent on tasks, prevent and circumvent common errors during the different stages of the plugin creation process and plugin maintenance over time, and make their review easier. These can be: Some good practices can help decrease the time spent on tasks, prevent and circumvent common errors during the different stages of the plugin creation process and plugin maintenance over time, and make their review easier. These can be:
 +
 +いくつかのグッドプラクティスは、タスクに費やす時間を減らし、プラグインの作成プロセスやプラグインのメンテナンスのさまざまな段階でよくあるエラーを防止・回避し、それらのレビューを容易にするのに役立ちます。これらは以下の通りです。
  
   * Leaving a good previous configuration well documented in case it is necessary to make some previous configurations on the system on the plugin itself.   * Leaving a good previous configuration well documented in case it is necessary to make some previous configurations on the system on the plugin itself.
行 958: 行 974:
   * Testing your code. It is important to test the plugin's operation to verify that everything is fine. Finding an error in time and fixing it will avoid problems in the future.   * Testing your code. It is important to test the plugin's operation to verify that everything is fine. Finding an error in time and fixing it will avoid problems in the future.
  
-[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]+  * システム上でこれまで行ったことのあるプラグインの設定を行う必要がある場合に備えて、正しく動作する設定を十分に文書化して残しておくこと。 
 +  * プラグインの使い方をイメージしやすいように、実際に実行した例をドキュメント化すること。 
 +  * プラグインのコードにコメントを書くことで、より深く、あるいはより速く理解することができます。 
 +  * コードの読みやすさを優先します。複雑であればあるほど、それに対処するための時間とリソースが必要になります。 
 +  * コードのテストをします。プラグインの動作をテストして、すべてが問題ないことを確認することが重要です。エラーを時間内に発見して修正することで、将来的な問題を回避することができます。 
 + 
 +[[:ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]