ja:documentation:pandorafms:technical_reference:02_annex_externalapi

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:technical_reference:02_annex_externalapi [2024/09/09 02:59] – [set metaconsole_synch] junichija:documentation:pandorafms:technical_reference:02_annex_externalapi [2025/11/29 05:47] (現在) – [アクセス元による] junichi
行 111: 行 111:
   * <wrap :en>**Users**</wrap>: For [[en:documentation:pandorafms:management_and_operation:11_managing_and_administration#ks1_1|manage PFMS users]].   * <wrap :en>**Users**</wrap>: For [[en:documentation:pandorafms:management_and_operation:11_managing_and_administration#ks1_1|manage PFMS users]].
   * <wrap :en>**PandoraITSM**</wrap>:  To manage the [[en:documentation:pandorafms:management_and_operation:04_inventory|inventory]] provided by [[en:documentation:10_pandora_itsm:20_pandora_itsm_pandorafms|Pandora ITSM]] to PFMS.   * <wrap :en>**PandoraITSM**</wrap>:  To manage the [[en:documentation:pandorafms:management_and_operation:04_inventory|inventory]] provided by [[en:documentation:10_pandora_itsm:20_pandora_itsm_pandorafms|Pandora ITSM]] to PFMS.
 +  * <wrap :en>**API Endpoints of SIEM (Security Information and Event Management)**</wrap>: To execute [[:en:documentation:pandorafms:cybersecurity:21_siem|actions and configurations in SIEM]].
 +  * <wrap :en>**MONITORING API Endpoints for add data modules**</wrap>: Starting with version 785, new endpoint for [[#ks1_8|adding module data to Pandora FMS]].
  
   * <wrap :ja>**認証(Authentication)**</wrap>: API アクセス トークンを管理します (最初のトークンは常に [[#ks1_3|Web コンソール経由で]] 生成します)。   * <wrap :ja>**認証(Authentication)**</wrap>: API アクセス トークンを管理します (最初のトークンは常に [[#ks1_3|Web コンソール経由で]] 生成します)。
行 119: 行 121:
   * <wrap :ja>**ユーザ(Users)**</wrap>: [[ja:documentation:pandorafms:management_and_operation:11_managing_and_administration#ks1_1|PFMS ユーザを管理します]]。   * <wrap :ja>**ユーザ(Users)**</wrap>: [[ja:documentation:pandorafms:management_and_operation:11_managing_and_administration#ks1_1|PFMS ユーザを管理します]]。
   * <wrap :en>**PandoraITSM**</wrap>: [[en:documentation:10_pandora_itsm:20_pandora_itsm_pandorafms|Pandora ITSM]] によって PFMS に提供される [[ja:documentation:pandorafms:management_and_operation:04_inventory|インベントリ]] を管理します。   * <wrap :en>**PandoraITSM**</wrap>: [[en:documentation:10_pandora_itsm:20_pandora_itsm_pandorafms|Pandora ITSM]] によって PFMS に提供される [[ja:documentation:pandorafms:management_and_operation:04_inventory|インベントリ]] を管理します。
 +  * <wrap :ja>**SIEM (セキュリティ情報イベント管理) の API エンドポイント**</wrap>: [[:ja:documentation:pandorafms:cybersecurity:21_siem|SIEM のアクションと設定]] を実行します。
 +  * <wrap :ja>**データモジュール追加用の監視 API エンドポイント**</wrap>: バージョン 785 以降、[[#ks1_8|Pandora FMS にモジュールデータを追加]] するための新しいエンドポイントが追加されました。
  
 <wrap #ks1_5 /> <wrap #ks1_5 />
行 166: 行 170:
 <WRAP center round info 90%> <WRAP center round info 90%>
  
-Through the [[#ks1_4|web interface]] you can generate and copy the necessary codes, with their parameters and mandatory fields, of all the commands of this PFMS API 2.0. See [[#ks1_6|schemas]] for more details.+Through the [[#ks1_4|web interface]] you can generate and copy the necessary codes, with their parameters and required fields, of all the commands of this PFMS API 2.0. See [[#ks1_6|schemas]] for more details.
  
 </WRAP> </WRAP>
行 197: 行 201:
 <WRAP center round tip 90%> <WRAP center round tip 90%>
  
-In this schema, the mandatory parameters have the property set to ''nullable: false''.+In this schema, the required parameters have the property set to ''nullable: false''.
  
 </WRAP> </WRAP>
行 227: 行 231:
  
 {{  wiki:pfms-api_2-ping.png  }} {{  wiki:pfms-api_2-ping.png  }}
 +
 +<wrap #ks1_8 />
 +
 +==== モジュールデータを追加するための API エンドポイント ====
 +
 +Starting with version 785, and as an alternative to [[:en:documentation:pandorafms:technical_reference:09_tentacle|the Tentacle protocol]], there is an option to send checks through PFMS API 2.0.
 +
 +バージョン 785 以降では、[[:ja:documentation:pandorafms:technical_reference:09_tentacle|Tentacle プロトコル]] の代替として、PFMS API 2.0 を介して監視データを送信するオプションがあります。
 +
 +All documentation may be checked using the [[#ks1_6|Documentation outline]], which describes the general and most important features here:
 +
 +すべてのドキュメントは、[[#ks1_6|ドキュメントの概要]] を使用して確認できます。ここでは、一般的な機能と最も重要な機能について説明します。
 +
 +  * The body consists of an array of agents with their corresponding modules.
 +  * If the agent does not exist, a new one will be created; if it already exists, it will be updated.
 +  * Each position in the array contains the same modules processed by the [[:en:documentation:pandorafms:introduction:02_architecture#data_server|Data Server]], respecting exactly the same fields. **Therefore, any field used in the Data Server may be used here.**
 +  * Data that may be sent in the API:
 +
 +  * 本体は、エージェントとそれに対応するモジュールの配列で構成されます。
 +  * エージェントが存在しない場合は新規に作成され、既に存在する場合は更新されます。
 +  * 配列内の各位置には、[[:ja:documentation:pandorafms:introduction:02_architecture#data_server|データサーバ]] で処理されるモジュールと同じモジュールが含まれ、同じフィールドが保持されます。**したがって、データサーバで使用されるフィールドはすべてここで使用できます。**
 +  * API で送信できるデータ:
 +
 +^  Command  ^  Description  ^
 +|  ''agent_data''  |Agent data, such as name, operating system ID, operating system version, update interval, address, and description.  |
 +|  ''module_data''  |Array of modules with their name, type, and data. You may also specify a dataList to add multiple data values at once.  |
 +|  ''inventory_data''  |Agent inventory data.  |
 +|  ''log_data''  |Agent log data.  |
 +|  ''trap_data''  |SNMP trap data from the agent.  |
 +|  ''events''  |Event in base64.  |
 +|  ''discovery_data''  |Agent discovery data in base64.  |
 +|  ''cmd_data''  |Agent command data.  |
 +
 +^  コマンド  ^  説明  ^
 +|  ''agent_data''  |名前、オペレーティングシステム ID、オペレーティングシステムのバージョン、更新間隔、アドレス、説明などのエージェントデータ。  |
 +|  ''module_data''  |モジュールの名前、タイプ、データを含む配列。dataList を指定して複数のデータ値を一度に追加することもできます。  |
 +|  ''inventory_data''  |エージェントインベントリデータ。  |
 +|  ''log_data''  |エージェントログデータ。  |
 +|  ''trap_data''  |エージェントからの SNMP トラップデータ。  |
 +|  ''events''  |base64 でのイベント。  |
 +|  ''discovery_data''  |base64 でのエージェント自動検出データ。  |
 +|  ''cmd_data''  |エージェントコマンドデータ。  |
  
 <wrap #ks2 /> <wrap #ks2 />
行 310: 行 356:
 === アクセス元による === === アクセス元による ===
  
-At the moment, security is based on an IP addresses list that will have [[:es:documentation:04_using:12_console_setup#general_setup|access to the tool]].+At the moment, security is based on an IP addresses list that will have [[:en:documentation:pandorafms:management_and_operation:12_console_setup#ks1_1|access to the tool]].
  
-現時点では、セキュリティは[[:ja:documentation:04_using:12_console_setup#一般設定|アクセスする IP アドレスリスト]]に基づいています。+現時点では、セキュリティは[[:ja:documentation:pandorafms:management_and_operation:12_console_setup#ks1_1|アクセスする IP アドレスリスト]]に基づいています。
  
 {{  :wiki:screnshot_of_api_acl_list_setup.png  }} {{  :wiki:screnshot_of_api_acl_list_setup.png  }}
行 428: 行 474:
  
   * [[:en:documentation:08_technical_reference:02_annex_externalapi#by_origin|Filtering by IP address]]: Only the listed IP addresses will be able to access the API.   * [[:en:documentation:08_technical_reference:02_annex_externalapi#by_origin|Filtering by IP address]]: Only the listed IP addresses will be able to access the API.
-  * [[:en:documentation:08_technical_reference:02_annex_externalapi#by_api_password|Global password for the API]]: If defined, it is mandatory to use it in all calls.+  * [[:en:documentation:08_technical_reference:02_annex_externalapi#by_api_password|Global password for the API]]: If defined, it is required to use it in all calls.
   * [[:en:documentation:08_technical_reference:02_annex_externalapi#by_user_credentials|User and password]]: User of type [[:en:documentation:01_understanding:03_glossary#superadmin|superadmin]] and valid in the Web Console. Your permissions will be used for each requested operation. **From version NG 768 onwards**  it is also possible to access by [[:en:documentation:08_technical_reference:02_annex_externalapi#authentication_by_bearer_token|bearer token]].   * [[:en:documentation:08_technical_reference:02_annex_externalapi#by_user_credentials|User and password]]: User of type [[:en:documentation:01_understanding:03_glossary#superadmin|superadmin]] and valid in the Web Console. Your permissions will be used for each requested operation. **From version NG 768 onwards**  it is also possible to access by [[:en:documentation:08_technical_reference:02_annex_externalapi#authentication_by_bearer_token|bearer token]].
  
行 755: 行 801:
 == get agent_module_name_last_value_alias == == get agent_module_name_last_value_alias ==
  
->= 7.0NG+<WRAP center round box 90%>
  
-モジュールの最新の値を返します。このモジュールは、パラメータ id で渡されるエージェントの別名と、パラメータ id2 で渡されるモジュール名でフィルタされます。other  パラメータで、アプリケーションが利用するエラーコードおよび、範囲を超えたモジュールの値を追加することができます。+This feature also works in Command Center (Metaconsole).
  
-書式:+</WRAP>
  
-  * op=get (必須) +<WRAP center round box 90%>
-  * op2=agent_module_name_last_value_alias (必須) +
-  * id=<英数字>(必須) エージェント名。 +
-  * id2=<英数字> (必須) モジュール名。 +
-  * other=<返すエラー> (オプション) (通常DBには記録されない)エラー時に返したいもの。 +
-      * エラーコードは次の通りです: +
-        * 'error_message' テキストのエラーメッセージ。 +
-        * 'error_value'<セパレータ><コードまたは値> このコードまたはエラーの値が返ります。ただし、other_mode=url_encode_separator_<セパレータ> のように、 'other_mode' でセパレータを指定する必要があります。+
  
-**例**+この機能はコマンドセンター (メタコンソール) でも動作します。
  
-<code> +</WRAP> 
-http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agent_module_name_last_value_alias&id=miguel-portatil&id2=cpu_user+ 
 +Returns the last value of a module, which is selected by alias of the agent passed by the ''id'' parameter and the module name passed by the ''id2'' parameter. With the ''other'' parameter you can add the error code for an external application to detect this value outside the range of values that can be the module. 
 + 
 +モジュールの最新の値を返します。このモジュールは、パラメータ ''id'' で渡されるエージェントの別名と、パラメータ ''id2'' で渡されるモジュール名でフィルタされます。''other''  パラメータで、アプリケーションが利用するエラーコードおよび、範囲を超えたモジュールの値を追加することができます。 
 + 
 +[[#ks2|Call syntax]]: 
 + 
 +[[#ks2|書式]]: 
 + 
 +  * ''op=get'' (required). 
 +  * ''op2=agent_module_name_last_value_alias'' (required). 
 +  * ''id=''< alphanumeric (required): Contains the agent's alias. 
 +  * ''id2=''< alphanumeric > (required)Contains the module name. 
 +  * ''other_mode=url_encode_separator_''< separator > (optional). 
 +  * ''other=''< error_return > (optional): To return response if there is an error (usually not found the module in the databases): 
 + 
 +  - error_message : Returns error in a text message. 
 +  - error_value< separator >< value_or_code > : Returns that error code or value.  
 + 
 +  * ''op=get'' (必須) 
 +  * ''op2=agent_module_name_last_value_alias'' (必須) 
 +  * ''id=''<英数字>(必須) エージェント名。 
 +  * ''id2=''<英数字> (必須) モジュール名。 
 +  * ''other_mode=url_encode_separator_''< セパレータ > (オプション) 
 +  * ''other=''<返すエラー> (オプション) (通常DBには記録されない)エラー時に返したいもの。 
 + 
 +  - error_message: テキストのエラーメッセージ。 
 +  - error_value<セパレータ><コードまたは値>: このコードまたはエラーの値が返ります。 
 + 
 +**Example (see [[#ks2|syntax of the call]])**: 
 + 
 +**例 ([[#ks2|書式]]を参照)**: 
 + 
 +<code bash> 
 +/include/api.php?op=get&op2=agent_module_name_last_value_alias&id=pandorafms&id2=Memory_Used&apipass=1234&user=admin&pass=pandora
  
 </code> </code>
行 899: 行 972:
 == get locate_agent == == get locate_agent ==
  
-エージェントが存在するサーバ ID を取得し、すべての結果を csv で出力します。+<WRAP center round info 90%>
  
-書式:+This command only works in [[:en:documentation:pandorafms:command_center:01_introduction|Command Center]].
  
-  * op=get (必須) +</WRAP>
-  * op2=locate_agent (必須) +
-  * return_type=<csv(必須) 出力フォーマット +
-  * id=id_agent (必須) +
-  * other_mode=other_mode=url_encode_separator_<separator> (必須)+
  
-**例**+<WRAP center round info 90%>
  
-<code+このコマンドは [[:ja:documentation:pandorafms:command_center:01_introduction|コマンドセンター]] でのみ動作します。 
-http://127.0.0.1/pandora_console/include/api.php?op=get&op2=locate_agent&return_type=csv&apipass=1234&user=admin&pass=pandora&id=Pepito&other_mode=url_encode_separator_%7C+ 
 +</WRAP
 + 
 +Gets the ID of the server where the agent is located, and prints the whole result as a CSV file. You can search by both name and agent ID. 
 + 
 +エージェントが存在するサーバの ID を取得し、結果全体をCSVファイルとして出力します。名前とエージェント ID の両方で検索できます。 
 + 
 +**[[#ks2|Call syntax]]**: 
 + 
 +**[[#ks2|書式]]**: 
 + 
 +  * ''op=get'' (required). 
 +  * ''op2=locate_agent'' (required). 
 +  * ''return_type=csv'' (required) Output format. 
 +  * ''id='' id_agent or agent_name (required) 
 +  * ''other_mode=other_mode=url_encode_separator_''< separator > (required) 
 + 
 +  * ''op=get'' (必須) 
 +  * ''op2=locate_agent'' (必須) 
 +  * ''return_type=csv'' (必須) 出力フォーマット 
 +  * ''id='' エージェント ID もしくはエージェント名(必須) 
 +  * ''other_mode=other_mode=url_encode_separator_'' < separator > (必須) 
 + 
 +**Example (see [[#ks2|call syntax]])**: 
 + 
 +**例 ([[#ks2|書式]]を参照)**: 
 + 
 +<code bash> 
 +/include/api.php?op=get&op2=locate_agent&return_type=csv&apipass=1234&user=admin&pass=pandora&id=MySQLagent&other_mode=url_encode_separator_|
  
 </code> </code>
行 1708: 行 1805:
 == get special_days == == get special_days ==
  
->= 5.1+Returns a list with special daysIt allows to specify a field separator, being these:
  
-特別日一覧を返します。+特別日のリストを返します。次のデータを表示するためのフィールド区切り文字を指定できます:
  
-書式:+  - Numerical ID of the special day. 
 +  - Numerical ID of the calendar to which this special day belongs. 
 +  - Numerical ID of the group to which the special day belongs. 
 +  - Date of the special day in the format ''YYYY-MM-DD''
 +  - Numeric ID of the same day of the week configured for that special day. 
 +  - Description of the special day.
  
-  * op=get (必須) +  - 特別日の数値 ID。 
-  * op2=special_days (必須) +  - この特別日が属するカレンダーの数値 ID。 
-  * other=<csvセパレタ> (オションCSVセパレータ+  - 特別日が属するグループの数値 ID。 
 +  - 特別日の日付 (形式は ''YYYY-MM-DD'')。 
 +  - そ特別日に設定されている同じ曜日の数値 ID。 
 +  - 特別日の説明。
  
-**例**+[[#ks2|Call syntax]]:
  
-<code> +[[#ks2|書式]]: 
-http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=special_days+ 
 +  * ''op=get''  (required). 
 +  * ''op2=special_days'' (required). 
 +  * ''other=''< csv separator > (optional). 
 + 
 +  * ''op=get'' (必須) 
 +  * ''op2=special_days'' (必須) 
 +  * ''other=''<csvセパレータ> (オプション) 
 + 
 +**Example (see [[#ks2|call syntax]]):** 
 + 
 +**例 ([[#ks2|書式]]を参照):** 
 + 
 +<code bash> 
 +/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=special_days
  
 </code> </code>
行 3155: 行 3274:
   * ''op=set'' (required).   * ''op=set'' (required).
   * ''op2=create_plugin_module'' (required).   * ''op2=create_plugin_module'' (required).
-  * ''id=''< agent_name > (required). It should be an agent name.+  * ''id=''< agent_name > (required) it should be an agent name.
   * ''other=''< serialized parameters > (required). They are module configuration and data, serialized in the following order:   * ''other=''< serialized parameters > (required). They are module configuration and data, serialized in the following order:
  
行 3246: 行 3365:
  
 例 ([[#pandora_fms_外部_api|書式を参照]]): 例 ([[#pandora_fms_外部_api|書式を参照]]):
 +
 +  * Example without macro:
 +
 +  * マクロ無しの例:
 +
 +<code bash>
 +…/include/api.php?op=set&op2=create_plugin_module&id=pandora.internals&other=module_plugin_test_|0|1|2|0|0||0|0||0|0|127.0.0.1|0||0|300|0|0|0|0|plugin%20module%20from%20api|4|2|admin|pass|-p%20max||||||||||||2001&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
 +
 +</code>
 +
 +  * Example with macro:
 +
 +  * マクロありの例
 +
 +To use the **DNS plugin** that is installed by default in PFMS (**Management → Servers → Plugins** menu ) and whose identifier is ''2'', the **dig** tool (included in **dnsutils**) must be installed in the PFMS server and **//connected to the internet//**.
 +
 +PFMS にデフォルトでインストールされ (**管理(Management) → サーバ(Servers) → プラグイン(Plugins)** メニュー)、識別子が ''2'' である **DNS プラグイン** を使用するには、**dig** ツール (**dnsutils** に含まれています) を PFMS サーバにインストールし、**//インターネットに接続//** する必要があります。
 +
 +It can be tested by executing in a command terminal on the PFMS server the following statement (it should return ''1'' for a successful result, ''0'' if domain/address is not matched and ''-1'' for any error that prevents it from working):
 +
 +これは、PFMS サーバのコマンドターミナルで次のステートメントを実行することによってテストできます (成功した場合は ''1''、ドメイン/アドレスが一致しない場合は ''0''、動作を妨げるエラーの場合は ''-1'' が返されます)。
  
 <code bash> <code bash>
-/include/api.php?op=set&op2=create_plugin_module&id=example&other=prueba|0|1|2|0|0||0|0||0|0|127.0.0.1|0||0|300|0|0|0|0|plugin%20module%20from%20api|4|2|admin|pass|-p%20max&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora+/usr/share/pandora_server/util/plugin/dns_plugin.sh -d pandorafms.com -i 172.66.40.150 -s 8.8.8.8
  
 </code> </code>
行 3256: 行 3396:
 JSON ドキュメントの内容は、次のプロパティを持つ複数のオブジェクトで構成されるオ ブジェクトである必要があります。 JSON ドキュメントの内容は、次のプロパティを持つ複数のオブジェクトで構成されるオ ブジェクトである必要があります。
  
-  * ''macro'': Macro nameIt should be //_field1_//, //_field2_//, …, //_fieldN_//+  * ''macro'': Name of the macroMust be //_field1_//, //_field2_//, …, //_fieldN_//
-  * ''desc'': Descriptive macro name. +  * ''desc'': Descriptive name of the macro
-  * ''help'': Macro description.+  * ''help'': Macro detailed description.
   * ''value'': Macro value.   * ''value'': Macro value.
-  * ''hide'': Set to ''1''  to hide the macro value (useful for storing passwords).+  * ''hide'': Set to ''1'' to hide the macro value (useful for storing passwords).
  
   * ''macro'': マクロ名。//_field1_//, //_field2_//, …, //_fieldN_// である必要があります。   * ''macro'': マクロ名。//_field1_//, //_field2_//, …, //_fieldN_// である必要があります。
行 3268: 行 3408:
   * ''hide'': マクロ値を非表示にするには、''1'' に設定します (パスワードの保存に役立ちます)。   * ''hide'': マクロ値を非表示にするには、''1'' に設定します (パスワードの保存に役立ちます)。
  
-Example:+For this example it will be verified that the domain ''pandorafms.com'' uses at least one IP address ''172.66.40.150'':
  
-+このでは、ドメイン ''pandorafms.com'' が少なくとも 1 つの IP アドレス ''172.66.40.150'' を使用していることが検証されます。
- +
-<file>+
  
 +<file | plugin_fields.json>
 { {
- "1":+    "1":
-   "macro": "_field1_", +        "macro": "_field1_", 
-   "desc": "Target IP", +        "desc": "Target IP", 
-   "help": "", +        "help": "", 
-   "value": "192.168.0.1", +        "value": "172.66.40.150" 
-   "hide": "" +    }
- }, +    "2": 
- "2": { +        "macro": "_field2_", 
-   "macro": "_field2_", +        "desc": "Domain to check", 
-   "desc": "Port", +        "help": "For example pandorafms.com", 
-   "help": "", +        "value": "pandorafms.com
-   "value": "80", +    }, 
-   "hide": "" +    "3": { 
- }+        "macro": "_field3_", 
 +        "desc": "DNS Server to check", 
 +        "help": "For example 8.8.8.8", 
 +        "value": "8.8.8.8" 
 +    }
 +    "4": { 
 +        "macro": "_field4_", 
 +        "desc": "Optional parameters", 
 +        "help": "", 
 +        "value": "" 
 +    }
 } }
- 
 </file> </file>
 +
 +The previous file must be converted to base 64 with:
 +
 +前のファイルは次のようにして Base 64 に変換する必要があります。
 +
 +<code bash>
 +PLUGIN_FIELDS=$(base64 plugin_fields.json -w 0)
 +
 +</code>
 +
 +And the previous variable should be used in a complete URL to add a module in the default agent, ''pandora.internals'', in the module group ''Networking'' and with critical inverse to ''0'':
 +
 +また、前の変数は、完全な URL で使用して、デフォルトエージェントのモジュール ''pandora.internals'' をモジュールグループ ''Networking'' に追加し、障害値を ''0'' に反転する必要があります。
 +
 +<code bash>
 +curl '…/include/api.php?op=set&op2=create_plugin_module&id=pandora.internals&other=dns_module||2|2||||1|||||pandorafms.com|0||0|300|0|0|0|0|dns_plugin|2|||||'$PLUGIN_FIELDS'|W10=|||||1|||||&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora'
 +
 +</code>
  
 == set create_data_module == == set create_data_module ==
行 3785: 行 3951:
   - < min >   - < min >
   - < max >   - < max >
-  - < post_process > ( {{:wiki:icono-modulo-enterprise.png?23x23|Enterprise version}}only for [[:en:documentation:pandorafms:installation:05_configuration_agents#module_postprocess|Software Agents]] with remote configuration enabled).+  - < post_process > ( Only for [[:en:documentation:pandorafms:installation:05_configuration_agents#module_postprocess|EndPoints]] with remote configuration enabled).
   - < [[:en:documentation:pandorafms:installation:05_configuration_agents#module_interval|module_interval]] >   - < [[:en:documentation:pandorafms:installation:05_configuration_agents#module_interval|module_interval]] >
   - < min_warning >   - < min_warning >
行 3818: 行 3984:
   - < 最小 >   - < 最小 >
   - < 最大 >   - < 最大 >
-  - < 保存倍率 > ( {{:wiki:icono-modulo-enterprise.png?23x23|Enterprise 版}}([[:ja:documentation:pandorafms:installation:05_configuration_agents#module_postprocess|ソフトウエアージェント]] でリモート設定が有効な場合のみ)+  - < 保存倍率 > ([[:ja:documentation:pandorafms:installation:05_configuration_agents#module_postprocess|エンドポイント]] でリモート設定が有効な場合のみ)
   - < [[:ja:documentation:pandorafms:installation:05_configuration_agents#module_interval|モジュールの間隔]] >   - < [[:ja:documentation:pandorafms:installation:05_configuration_agents#module_interval|モジュールの間隔]] >
   - < 警告の最小値 >   - < 警告の最小値 >
行 4404: 行 4570:
  
   * op=set (required)   * op=set (required)
-  * op2=add_agent_policy_by_id (mandatory)+  * op2=add_agent_policy_by_id (required)
   * id=<id_policy> (required). It must be a policy Id.   * id=<id_policy> (required). It must be a policy Id.
   * other=<serialized parameters> (required). These are agent configuration and data, serialized in the following order:   * other=<serialized parameters> (required). These are agent configuration and data, serialized in the following order:
行 5986: 行 6152:
 </WRAP> </WRAP>
  
-[[:en:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_external_api|Call syntaxis]]:+[[#ks2|Call syntax]]:
  
-[[:ja:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_外部_api|書式]]:+[[#ks2|書式]]:
  
   * ''op=set''  (required).   * ''op=set''  (required).
行 6031: 行 6197:
       * < custom_data> **Custom data should be a base64 encoded JSON document**.       * < custom_data> **Custom data should be a base64 encoded JSON document**.
       * < server_id > (//only for Command Center (Metaconsole)//) The id of the child node.       * < server_id > (//only for Command Center (Metaconsole)//) The id of the child node.
-      * <id_extra> (alphanumeric type).+      * <id_extra> (alphanumeric type, see , véase [[en:documentation:pandorafms:management_and_operation:12_console_setup#ks1_1|Keep in process status for new events with extra ID]]).
  
   * ''op=set'' (必須)   * ''op=set'' (必須)
行 6074: 行 6240:
       * < カスタムデータ > **base64 でエンコードした JSON 形式でなければいけません**       * < カスタムデータ > **base64 でエンコードした JSON 形式でなければいけません**
       * < サーバ ID > (//コマンドセンター(メタコンソール)のみ//) 子ノードの ID です。       * < サーバ ID > (//コマンドセンター(メタコンソール)のみ//) 子ノードの ID です。
-      * <extra ID> (英数字)+      * <extra ID> (英数字、[[ja:documentation:pandorafms:management_and_operation:12_console_setup#一般設定|追加IDを持つ新しいイベントの処理ステータスを維持]] を参照。)
  
-**Example (** **[[:en:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_external_api|see call syntaxis]]****): **+**Example (** **[[#ks2|see call syntax]]****): **
  
-**例** ([[:ja:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_外部_api|書式]]を参照):+**例** ([[#ks2|書式]]を参照):
  
 The event to be created has the following custom JSON data: The event to be created has the following custom JSON data:
行 6658: 行 6824:
  
 http://localhost/pandora_console/include/api.php?op=set&op2=planned_downtimes_created&apipass=1234&user=admin&pass=pandora&id=testing&other=testing|11/05/2018|11/16/2018|0|1|1|1|1|1|1|1|12:06:00|19:06:00|1|31|quiet|periodically|weekly|admin&other_mode=url_encode_separator_| http://localhost/pandora_console/include/api.php?op=set&op2=planned_downtimes_created&apipass=1234&user=admin&pass=pandora&id=testing&other=testing|11/05/2018|11/16/2018|0|1|1|1|1|1|1|1|12:06:00|19:06:00|1|31|quiet|periodically|weekly|admin&other_mode=url_encode_separator_|
 +
 +</code>
 +
 +== set planned_downtimes_edit ==
 +
 +>= 754
 +
 +Edit a planned stop.
 +
 +計画停止を編集します。
 +
 +  * ''op=set''  .
 +  * ''op2=planned_downtimes_edit''  .
 +  * ''id=''  planned shutdown identifier.
 +  * ''other=''  all parameters are optional:
 +      * <name>
 +      * <description>
 +      * <date from>
 +      * <date to>
 +      * <time from>
 +      * <time to>
 +      * <id group>
 +      * <monday>
 +      * <tuesday>
 +      * <wednesday>
 +      * <thursday>
 +      * <friday>
 +      * <saturday>
 +      * <sunday>
 +      * <periodically_day_from>
 +      * <periodically_day_to>
 +      * <stop type>
 +      * <ejecution type>
 +      * <periodicity type>
 +
 +  * ''op=set'' 
 +  * ''op2=planned_downtimes_edit'' 
 +  * ''id=''  計画停止ID
 +  * ''other=''  全てのパラメータはオプションです。
 +      * <名前>
 +      * <説明>
 +      * <開始日>
 +      * <終了日>
 +      * <開始時刻>
 +      * <終了時刻>
 +      * <グループID>
 +      * <月>
 +      * <火>
 +      * <水>
 +      * <木>
 +      * <金>
 +      * <土>
 +      * <日>
 +      * <定期実行開始日>
 +      * <定期実行終了日>
 +      * <計画停止タイプ>
 +      * <実行タイプ>
 +      * <定期実行タイプ>
 +
 +<WRAP center round important 90%>
 +
 +The date format must be YYYYY/MM/DD (year/month/day) for this call to work properly.
 +
 +</WRAP>
 +
 +<WRAP center round important 90%>
 +
 +この呼び出しが正しく機能するには、日付形式が YYYY/MM/DD (年/月/日) である必要があります。
 +
 +</WRAP>
 +
 +**Example:**
 +
 +**例:**
 +
 +<code>
 +http://localhost/pandora_console/include/api.php?op=set&op2=planned_downtimes_edit&apipass=1234&user=admin&pass=pandora&id=2&other=testing2|test2| 2022/05/10|2022/06/12|19:03:03|19:55:00|0|0|0|0|0|0|0|0|1|31|quiet|once|weekly&other_mode=url_encode_separator_|
 +
 +</code>
 +
 +== set planned_downtimes_add_agents ==
 +
 +>= 754
 +
 +Add Agents to the planned stop.
 +
 +計画停止にエージェントを追加します。
 +
 +  * ''op=set''  .
 +  * ''op2=planned_downtimes_agents''  .
 +  * ''id=''planned stop identifier.
 +  * ''other=''identifier of each Agent separated by semicolons:
 +      * <id_agent**1**;id_agent**2**;id_agent**3**;….id_agent**n**;>
 +
 +  * ''op=set'' 
 +  * ''op2=planned_downtimes_agents''  
 +  * ''id='' 計画停止ID
 +  * ''other='' セミコロンで区切ったエージェントID:
 +      * <id_agent**1**;id_agent**2**;id_agent**3**;….id_agent**n**;>
 +
 +**Example:**
 +
 +**例:**
 +
 +<code>
 +http://127.0.0.1/pandora_console/include/api.php?op=set&op2=planned_downtimes_add_agents&apipass=1234&user=admin&pass=pandora&id=4&other=1;2;3&other_mode=url_encode_separator_|
 +
 +</code>
 +
 +== set planned_downtimes_delete_agents ==
 +
 +>= 754
 +
 +Removes Agents (and the Modules of those agents) from the planned shutdown.
 +
 +計画停止からエージェント (およびそれらのエージェントのモジュール) を削除します。
 +
 +  * ''op=set''  .
 +  * ''op2=planned_downtimes_delete_agents''  .
 +  * ''id=''planned stop identifier.
 +  * ''other=''identifier of each Agent separated by semicolons:
 +      * <id_agent**1**;id_agent**2**;id_agent**3**;….id_agent**n**;>
 +
 +  * ''op=set'' 
 +  * ''op2=planned_downtimes_delete_agents'' 
 +  * ''id='' 計画停止ID
 +  * ''other='' セミコロンで区切ったエージェントID:
 +      * <id_agent**1**;id_agent**2**;id_agent**3**;….id_agent**n**;>
 +
 +**Example:**
 +
 +**例:**
 +
 +<code>
 +
 +http://127.0.0.1/pandora_console/include/api.php?op=set&op2=planned_downtimes_delete_agents&apipass=1234&user=admin&pass=pandora&id=4&other=1;2;3&other_mode=url_encode_separator_|
  
 </code> </code>
行 7560: 行 7862:
  
 書式: 書式:
 +
 +  * op=set (required)
 +  * op2=disabled_and_standby (required)
 +  * id=<agent id> (required). In the Command Center (Metaconsole), it is the id of the agent, that is to say, the id of the node.
 +  * id2=<id del nodo> (required in the Command Center (Metaconsole), not needed in the node)
 +  * other=<valor> (optional) Value (0 to enable and 1 to disable) of the new status. If no value is specified, it disables the agent.
  
   * op=set (必須)   * op=set (必須)
   * op2=disabled_and_standby (必須)   * op2=disabled_and_standby (必須)
-  * id=<エージェント ID> (必須) メタコンソールでは tagente の ID で、つまりノー ド ID です。 +  * id=<エージェント ID> (必須) コマンドセンター(メタコンソール)ではエージェントの ID で、つまりノー ド ID です。 
-  * id2=<ノード ID> (メタコンソールでは必須、ノードでは不要)+  * id2=<ノード ID> (コマンドセンター(メタコンソール)では必須、ノードでは不要)
   * other=<値> (オプション) 新たな状態(0 で有効化、1 で無効化)です。値を指定しない場合は、エージェントは無効化されます。   * other=<値> (オプション) 新たな状態(0 で有効化、1 で無効化)です。値を指定しない場合は、エージェントは無効化されます。
  
行 8067: 行 8375:
  
 { {
-name: <value>, // mandatory +name: <value>, // required 
-id_module: <value>, // mandatory +id_module: <value>, // required 
-id_tipo_modulo: <value>, // mandatory+id_tipo_modulo: <value>, // required
 configuration_data: <value>, configuration_data: <value>,
 description: <value>, description: <value>,
行 8197: 行 8505:
  
 { {
-name: <value>, // mandatory +name: <value>, // required 
-id_module: <value>, // mandatory +id_module: <value>, // required 
-id_tipo_modulo: <value>, // mandatory+id_tipo_modulo: <value>, // required
 configuration_data: <value>, configuration_data: <value>,
 description: <value>, description: <value>,
行 8318: 行 8626:
   * ''id='' < id_event >  (required, numerical value).   * ''id='' < id_event >  (required, numerical value).
   * ''id2='' < id_custom_event >  (required, alphanumeric value).   * ''id2='' < id_custom_event >  (required, alphanumeric value).
 +  * ''other=''< id_node > If running in **Command Center** (Metaconsole), the node identifier. Default value ''0'' (Command Center).
  
   * ''op=get''  (必須)   * ''op=get''  (必須)
行 8323: 行 8632:
   * ''id='' < id_event >  (必須、数値)   * ''id='' < id_event >  (必須、数値)
   * ''id2='' < id_custom_event >  (必須、文字列)   * ''id2='' < id_custom_event >  (必須、文字列)
 +  * ''other=''< id_node > **コマンドセンター** (メタコンソール) で実行している場合は、ノード識別子。デフォルト値は ''0'' (コマンドセンター) です。
  
 **Example (see [[#pandora_fms_external_api|call syntax]])**: **Example (see [[#pandora_fms_external_api|call syntax]])**:
行 8332: 行 8642:
 </code> </code>
  
 +Example for a node in **Command Center**:
 +
 +**コマンドセンター** のノードの例:
 +
 +<code bash>
 +…/include/api.php?op=set&op2=event_custom_id&id=3831949&id2=Test123&other=1&apipass=1234&user=admin&pass=pandora
 +</code>
  
 ==== 例 ==== ==== 例 ====
  • ja/documentation/pandorafms/technical_reference/02_annex_externalapi.1725850775.txt.gz
  • 最終更新: 2024/09/09 02:59
  • by junichi