両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
ja:documentation:pandorafms:technical_reference:02_annex_externalapi [2024/09/09 02:56] – [set update_event] junichi | ja:documentation:pandorafms:technical_reference:02_annex_externalapi [2024/11/09 23:22] (現在) – [get special_days] junichi |
---|
== 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> |
== get special_days == | == get special_days == |
| |
>= 5.1 | Returns a list with special days. It 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> |
</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). |
* < 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'' (必須) |
* < カスタムデータ > **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: |
| |
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> |
>= 7 | >= 7 |
| |
ライセンスキーをメタコンソールへ追加し、ノードへ同期します。 | It adds license key to the Command Center (Metaconsole) and performs the synchronization with nodes. |
| |
| ライセンスキーをコマンドセンター(メタコンソール)へ追加し、ノードへ同期します。 |
| |
* op=set | * op=set |
| |
書式: | 書式: |
| |
| * 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 で無効化)です。値を指定しない場合は、エージェントは無効化されます。 |
| |
* ''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'' (必須) |
* ''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]])**: |
</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> |
| |
==== 例 ==== | ==== 例 ==== |