ja:documentation:08_technical_reference:11_pfms_plugis

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
最新のリビジョン両方とも次のリビジョン
ja:documentation:08_technical_reference:11_pfms_plugis [2022/12/15 01:27] – [プラグインの見つけ方] junichija:documentation:08_technical_reference:11_pfms_plugis [2022/12/15 01:31] junichi
行 101: 行 101:
 ===== プラグインのライフサイクル ===== ===== プラグインのライフサイクル =====
  
-[[:wiki:pfms-plugins-development-05.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-05.png|{{  :wiki:pfms-plugins-development-05.png  }}]]+{{  :wiki:pfms-plugins-development-05.png  }}
  
 ===== プラグインの計画 ===== ===== プラグインの計画 =====
行 302: 行 302:
 プラグインは、データや Pandora FMS の追加機能を統合するスクリプトです。これらは小さなプログラムであるため、開発するには、フレームワークまたは Visual Studio Code などのコードエディタが必要です。 プラグインは、データや Pandora FMS の追加機能を統合するスクリプトです。これらは小さなプログラムであるため、開発するには、フレームワークまたは Visual Studio Code などのコードエディタが必要です。
  
-[[:wiki:pfms-plugins-development-06.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-06.png|{{  :wiki:pfms-plugins-development-06.png  }}]]+{{  :wiki:pfms-plugins-development-06.png  }}
  
 In turn, tools such as github or gitlab can help preserve and maintain the code of the plugins created. In turn, tools such as github or gitlab can help preserve and maintain the code of the plugins created.
行 328: 行 328:
 プラグインの開発には、通常、監視するサービスのインストール、アカウントなどのテスト環境が必要です。速度とシンプルさから環境作成に役立つ 2 つの技術としては、docker と vagrant があります。 もちろん、テストしたいサービスのプロジェクトでソリューションを用意する必要がありますが、いくつかのコマンドまたは小さな構成のみで実行できます。 プラグインの開発には、通常、監視するサービスのインストール、アカウントなどのテスト環境が必要です。速度とシンプルさから環境作成に役立つ 2 つの技術としては、docker と vagrant があります。 もちろん、テストしたいサービスのプロジェクトでソリューションを用意する必要がありますが、いくつかのコマンドまたは小さな構成のみで実行できます。
  
-[[:wiki:pfms-plugins-development-07.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-07.png|{{  :wiki:pfms-plugins-development-07.png  }}]]+{{  :wiki:pfms-plugins-development-07.png  }}
  
 ===== XML ===== ===== XML =====
行 657: 行 657:
 プラグインのヘルプメニューの例: プラグインのヘルプメニューの例:
  
-[[:wiki:pfms-plugins-development-08.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-08.png|{{  :wiki:pfms-plugins-development-08.png  }}]]+{{  :wiki:pfms-plugins-development-08.png  }}
  
 ===== Pandora FMS プラグイン設定 ===== ===== Pandora FMS プラグイン設定 =====
行 671: 行 671:
 サーバプラグインを使用して Pandora FMS から監視するには、サーバメニューの "プラグイン" に移動します。 サーバプラグインを使用して Pandora FMS から監視するには、サーバメニューの "プラグイン" に移動します。
  
-[[:wiki:pfms-plugins-development-09.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-09.png|{{  :wiki:pfms-plugins-development-09.png  }}]]+{{  :wiki:pfms-plugins-development-09.png  }}
  
 Click on "add". Click on "add".
行 677: 行 677:
 "追加(add)" をクリックします。 "追加(add)" をクリックします。
  
-[[:wiki:pfms-plugins-development-11.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-11.png|{{  :wiki:pfms-plugins-development-11.png  }}]]+{{  :wiki:pfms-plugins-development-11.png  }}
  
 It should be given the name and description you prefer. It should be given the name and description you prefer.
行 683: 行 683:
 好みの名前と説明を付ける必要があります。 好みの名前と説明を付ける必要があります。
  
-[[:wiki:pfms-plugins-development-13.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-13.png|{{  :wiki:pfms-plugins-development-13.png  }}]]+{{  :wiki:pfms-plugins-development-13.png  }}
  
 As a command you should enter the execution with the plugin path: As a command you should enter the execution with the plugin path:
行 715: 行 715:
 プラグインパスには、コマンドを入力する必要があります。 プラグインパスには、コマンドを入力する必要があります。
  
-[[:wiki:pfms-plugins-development-15.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-15.png|{{  :wiki:pfms-plugins-development-15.png  }}]]+{{  :wiki:pfms-plugins-development-15.png  }}
  
 In plugin parameters enter them followed by the macro ''_field_''. In plugin parameters enter them followed by the macro ''_field_''.
行 723: 行 723:
 ''–SERVER'' ''–SERVER''
  
-[[:wiki:pfms-plugins-development-15.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-15.png|{{  :wiki:pfms-plugins-development-15.png  }}]]+{{  :wiki:pfms-plugins-development-15.png  }}
  
