ja:documentation:pandorafms:technical_reference:12_disco_development

差分

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

この比較画面へのリンク

次のリビジョン
前のリビジョン
ja:documentation:pandorafms:technical_reference:12_disco_development [2023/12/13 06:47] – 作成 - 外部編集 127.0.0.1ja:documentation:pandorafms:technical_reference:12_disco_development [2025/09/12 23:01] (現在) – [CUSTOM_FIELDS ブロック] junichi
行 27: 行 27:
 オプションで、''.disco'' パッケージには、Pandora FMS コンソールのプラグインロゴとなる **logo.png** というファイルが含まれる場合があります。 ロゴファイルが追加されない場合、コンソールは自動的にデフォルトのロゴを使用します。 オプションで、''.disco'' パッケージには、Pandora FMS コンソールのプラグインロゴとなる **logo.png** というファイルが含まれる場合があります。 ロゴファイルが追加されない場合、コンソールは自動的にデフォルトのロゴを使用します。
  
-Finally, typically, a ''.disco'' file will contain all the scripts, executables, and libraries needed by the server and the console. Although it is not mandatory, it is common and recommended, to avoid additional installation requirements on systems where you want to configure and execute the tasks that use the plugin.+Finally, typically, a ''.disco'' file will contain all the scripts, executables, and libraries needed by the server and the console. Although it is not required, it is common and recommended, to avoid additional installation requirements on systems where you want to configure and execute the tasks that use the plugin.
  
 最後に、通常、''.disco'' ファイルには、サーバとコンソールに必要なすべてのスクリプト、実行可能ファイル、ライブラリが含まれます。 これは必須ではありませんが、プラグインを使用するタスクを構成および実行するシステムで追加のインストール要件を回避するために、一般的であり推奨されます。 最後に、通常、''.disco'' ファイルには、サーバとコンソールに必要なすべてのスクリプト、実行可能ファイル、ライブラリが含まれます。 これは必須ではありませんが、プラグインを使用するタスクを構成および実行するシステムで追加のインストール要件を回避するために、一般的であり推奨されます。
行 102: 行 102:
  
 **N** または **M** という文字が大文字で使用されている場合、正の整数を指します。 通常、**VALUE** などの他の要素と組み合わせて使用され、複数回繰り返すことができることを示します (**VALUE_N** など)。 **N** または **M** という文字が大文字で使用されている場合、正の整数を指します。 通常、**VALUE** などの他の要素と組み合わせて使用され、複数回繰り返すことができることを示します (**VALUE_N** など)。
 +
 +<wrap #ks4 />
  
 ===== サーバマクロ ===== ===== サーバマクロ =====
行 119: 行 121:
    * ''<nowiki>__consoleUser__</nowiki>'' → Console user configured in ''pandora_server.conf'' (console_user).    * ''<nowiki>__consoleUser__</nowiki>'' → Console user configured in ''pandora_server.conf'' (console_user).
    * ''<nowiki>__consolePass__</nowiki>'' → Console password configured in ''pandora_server.conf'' (console_pass).    * ''<nowiki>__consolePass__</nowiki>'' → Console password configured in ''pandora_server.conf'' (console_pass).
 +  * ''<nowiki>__pandoraServerConf__</nowiki>''  → Complete path to Pandora FMS server configuration file ''pandora_server.conf''.
  
    * ''<nowiki>__taskMD5__</nowiki>'' → タスク ID とアプリケーションの短縮名から生成された、タスクの一意の MD5。 これは、実行中に固有の要素 (ファイルなど) を生成する場合に役立ちます。    * ''<nowiki>__taskMD5__</nowiki>'' → タスク ID とアプリケーションの短縮名から生成された、タスクの一意の MD5。 これは、実行中に固有の要素 (ファイルなど) を生成する場合に役立ちます。
行 130: 行 133:
    * ''<nowiki>__consoleUser__</nowiki>'' → ''pandora_server.conf'' (console_user) で設定されたコンソールユーザ。    * ''<nowiki>__consoleUser__</nowiki>'' → ''pandora_server.conf'' (console_user) で設定されたコンソールユーザ。
    * ''<nowiki>__consolePass__</nowiki>'' → ''pandora_server.conf'' (console_pass) で設定されたコンソールパスワード。    * ''<nowiki>__consolePass__</nowiki>'' → ''pandora_server.conf'' (console_pass) で設定されたコンソールパスワード。
 +   * ''<nowiki>__pandoraServerConf__</nowiki>''  → Pandora FMS サーバ設定ファイル ''pandora_server.conf'' への完全なパス。
  
 <WRAP center round important 60%> <WRAP center round important 60%>
