ただし、プラグインとそのデータが XML に基づいているのはエージェントプラグインのみです。エージェントプラグインのみがターミナル実行で XML を出力します。サーバプラグインは単純なデータのみを表示します。サーバプラグインにおける最も基本的なことは、正常な場合は ''1'' を出力し、逆に何らかのエラーが発生した場合は ''0'' を出力することです。
ただし、プラグインとそのデータが XML に基づいているのはエージェントプラグインのみです。エージェントプラグインのみがターミナル実行で XML を出力します。サーバプラグインは単純なデータのみを表示します。サーバプラグインにおける最も基本的なことは、正常な場合は ''1'' を出力し、逆に何らかのエラーが発生した場合は ''0'' を出力することです。
+
+
<wrap #ks12 />
===== エージェントとモジュール =====
===== エージェントとモジュール =====
行 346:
行 351:
The xml structure of agents and modules have different attributes for configuring them.
The xml structure of agents and modules have different attributes for configuring them.
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:
-
各 ''モジュール'' にはモジュール要素が必要であり、次の要素をネストして定義できます。
+
各 ''モジュール'' にはモジュール要素が必要であり、次の要素をネストして定義できます。
+
+
<WRAP group> \\ <WRAP half column>
* **name**: Module name.
* **name**: Module name.
行 416:
行 428:
* **max_warning**: Maximum value for alert status.
* **max_warning**: Maximum value for alert status.
* **disabled**: Disable (0) or enable the module. Disabled modules are not processed.
* **disabled**: Disable (0) or enable the module. Disabled modules are not processed.
-
* **min_ff_event**: FF threshold (see [[:en:documentation:01_understanding:03_glossary#flip-flop_protection|Flip-Flop]]).
+
* **min_ff_event**: FF threshold (see [[:en:documentation:pandorafms:introduction:03_glossary#flip-flop_protection|Flip-Flop]]).
* **status**: Module status (NORMAL, WARNING or CRITICAL). Critical and alert status limits are ignored if the status is specified.
* **status**: Module status (NORMAL, WARNING or CRITICAL). Critical and alert status limits are ignored if the status is specified.
* **datalist**: It sends the module data in datalist format (one database entry for each of the values received) [0/1].
* **datalist**: It sends the module data in datalist format (one database entry for each of the values received) [0/1].
* **unit**: Module unit. It supports ''_timeticks_'' macro to transform data in timeticks format to ''dd/hh/mm/ss''.
* **unit**: Module unit. It supports ''_timeticks_'' macro to transform data in timeticks format to ''dd/hh/mm/ss''.
-
* **timestamp**: It sets a timestamp on the data received from the module.
+
* **timestamp**: It sets a timestamp on the data received from the module (to use timestamp in modules they must be in a datalist block, [[#ks12_6|as shown in the examples below]]).
* **module_group**: Group of modules to which the module will be added.
* **module_group**: Group of modules to which the module will be added.
* **custom_id**: Module custom ID.
* **custom_id**: Module custom ID.
行 426:
行 438:
* **str_critical**: Critical threshold for string modules.
* **str_critical**: Critical threshold for string modules.
A module must have at least one name, type and data element.
+
+
モジュールには、少なくとも 1 つの名前、型、およびデータ要素が必要です。
-
例:
<code xml>
<code xml>
<module>
<module>
行 510:
行 530:
<data>21</data>
<data>21</data>
</module>
</module>
+
</code>
</code>
行 517:
行 538:
XML データ ファイルには、任意の数の要素を含めることができます。
XML データ ファイルには、任意の数の要素を含めることができます。
-
<WRAP center round important 60%>
+
<WRAP center round important 90%>
Do not forget to close the tag ''agent_data''!
Do not forget to close the tag ''agent_data''!
行 523:
行 544:
</WRAP>
</WRAP>
-
<WRAP center round important 60%>
+
<WRAP center round important 90%>
-
''agent_data'' タグを閉じることを忘れないでください!
+
''agent_data'' タグを閉じることを忘れないでください!
</WRAP>
</WRAP>
+
+
<wrap #ks12_5 />
+
+
==== リストタイプモジュール ====
There are also list modules, which instead of having only one value may contain several, these are useful for string values. The datalist tag should be used in this type of modules as you see in the following example:
There are also list modules, which instead of having only one value may contain several, these are useful for string values. The datalist tag should be used in this type of modules as you see in the following example:
行 543:
行 568:
</datalist>
</datalist>
</module>
</module>
+
</code>
</code>
+
+
<wrap #ks12_6 />
+
+
==== モジュールのタイムスタンプ ====
A time stamp can be specified for each value:
A time stamp can be specified for each value:
行 567:
行 597:
</datalist>
</datalist>
</module>
</module>
+
</code>
</code>
-
Some more examples that include the use of thresholds and units:
+
<wrap #ks12_7 />
+
+
==== しきい値と単位 ====
+
+
More examples that include the use of thresholds and units:
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.
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.
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**.