-''–SUBJECT'' [[:wiki:pfms-plugins-development-17.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-17.png|{{  :wiki:pfms-plugins-development-17.png  }}]]+''–SUBJECT'' {{  :wiki:pfms-plugins-development-17.png  }}
  
-''–BODY'' [[:wiki:pfms-plugins-development-18.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-18.png|{{  :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".
行 737: 行 737:
 前の手順が完了したら、プラグインを呼び出します。 エージェント表示に移動し、プラグインモジュールを作成します。 前の手順が完了したら、プラグインを呼び出します。 エージェント表示に移動し、プラグインモジュールを作成します。
  
-[[:wiki:pfms-plugins-development-19.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-19.png|{{  :wiki:pfms-plugins-development-19.png  }}]]+{{  :wiki:pfms-plugins-development-19.png  }}
  
 A name must be given and in the "plugin" section the one you just configured is added. A name must be given and in the "plugin" section the one you just configured is added.
行 751: 行 751:
 モジュールの値が ''1''  で表示されている場合、それは正しく実行されていることを意味します。 モジュールの値が ''1''  で表示されている場合、それは正しく実行されていることを意味します。
  
-[[:wiki:pfms-plugins-development-20.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-20.png|{{  :wiki:pfms-plugins-development-20.png  }}]]+{{  :wiki:pfms-plugins-development-20.png  }}
  
 ==== エージェントプラグイン ==== ==== エージェントプラグイン ====
行 781: 行 781:
 リモート設定が有効になっている場合は、コンソールからも設定を行えます。 [[:ja:documentation:03_monitoring:02_operations#コンソールからの高度なエージェントプラグイン管理|例]]: リモート設定が有効になっている場合は、コンソールからも設定を行えます。 [[:ja:documentation:03_monitoring:02_operations#コンソールからの高度なエージェントプラグイン管理|例]]:
  
-[[:wiki:plugin_editor_advanced2.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:plugin_editor_advanced2.png|{{  :wiki:plugin_editor_advanced2.png  }}]]+{{  :wiki:plugin_editor_advanced2.png  }}
  
 ===== Pandora FMS でのプラグインの表示 ===== ===== Pandora FMS でのプラグインの表示 =====
行 789: 行 789:
 プラグインデータの表示は通常、エージェント表示から行われます。 通常、データ構造はエージェントとモジュールにて定義されるため、プラグインがエージェントとモジュールを作成するのは普通のことです。したがって、これらのデータはエージェント自体の表示メニューに表示できます。 プラグインデータの表示は通常、エージェント表示から行われます。 通常、データ構造はエージェントとモジュールにて定義されるため、プラグインがエージェントとモジュールを作成するのは普通のことです。したがって、これらのデータはエージェント自体の表示メニューに表示できます。
  
-[[:wiki:pfms-plugins-development-21.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-21.png|{{  :wiki:pfms-plugins-development-21.png  }}]]+{{  :wiki:pfms-plugins-development-21.png  }}
  
 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.
行 801: 行 801:
 **pspz2**  ファイルは、プラグインとモジュールの定義を含む ''plugin_definition.ini''  ファイルの 2 つのファイルを **zip**  圧縮したファイルです。 **pspz2**  ファイルは、プラグインとモジュールの定義を含む ''plugin_definition.ini''  ファイルの 2 つのファイルを **zip**  圧縮したファイルです。
  
-[[:wiki:pfms-plugins-development-22.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-22.png|{{  :wiki:pfms-plugins-development-22.png  }}]]+{{  :wiki:pfms-plugins-development-22.png  }}
  
 This file format is very useful when packaging plugins, as it simplifies their installation. Using this format, plugins can be installed more quickly in Pandora FMS console from the "plugins registration" section. This file format is very useful when packaging plugins, as it simplifies their installation. Using this format, plugins can be installed more quickly in Pandora FMS console from the "plugins registration" section.
行 946: 行 946:
 Pandora FMS ライブラリにプラグインをアップロードする方法は非常に簡単です。ライブラリの "my plugins" セクションにある "upload new module" セクションにアクセスするだけです。 Pandora FMS ライブラリにプラグインをアップロードする方法は非常に簡単です。ライブラリの "my plugins" セクションにある "upload new module" セクションにアクセスするだけです。
  
-[[:wiki:pfms-plugins-development-23.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-23.png|{{  :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**.
行 960: 行 960:
 プラグインが公開されると、"latest uploads" に表示されるようになります。 プラグインが公開されると、"latest uploads" に表示されるようになります。
  
-[[:wiki:pfms-plugins-development-24.png?id=ja%3Adocumentation%3A08_technical_reference%3A11_pfms_plugis&media=wiki:pfms-plugins-development-24.png|{{  :wiki:pfms-plugins-development-24.png  }}]]+{{  :wiki:pfms-plugins-development-24.png  }}
  
 ===== プラグインのレビューとメンテナンスに役立つグッドプラクティス ===== ===== プラグインのレビューとメンテナンスに役立つグッドプラクティス =====