行 150: 行 154:
  
    * **short_name**:    * **short_name**:
-       Mandatory.+       Required.
        * Defines the short name of the plugin.        * Defines the short name of the plugin.
        * The short name must be unique.        * The short name must be unique.
行 156: 行 160:
        * Short names can only contain letters (''A-Z'' and ''a-z''), numbers (''0-9''), periods (''.''), hyphens (''-''), and underscores (''_'').        * Short names can only contain letters (''A-Z'' and ''a-z''), numbers (''0-9''), periods (''.''), hyphens (''-''), and underscores (''_'').
    * **section**:    * **section**:
-       Mandatory.+       Required.
        * Defines the section of the console where the plugin will be displayed.        * Defines the section of the console where the plugin will be displayed.
        * Can be **app**, **cloud** or **custom**.        * Can be **app**, **cloud** or **custom**.
    * **name**:    * **name**:
-       Mandatory.+       Required.
        * Defines the name of the plugin that will be displayed in the console.        * Defines the name of the plugin that will be displayed in the console.
    * **version**:    * **version**:
-       Mandatory.+       Required.
        * Defines the version of the plugin that will be displayed in the console.        * Defines the version of the plugin that will be displayed in the console.
        * It is recommended to change the version if changes are made to a plugin, no matter how minor.        * It is recommended to change the version if changes are made to a plugin, no matter how minor.
行 213: 行 217:
  
    * **exec**:    * **exec**:
-       Mandatory.+       Required.
        * Defines the format of the executions that the Pandora FMS server must perform for the plugin tasks.        * Defines the format of the executions that the Pandora FMS server must perform for the plugin tasks.
        * This parameter is an **array** whose keys will be positional, that is, they can be indicated with numbers or not indicated.        * This parameter is an **array** whose keys will be positional, that is, they can be indicated with numbers or not indicated.
行 349: 行 353:
 [discovery_extension_definition] [discovery_extension_definition]
  
-Mandatory+Required
 ; Defines discovery application short name ; Defines discovery application short name
 ; Short name must be unique ; Short name must be unique
行 356: 行 360:
 short_name = DISCOVERY_APPLICATION_UNIQUE_NAME short_name = DISCOVERY_APPLICATION_UNIQUE_NAME
  
-Mandatory+Required
 ; Defines the section where application will be shown in console ; Defines the section where application will be shown in console
 ; Possible values: ; Possible values:
行 365: 行 369:
 section = app section = app
  
-Mandatory+Required
 ; Defines discovery application name, shown in console ; Defines discovery application name, shown in console
  
 name = DISCOVERY_APPLICATION_NAME name = DISCOVERY_APPLICATION_NAME
  
-Mandatory+Required
 ; Defines discovery application version, shown in console ; Defines discovery application version, shown in console
  
行 386: 行 390:
 execution_file[_EXEC_MACRO_N_] = SCRIPT.pl execution_file[_EXEC_MACRO_N_] = SCRIPT.pl
  
-Mandatory+Required
 ; Defines execution for discovery server ; Defines execution for discovery server
 ; Several executions can be defined ; Several executions can be defined
行 462: 行 466:
  
    * **name**:    * **name**:
-       Mandatory.+       Required.
        * Defines the names of the different configuration steps in the tasks.        * Defines the names of the different configuration steps in the tasks.
    * **script_data_fields**:    * **script_data_fields**:
行 487: 行 491:
              {              {
                  "macro": "_FIELD_MACRO_N_",                  "macro": "_FIELD_MACRO_N_",
-                 "mandatory_field": "BOOL",+                 "required_field": "BOOL",
                  "name": "FIELD_NAME",                  "name": "FIELD_NAME",
                  "tip": "FIELD_TIP",                  "tip": "FIELD_TIP",
行 591: 行 595:
 ; Several steps can be defined using a different key (N) ; Several steps can be defined using a different key (N)
  
-Mandatory+Required
 ; Defines configuration step name ; Defines configuration step name
  
 name[N] = STEP_NAME name[N] = STEP_NAME
  
-Mandatory if not custom_fields defined+Required if not custom_fields defined
 ; Defines configuration fields retrieved to console by a command execution ; Defines configuration fields retrieved to console by a command execution
 ; execution_file scripts can be used to retrieve data ; execution_file scripts can be used to retrieve data
行 603: 行 607:
 ; { ; {
 ; "macro": "_FIELD_MACRO_N_", ; "macro": "_FIELD_MACRO_N_",
-; "mandatory_field": "BOOL",+; "required_field": "BOOL",
 ; "name": "FIELD_NAME", ; "name": "FIELD_NAME",
 ; "tip": "FIELD_TIP", ; "tip": "FIELD_TIP",
行 650: 行 654:
 script_data_fields[N] = CONSOLE_EXECUTION_FIELDS script_data_fields[N] = CONSOLE_EXECUTION_FIELDS
  
-Mandatory if not script_data_fields defined+Required if not script_data_fields defined
 ; Defines custom configuration fields ; Defines custom configuration fields
  
行 669: 行 673:
  
    * **file**:    * **file**:
-       Mandatory.+       Required.
        * Defines the contents for temporary configuration files that can be used during the executions of the Pandora FMS server and console.        * Defines the contents for temporary configuration files that can be used during the executions of the Pandora FMS server and console.
        * This parameter is an **array** whose keys will be **valid macros** that will be used to indicate the use of temporary files in the plugin.        * This parameter is an **array** whose keys will be **valid macros** that will be used to indicate the use of temporary files in the plugin.
行 701: 行 705:
 [tempfile_confs] [tempfile_confs]
  
-Mandatory+Required
 ; Defines the content for the temporary file ; Defines the content for the temporary file
 ; File will be used where temporary file macro is specified during executions ; File will be used where temporary file macro is specified during executions
行 733: 行 737:
  
    * **macro**:    * **macro**:
-       Mandatory.+       Required.
        * Defines the macros in which the task configuration values will be stored.        * Defines the macros in which the task configuration values will be stored.
-   * **mandatory_field**:+   * **required_field**:
        * Optional.        * Optional.
-       * Defines by means of **BOOL** type values if the configuration field of the form must have a mandatory value or not.+       * Defines by means of **BOOL** type values if the configuration field of the form must have a required value or not.
        * The keys used must exist in the **macro** array of this block.        * The keys used must exist in the **macro** array of this block.
        * By default all fields are required.        * By default all fields are required.
-       * Even though they are mandatory, the **multiselect** and **tree** type fields admit that elements cannot be selected.+       * Even though they are required, the **multiselect** and **tree** type fields admit that elements cannot be selected.
    * **name**:    * **name**:
-       Mandatory.+       Required.
        * Defines the names of the form configuration fields.        * Defines the names of the form configuration fields.
        * The keys used must exist in the **macro** array of this block.        * The keys used must exist in the **macro** array of this block.
行 750: 行 754:
        * The keys used must exist in the **macro** array of this block.        * The keys used must exist in the **macro** array of this block.
    * **type**:    * **type**:
-       Mandatory.+       Required.
        * Defines the types of the form configuration fields.        * Defines the types of the form configuration fields.
        * The keys used must exist in the **macro** array of this block.        * The keys used must exist in the **macro** array of this block.
行 804: 行 808:
        * 必須。        * 必須。
        * タスク設定値が保存されるマクロを定義します。        * タスク設定値が保存されるマクロを定義します。
-   * **mandatory_field**:+   * **required_field**:
        * オプション。        * オプション。
        * フォームの設定フィールドに必須の値が必要かどうかを **BOOL** 型の値を使用して定義します。        * フォームの設定フィールドに必須の値が必要かどうかを **BOOL** 型の値を使用して定義します。
行 914: 行 918:
 name[4] = Max threads name[4] = Max threads
 type[4] = number type[4] = number
-mandatory_field[4] = false+required_field[4] = false
  
 macro[5] = _param5_ macro[5] = _param5_
行 952: 行 956:
 [CUSTOM_FIELDS_N] [CUSTOM_FIELDS_N]
  
-Mandatory+Required
 ; Defines configuration field unique macro ; Defines configuration field unique macro
 ; Macros can be used for script executions, using their value in place ; Macros can be used for script executions, using their value in place
行 959: 行 963:
  
 ; Optional ; Optional
-; Defines if configuration field is mandatory or not +; Defines if configuration field is required or not 
-; By default all configuration fields are mandatory+; By default all configuration fields are required
  
-mandatory_field[N] = BOOL+required_field[N] = BOOL
  
-Mandatory+Required
 ; Defines configuration field name to be displayed in console ; Defines configuration field name to be displayed in console
 ; Macro will be used as name if this field is empty ; Macro will be used as name if this field is empty
行 975: 行 979:
 tip[N] = FIELD_TIP tip[N] = FIELD_TIP
  
-Mandatory+Required
 ; Defines the field type to be displayed in console ; Defines the field type to be displayed in console
 ; Possible values: ; Possible values:
行 1005: 行 1009:
 encrypt_on_true[N] = _FIELD_MACRO_N_ encrypt_on_true[N] = _FIELD_MACRO_N_
  
-Mandatory if type is select or multiselect+Required if type is select or multiselect
 ; Defines select data to be displayed in console ; Defines select data to be displayed in console
 ; Possible values: ; Possible values:
行 1031: 行 1035:
 select_data[N] = FIELD_DATA select_data[N] = FIELD_DATA
  
-Mandatory if type is tree+Required if type is tree
 ; Defines tree data to be displayed in console ; Defines tree data to be displayed in console
 ; tree fields value is a comma separated list of selected values ; tree fields value is a comma separated list of selected values
行 1046: 行 1050:
  
    * **option**:    * **option**:
-       Mandatory.+       Required.
        * Defines the options of a custom selector.        * Defines the options of a custom selector.
        * This parameter is an **array** whose keys are the values of the custom selector options, and its values are the texts displayed for each option in the custom selector.        * This parameter is an **array** whose keys are the values of the custom selector options, and its values are the texts displayed for each option in the custom selector.
行 1079: 行 1083:
 [CUSTOM_SELECT_N] [CUSTOM_SELECT_N]
  
-Mandatory+Required
 ; Defines the value-text pair for the select or multiselect ; Defines the value-text pair for the select or multiselect
 ; Several value-text pairs can be defined ; Several value-text pairs can be defined
行 1110: 行 1114:
  
    * **name**:    * **name**:
-       Mandatory.+       Required.
        * Defines the names of the different elements of this level of the tree.        * Defines the names of the different elements of this level of the tree.
    * **selectable**:    * **selectable**:
行 1223: 行 1227:
 [CUSTOM_TREE_DATA_N] [CUSTOM_TREE_DATA_N]
  
-Mandatory+Required
 ; Defines the name for the tree element ; Defines the name for the tree element
 ; Several names can be defined ; Several names can be defined
行 1246: 行 1250:
 macro[N] = FIELD_MACRO_N macro[N] = FIELD_MACRO_N
  
-Mandatory if selectable is true+Required if selectable is true
 ; Defines the value for the tree element ; Defines the value for the tree element
 ; Several values can be defined ; Several values can be defined
行 1526: 行 1530:
 ;-------------------------------------; ;-------------------------------------;
  
-Mandatory+Required
 ; Defines global application data ; Defines global application data
  
 [discovery_extension_definition] [discovery_extension_definition]
  
-Mandatory+Required
 ; Defines discovery application short name ; Defines discovery application short name
 ; Short name must be unique ; Short name must be unique
行 1538: 行 1542:
 short_name = DISCOVERY_APPLICATION_UNIQUE_NAME short_name = DISCOVERY_APPLICATION_UNIQUE_NAME
  
-Mandatory+Required
 ; Defines the section where application will be shown in console ; Defines the section where application will be shown in console
 ; Possible values: ; Possible values:
行 1547: 行 1551:
 section = app section = app
  
-Mandatory+Required
 ; Defines discovery application name, shown in console ; Defines discovery application name, shown in console
  
 name = DISCOVERY_APPLICATION_NAME name = DISCOVERY_APPLICATION_NAME
  
-Mandatory+Required
 ; Defines discovery application version, shown in console ; Defines discovery application version, shown in console
  
行 1568: 行 1572:
 execution_file[_EXEC_MACRO_N_] = SCRIPT.pl execution_file[_EXEC_MACRO_N_] = SCRIPT.pl
  
-Mandatory+Required
 ; Defines execution for discovery server ; Defines execution for discovery server
 ; Several executions can be defined ; Several executions can be defined
行 1625: 行 1629:
 ; Several steps can be defined using a different key (N) ; Several steps can be defined using a different key (N)
  
-Mandatory+Required
 ; Defines configuration step name ; Defines configuration step name
  
 name[N] = STEP_NAME name[N] = STEP_NAME
  
-Mandatory if not custom_fields defined+Required if not custom_fields defined
 ; Defines configuration fields retrieved to console by a command execution ; Defines configuration fields retrieved to console by a command execution
 ; execution_file scripts can be used to retrieve data ; execution_file scripts can be used to retrieve data
行 1637: 行 1641:
 ; { ; {
 ; "macro": "_FIELD_MACRO_N_", ; "macro": "_FIELD_MACRO_N_",
-; "mandatory_field": "BOOL",+; "required_field": "BOOL",
 ; "name": "FIELD_NAME", ; "name": "FIELD_NAME",
 ; "tip": "FIELD_TIP", ; "tip": "FIELD_TIP",
行 1684: 行 1688:
 script_data_fields[N] = CONSOLE_EXECUTION_FIELDS script_data_fields[N] = CONSOLE_EXECUTION_FIELDS
  
-Mandatory if not script_data_fields defined+Required if not script_data_fields defined
 ; Defines custom configuration fields ; Defines custom configuration fields
  
行 1696: 行 1700:
 ;-------------------------------------; ;-------------------------------------;
  
-Mandatory if not script_data_fields defined+Required if not script_data_fields defined
 ; Defines custom configuration fields to be used by configuration steps ; Defines custom configuration fields to be used by configuration steps
  
 [CUSTOM_FIELDS_N] [CUSTOM_FIELDS_N]
  
-Mandatory+Required
 ; Defines configuration field unique macro ; Defines configuration field unique macro
 ; Macros can be used for script executions, using their value in place ; Macros can be used for script executions, using their value in place
行 1708: 行 1712:
  
 ; Optional ; Optional
-; Defines if configuration field is mandatory or not +; Defines if configuration field is required or not 
-; By default all configuration fields are mandatory+; By default all configuration fields are required
  
-mandatory_field[N] = BOOL+required_field[N] = BOOL
  
-Mandatory+Required
 ; Defines configuration field name to be displayed in console ; Defines configuration field name to be displayed in console
 ; Macro will be used as name if this field is empty ; Macro will be used as name if this field is empty
行 1724: 行 1728:
 tip[N] = FIELD_TIP tip[N] = FIELD_TIP
  
-Mandatory+Required
 ; Defines the field type to be displayed in console ; Defines the field type to be displayed in console
 ; Possible values: ; Possible values:
行 1754: 行 1758:
 encrypt_on_true[N] = _FIELD_MACRO_N_ encrypt_on_true[N] = _FIELD_MACRO_N_
  
-Mandatory if type is select or multiselect+Required if type is select or multiselect
 ; Defines select data to be displayed in console ; Defines select data to be displayed in console
 ; Possible values: ; Possible values:
行 1780: 行 1784:
 select_data[N] = FIELD_DATA select_data[N] = FIELD_DATA
  
-Mandatory if type is tree+Required if type is tree
 ; Defines tree data to be displayed in console ; Defines tree data to be displayed in console
 ; tree fields value is a comma separated list of selected values ; tree fields value is a comma separated list of selected values
行 1788: 行 1792:
 ;-------------------------------------; ;-------------------------------------;
  
-Mandatory if custom tree defined+Required if custom tree defined
 ; Defines custom tree values to be used by configuration fields ; Defines custom tree values to be used by configuration fields
  
 [CUSTOM_TREE_DATA_N] [CUSTOM_TREE_DATA_N]
  
-Mandatory+Required
 ; Defines the name for the tree element ; Defines the name for the tree element
 ; Several names can be defined ; Several names can be defined
行 1816: 行 1820:
 macro[N] = FIELD_MACRO_N macro[N] = FIELD_MACRO_N
  
-Mandatory if selectable is true+Required if selectable is true
 ; Defines the value for the tree element ; Defines the value for the tree element
 ; Several values can be defined ; Several values can be defined
行 1831: 行 1835:
 ;-------------------------------------; ;-------------------------------------;
  
-Mandatory if custom select or multiselect defined+Required if custom select or multiselect defined
 ; Defines custom select or multiselect values to be used by configuration fields ; Defines custom select or multiselect values to be used by configuration fields
  
 [CUSTOM_SELECT_N] [CUSTOM_SELECT_N]
  
-Mandatory+Required
 ; Defines the value-text pair for the select or multiselect ; Defines the value-text pair for the select or multiselect
 ; Several value-text pairs can be defined ; Several value-text pairs can be defined
行 1849: 行 1853:
 [tempfile_confs] [tempfile_confs]
  
-Mandatory+Required
 ; Defines the content for the temporary file ; Defines the content for the temporary file
 ; File will be used where temporary file macro is specified during executions ; File will be used where temporary file macro is specified during executions
行 1938: 行 1942:
 name[4] = Max threads name[4] = Max threads
 type[4] = number type[4] = number
-mandatory_field[4] = false+required_field[4] = false
  
 macro[5] = _param5_ macro[5] = _param5_
  • ja/documentation/pandorafms/technical_reference/12_disco_development.1702450066.txt.gz
  • 最終更新: 2023/12/13 06:47
  • by 127.0.0.1