ja:documentation:pandorafms:technical_reference:06_anexo_agent_plugins

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:technical_reference:06_anexo_agent_plugins [2024/09/01 07:49] – [pandora_agent.conf のドキュメント確認] junichija:documentation:pandorafms:technical_reference:06_anexo_agent_plugins [2025/02/26 02:38] (現在) – [pandora_agent_daemon の再起動] junichi
行 8: 行 8:
 ===== エージェントプラグインの基本機能 ===== ===== エージェントプラグインの基本機能 =====
  
-The //agent //plugin **is executed by the Pandora FMS Software Agent** so it has to have some special features:+The //agent //plugin **is run by Pandora FMS Software Agent** so it has to have some special features:
  
 //エージェント//プラグインは、**Pandora FMS ソフトウエアエージェントで実行され**、いくつかの特別な機能があります。 //エージェント//プラグインは、**Pandora FMS ソフトウエアエージェントで実行され**、いくつかの特別な機能があります。
  
-  * Each execution of //plugin// may return one or more modules with their corresponding values. The output must be in [[#ks3_5|XML format]]. +   * Each plugin execution may return one or more modules with their corresponding values. The output must be in [[#ks3_5|XML format]]. 
-  * It will be possible to access resources local to the machine or remotely to resources of another machine.+  * It will be possible to access local machine resources local or remote machine resources.
   * It is possible to use any type of programming language supported by the operating system where the Pandora FMS software agent is installed.   * It is possible to use any type of programming language supported by the operating system where the Pandora FMS software agent is installed.
-  * All the dependencies or software needed to run the plugin must be available or installed in the same machine that runs the Pandora FMS agent.+  * All dependencies or software needed to run the plugin must be available or installed in the same machine that runs Pandora FMS agent.
  
   * それぞれのプラグインの実行では、一つまたは複数のモジュールの値を返します。出力は後述する XML フォーマットである必要があります。   * それぞれのプラグインの実行では、一つまたは複数のモジュールの値を返します。出力は後述する XML フォーマットである必要があります。
行 22: 行 22:
   * プラグインを実行するために必要な依存プログラムは、Pandora ソフトウエアエージェントを実行するのと同じマシンにインストールされている必要があります。   * プラグインを実行するために必要な依存プログラムは、Pandora ソフトウエアエージェントを実行するのと同じマシンにインストールされている必要があります。
  
-Agent plugins can perform a kind of recon task since the plugin can return several modules in one run and the number can change between different runs.+Agent plugins may perform a kind of recon task since the plugin may return several modules in one run and the number may change between different runs.
  
 エージェントプラグインは、"自動検出タスク" のようなことを実行でき、プラグインは一度の実行で複数のモジュールを返すことができ、また、実行ごとに異なる数を返すことができます。 エージェントプラグインは、"自動検出タスク" のようなことを実行でき、プラグインは一度の実行で複数のモジュールを返すことができ、また、実行ごとに異なる数を返すことができます。
行 224: 行 224:
 ==== pandora_agent_daemon の再起動 ==== ==== pandora_agent_daemon の再起動 ====
  
-The Software Agent will run the plugins every five minutes. For those people who can not wait, it is possible to restart the Software Agent from the command line.+The Software Agent will run the plugins every minutes and it is possible to restart the Software Agent with user **root** or equivalent from the command line:
  
 ソフトウエアエージェントは 5分ごとにプラグインを実行します。次回の実行まで待てない場合は、コマンドラインからソフトウエアエージェントを再起動します。 ソフトウエアエージェントは 5分ごとにプラグインを実行します。次回の実行まで待てない場合は、コマンドラインからソフトウエアエージェントを再起動します。
  
-例:+<code bash> 
 +systemctl restart pandora_agent_daemon 
 + 
 + 
 +</code> 
 + 
 +<wrap #ks3_3 />
  
-  /etc/init.d/pandora_agent_daemon restart 
  
 ==== プラグインのパーミッションの確認 ==== ==== プラグインのパーミッションの確認 ====
 +
 +The plugin and the files to be used **must have the correct** read, write and execute permissions.
  
 プラグインおよび利用するファイルは、リード、ライト、実行の**権限を正しく設定する**必要があります。Unix であれば、次のようにします。 プラグインおよび利用するファイルは、リード、ライト、実行の**権限を正しく設定する**必要があります。Unix であれば、次のようにします。
  
-  chmod 755 <プラグインファイル>+<code bash> 
 +chmod 755 < plugin_path > 
 + 
 +</code> 
 + 
 +<wrap #ks3_4 /> 
  
 ==== 出力の確認 ==== ==== 出力の確認 ====
  
-エラーを見つける簡単な方法は、コマンドラインで**プラグインを手動実行**することです。注意して**出力結果を確認**してください。例えば、次のように実行します。+A better way to find the errors is to **run the plugin manually** in command line. **The result or output of the execution should be carefully checked**.
  
-<code> +エラーを見つける簡単な方法は、コマンドラインで**プラグインを手動実行**することです。注意して**出力結果を確認**してください。 
-popeye:/etc/pandora/plugins # ./pandora_df  + 
-<module> +<wrap #ks3_5 />
-<name><![CDATA[/dev/sda2]]></name> +
-<type><![CDATA[generic_data]]></type> +
-<data><![CDATA[19]]></data> +
-<description>% of usage in this volume</description> +
-</module> +
-<module> +
-<name><![CDATA[udev]]></name> +
-<type><![CDATA[generic_data]]></type> +
-<data><![CDATA[1]]></data> +
-<description>% of usage in this volume</description> +
-</module> +
-</code>+
  
 ==== XMLの確認 ==== ==== XMLの確認 ====
  
-The XML that prints the plugin **must have valid XML syntax**. +The XML produced by the plugin **must have valid XML syntax**. To check you can follow these two steps from the command line (you must have ''xmllint'' installed):
-The XML also **needs to be well formed**. To check if it is, you could follow this steps from the command line:+
  
-プラグインが出力する XML は、**正しい XML の書式である必要があります**。 +プラグインによって生成された XML は、**正しい XML 構文である必要があります**。確認するには、コマンドラインから次の 2 つの手順を実行します (''xmllint'' がインストールされている必要があります)
-XML はまた、**正しく整形されている必要があります**。それを確認するためには、コマンドラインから次の手順を実行します。+
  
-  - Create an XML document with the plugin output: //./Plugin.pl > Plugin.xml// +  - Create an XML document with the plugin output: ''./Plugin.pl > Plugin.xml''. 
-  - Check the XML document: //xmllint Plugin.xml//+  - Checking the XML document: ''xmllint Plugin.xml''.
  
-  - プラグインの出力を xml ファイルに落とします。: //./Plugin.pl > Plugin.xml// +  - プラグインの出力を xml ファイルに落とします。: ''./Plugin.pl > Plugin.xml'' 
-  - xml ファイルの書式をチェックします。: //xmllint Plugin.xml//+  - xml ファイルの書式をチェックします。: ''xmllint Plugin.xml'' 
 + 
 +<wrap #ks3_6 />
  
 ==== デバッグモード ==== ==== デバッグモード ====
  
-//pandora_agent.conf// ファイル内で、//debug// の値を から 1に変更することで、デバッグモードを有効にすることができます。これを行うと、ソフトウエアエージェントがプラグインを実行した結果が、エージェントのその他の情報とあわせて xml ファイルに保存されます。+You can activate the development mode by changing the value of the debug tag in the ''pandora_agent.conf'' file from ''0'' to ''1''. Once you have done this, when the Software Agent executes the plugin, the results will be saved in an XML document with all the agent information.
  
-ファイル名は、エージェント名と //.data// を含むもので、///tmp// ディレクトリに保存されます(pandoraエージェントのログは、/var/log/pandora/pandora_agent.log を確認してください)。内容を確認し、期待したプラグインの実行結果が含まれているかどうかを見ます。+''pandora_agent.conf'' ファイル内で、debug の値を ''0'' から ''1'' に変更することで、デバッグモードを有効にすることができます。これを行うと、ソフトウエアエージェントがプラグインを実行した結果が、エージェントのその他の情報とあわせて xml ファイルに保存されます。 
 + 
 +The name of the document will be the name of the agent with the extension ''.data'', and it will be located in the '''tmp''' directory (you should check the log of the PFMS agent in ''/var/log/pandora/pandora_agent.log''). By reviewing the document, you will be able to see if the plugin data is being collected and if it is as expected. 
 + 
 +ファイル名は、エージェント名と ''.data'' を含むもので、''tmp'' ディレクトリに保存されます(Pandora FMS エージェントのログは、''/var/log/pandora/pandora_agent.log'' を確認してください)。内容を確認し、期待したプラグインの実行結果が含まれているかどうかを見ます。 
 + 
 +<WRAP center round tip 90%> 
 + 
 +When you enable Debug mode, the agent runs only once and then exits. 
 + 
 +</WRAP> 
 + 
 +<WRAP center round tip 90%>
  
-<WRAP center round tip 60%> 
 デバッグモードを有効にすると、エージェントは 1回の実行で終了します。 デバッグモードを有効にすると、エージェントは 1回の実行で終了します。
 +
 </WRAP> </WRAP>
 +
 +<wrap #ks3_7 />
  
 ==== フォーラム ==== ==== フォーラム ====
  
-それでもまだうまくいかない場合は、我々の [[http://www.openideas.info/smf/|フォーラム]] (日本語フォーラムは [[http://openideas.info/smf/index.php/board,30.0.html|こちら]]) で聞いてみてください。+If after all the error persists, [[https://pandorafms.com/community/|you can ask in the PFMS forum]]. 
 + 
 +それでもまだうまくいかない場合は、我々の [[https://pandorafms.com/community/|フォーラム]] で聞いてみてください。
  
 [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]
  
  • ja/documentation/pandorafms/technical_reference/06_anexo_agent_plugins.1725176972.txt.gz
  • 最終更新: 2024/09/01 07:49
  • by junichi