ja:documentation:pandorafms:technical_reference:02_annex_externalapi

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:technical_reference:02_annex_externalapi [2024/04/16 08:10] – [set update_plugin_module] junichija:documentation:pandorafms:technical_reference:02_annex_externalapi [2024/04/16 08:32] (現在) – [set update_SNMP_module] junichi
行 3556: 行 3556:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
 +
 これによりデータベースにモジュールデータを追加することはできますが、該当モジュールに関するエージェントの設定ファイルを変更することはできません。 これによりデータベースにモジュールデータを追加することはできますが、該当モジュールに関するエージェントの設定ファイルを変更することはできません。
 +
 </WRAP> </WRAP>
 +
 +It updates the local module.
  
 ローカルモジュールを更新します。 ローカルモジュールを更新します。
  
-[[:en:documentation:08_technical_reference:02_annex_externalapi#external_api|Call syntax]]:+[[#external_api|Call syntax]]:
  
-[[:ja:documentation:08_technical_reference:02_annex_externalapi#外部_api|書式]]:+[[#pandora_fms_外部_api|書式]]:
  
   * ''op=set''  (required).   * ''op=set''  (required).
行 3569: 行 3573:
   * ''id=''< id_module_agent > (required) module's numeric ID to update.   * ''id=''< id_module_agent > (required) module's numeric ID to update.
   * ''other=''< serialized parameters > (required) module data and module configuration in serialized order:   * ''other=''< serialized parameters > (required) module data and module configuration in serialized order:
-      * < id_agent > +  - < id_agent > 
-      < disabled > use ''1''  for disable, ''0'' //for no changes//+  < disabled > use ''1''  for disable, ''0'' //for no changes//
-      < description > +  < description > 
-      < id_module_group > see [[:en:documentation:08_technical_reference:02_annex_externalapi#get_module_groups|get_module_groups]]. +  < id_module_group > see [[#get_module_groups|get_module_groups]]. 
-      < min > +  < min > 
-      < max > +  < max > 
-      < post_process > ( {{:wiki:icono-modulo-enterprise.png?23x23|Enterprise version}}only for [[:en:documentation:02_installation:05_configuration_agents#module_postprocess|Software Agents]] with remote configuration enabled). +  < 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). 
-      < [[:en:documentation:02_installation:05_configuration_agents#module_interval|module_interval]] > +  < [[:en:documentation:pandorafms:installation:05_configuration_agents#module_interval|module_interval]] > 
-      < min_warning > +  < min_warning > 
-      < max_warning > +  < max_warning > 
-      < str_warning > +  < str_warning > 
-      < min_critical > +  < min_critical > 
-      < max_critical > +  < max_critical > 
-      < str_critical > +  < str_critical > 
-      < [[:en:documentation:05_big_environments:09_pandorafms_engineering#database_main_tables|history_data]] > If it is set at ''0'', module data will not be saved at ''tagente_datos'', only ''tagent_estado''  will be updated. +  < [[:en:documentation:pandorafms:complex_environments_and_optimization:09_pandorafms_engineering#database_main_tables|history_data]] > If it is set at ''0'', module data will not be saved at ''tagente_datos'', only ''tagent_estado''  will be updated. 
-      < disabled_types_event > JSON forma, example: ''{"going_unknown":1}'' +  < disabled_types_event > JSON forma, example: ''{"going_unknown":1}'' 
-      < module_macros > It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be //"<macro name>": "<macro value>"//+  < module_macros > It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be //"<macro name>": "<macro value>"//
-      < min_ff_event > Number of times a change of state condition has to occur before the change of state can take place (//[[:en:documentation:01_understanding:03_glossary#flip-flop_protection|flipflop]]// ). +  < min_ff_event > Number of times a change of state condition has to occur before the change of state can take place (//[[:en:documentation:pandorafms:introduction:03_glossary#flip-flop_protection|flipflop]]// ). 
-      < each_ff > +  < each_ff > 
-      < min_ff_event_normal > +  < min_ff_event_normal > 
-      < min_ff_event_warning > +  < min_ff_event_warning > 
-      < min_ff_event_critical > +  < min_ff_event_critical > 
-      < ff_timeout > +  < ff_timeout > 
-      < critical_inverse > +  < critical_inverse > 
-      < warning_inverse > +  < warning_inverse > 
-      < policy_linked > +  < policy_linked > 
-      < ff_type >+  < ff_type > 
 +  - < ignore_unknown > Accepts values ''0''  and ''1''.
  
   * ''op=set'' (必須)   * ''op=set'' (必須)
行 3601: 行 3606:
   * ''id=''<モジュールID> (必須) 更新するモジュールの数値 ID。   * ''id=''<モジュールID> (必須) 更新するモジュールの数値 ID。
   * ''other=''<連続パラメータ> (必須) 次の順番でモジュールの設定とデータを指定します。   * ''other=''<連続パラメータ> (必須) 次の順番でモジュールの設定とデータを指定します。
-      * < エージェントID > +  - < エージェントID > 
-      < 無効化 > 無効化の場合は ''1''、//変更なし// は ''0''。 +  < 無効化 > 無効化の場合は ''1''、//変更なし// は ''0''。 
-      < 説明 > +  < 説明 > 
-      < モジュールグループID > [[:ja:documentation:08_technical_reference:02_annex_externalapi#get_module_groups|get_module_groups]] を参照。 +  < モジュールグループID > [[#get_module_groups|get_module_groups]] を参照。 
-      < 最小 > +  < 最小 > 
-      < 最大 > +  < 最大 > 
-      < 保存倍率 > ( {{:wiki:icono-modulo-enterprise.png?23x23|Enterprise 版}}([[:ja:documentation:02_installation:05_configuration_agents#module_postprocess|ソフトウエアエージェント]] でリモート設定が有効な場合のみ) +  < 保存倍率 > ( {{:wiki:icono-modulo-enterprise.png?23x23|Enterprise 版}}([[:ja:documentation:pandorafms:installation:05_configuration_agents#module_postprocess|ソフトウエアエージェント]] でリモート設定が有効な場合のみ) 
-      < [[:ja:documentation:02_installation:05_configuration_agents#module_interval|モジュールの間隔]] > +  < [[:ja:documentation:pandorafms:installation:05_configuration_agents#module_interval|モジュールの間隔]] > 
-      < 警告の最小値 > +  < 警告の最小値 > 
-      < 警告の最大値 > +  < 警告の最大値 > 
-      < 警告文字列 > +  < 警告文字列 > 
-      < 障害の最小値 > +  < 障害の最小値 > 
-      < 障害の最大値 > +  < 障害の最大値 > 
-      < 障害文字列 > +  < 障害文字列 > 
-      < [[:ja:documentation:05_big_environments:09_pandorafms_engineering#database_main_tables|データの保存]] > ''0'' に設定するとモジュールのデータは、''tagente_datos'' に保存されません。''tagent_estado'' のみ更新されます。 +  < [[:ja:documentation:pandorafms:complex_environments_and_optimization:09_pandorafms_engineering#database_main_tables|データの保存]] > ''0'' に設定するとモジュールのデータは、''tagente_datos'' に保存されません。''tagent_estado'' のみ更新されます。 
-      < 無効化イベント > JSON フォーマット。例: ''{"going_unknown":1}'' +  < 無効化イベント > JSON フォーマット。例: ''{"going_unknown":1}'' 
-      < モジュールマクロ > これは、マクロごとに 1 つのプロパティを持つオブジェクトで構成された、base64 でエンコードされた JSON ドキュメントである必要があります。JSON プロパティのフォーマット: //"<macro name>": "<macro value>"// +  < モジュールマクロ > これは、マクロごとに 1 つのプロパティを持つオブジェクトで構成された、base64 でエンコードされた JSON ドキュメントである必要があります。JSON プロパティのフォーマット: //"<macro name>": "<macro value>"// 
-      < 連続抑制回数 > モジュールの監視結果が何回連続で変化したらモジュールの状態を変更するかの値。(//[[:ja:documentation:01_understanding:03_glossary#連続抑制回数|連続抑制回数]]//+  < 連続抑制回数 > モジュールの監視結果が何回連続で変化したらモジュールの状態を変更するかの値。(//[[:ja:documentation:pandorafms:introduction:03_glossary#連続抑制回数|連続抑制回数]]//
-      < 個別状態変化の利用 > +  < 個別状態変化の利用 > 
-      < 正常移行時連続抑制回数 > +  < 正常移行時連続抑制回数 > 
-      < 警告移行時連続抑制回数 > +  < 警告移行時連続抑制回数 > 
-      < 障害移行時連続抑制回数 > +  < 障害移行時連続抑制回数 > 
-      < 連続抑制タイムアウト > +  < 連続抑制タイムアウト > 
-      < 障害条件の反転 > +  < 障害条件の反転 > 
-      < 警告条件の反転 > +  < 警告条件の反転 > 
-      < 関連ポリシー > +  < 関連ポリシー > 
-      < 連続抑制カウンタの維持 >+  < 連続抑制カウンタの維持 > 
 +  - < 不明の無視 > ''0'' または ''1''
  
-**Example (see **  **[[:en:documentation:08_technical_reference:02_annex_externalapi#external_api|call syntax]]****):**+**Example (see **  **[[#external_api|call syntax]]****):**
  
-**例 ([[:ja:documentation:08_technical_reference:02_annex_externalapi#外部_api|書式]]を参照):**+**例 ([[#pandora_fms_外部_api|書式]]を参照):**
  
 <code bash> <code bash>
行 3640: 行 3646:
  
 === set update_data_module_policy === === set update_data_module_policy ===
 +
 +It updates a data module in a policy and returns an id from the new module.
  
 ポリシーのデータモジュールを更新し、新たなモジュールの ID を返します。 ポリシーのデータモジュールを更新し、新たなモジュールの ID を返します。
  
-書式: +**[[#pandora_fms_external_api|Call syntax]]**: 
-  * ''op=set''  (required). + 
-  * ''op2=update_data_module_policy''  (required). +**[[#pandora_fms_外部_api|書式]]**: 
-  * ''id=''<id_policy> (required). Numeric identificator of the **target policy**. + 
-  * ''other=''<serialized parameters> (required). They are module configuration and data, serialized in the following order: +  * ''op=set'' (required). 
-      * <id_policy_module+  * ''op2=update_data_module_policy'' (required). 
-      * <description> +  * ''id=''< id_policy > (required). Numeric identification of the **target policy**. 
-      <id_module_group> +  * ''other=''< serialized parameters > (required). They are module configuration and data, serialized in the following order: 
-      <min> + 
-      <max> +  ''op=set'' (必須) 
-      <post_process> +  * ''op2=update_data_module_policy'' (必須) 
-      <module_interval> +  * ''id=''<id_policy(必須) 対象のポリシーモジュールID。 
-      <min_warning> +  ''other=''<連続パラメータ> (必須) 次の順番でモジュールの設定とデータを指定します。: 
-      <max_warning> + 
-      <min_critical> +  - < id_policy_module > 
-      <max_critical> +  - < description > 
-      <str_critical> +  < id_module_group > 
-      <history_data> +  < min > 
-      <configuration_data> +  < max > 
-      <disabled_types_event> +  < post_process > 
-      <module_macros> It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be: +  < module_interval > 
-        * ''< macro name >:< macro value >''.+  < min_warning > 
 +  < max_warning > 
 +  < min_critical > 
 +  < max_critical > 
 +  < str_critical > 
 +  < history_data > 
 +  < configuration_data > 
 +  < disabled_types_event > 
 +  < module_macros > It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be: ''<  macro name  >:<  macro value  >''. 
 +  - < ignore_unknown > Accepts values ''0'' and ''1''
 + 
 +  - <ポリシーモジュールID> 
 +  - <説明> 
 +  - <モジュールグループID> 
 +  - <最小> 
 +  - <最大> 
 +  - <事前処理> 
 +  - <モジュールの間隔> 
 +  - <警告の最小値> 
 +  - <警告の最大値> 
 +  - <障害の最小値> 
 +  - <障害の最大値> 
 +  - <障害の文字列> 
 +  - <データの保存> 
 +  - <設定データ> 
 +  - <disabled_types_event> 
 +  - <モジュールマクロ> (バージョン 5以降) 各マクロに対して 1つのプロパティを持つオブジェクトによって形成された、base64 でエンコードされた JSON ドキュメントである必要があります。JSON フォーマットは、''<マクロ名>:<マクロ値>'' のようになっている必要があります。 
 +  - <不明の無視> ''0'' または ''1''
  
-  op=set (必須) +**Example (see [[#pandora_fms_external_api|call syntax]]):**
-  op2=update_data_module_policy (必須) +
-  * id=<id_policy> (必須) 対象のポリシーモジュールID。 +
-  * other=<連続パラメータ> (必須) 次の順番でモジュールの設定とデータを指定します。: +
-      <ポリシーモジュールID> +
-      <説明> +
-      * <モジュールグループID> +
-      * <最小> +
-      * <最大> +
-      * <事前処理> +
-      * <モジュールの間隔> +
-      * <警告の最小値> +
-      * <警告の最大値> +
-      * <障害の最小値> +
-      * <障害の最大値> +
-      * <障害の文字列> +
-      * <データの保存> +
-      * <設定データ> +
-      * <disabled_types_event> +
-      * <モジュールマクロ> (バージョン 5以降) 各マクロに対して 1つのプロパティを持つオブジェクトによって形成された、base64 でエンコードされた JSON ドキュメントである必要があります。JSON フォーマットは、次のようになっている必要があります。 +
-        * ''<マクロ名>:<マクロ値>''+
  
-**例** ([[:ja:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_外部_api|呼び出し書式]]を参照):+**例 ([[#pandora_fms_外部_api|書式]]を参照):**
  
 <code bash> <code bash>
行 3695: 行 3710:
  
 </code> </code>
- 
  
 === set update_SNMP_module === === set update_SNMP_module ===
 +
 +It updates an SNMP module.
  
 SNMP モジュールを更新します。 SNMP モジュールを更新します。
  
-書式: +[[#pandora_fms_external_api|Call syntax]]: 
-  * op=set (必須) + 
-  * op2=update_snmp_module (必須) +[[#pandora_fms_外部_api|書式]]: 
-  * id=<モジュールID> (必須) モジュールIDでなければいけません。 + 
-  * other=<連続パラメータ> (必須) 次の順番でモジュールの設定とデータを指定します。 +  * ''op=set'' (required). 
-  <エージェントID> +  * ''op2=update_snmp_module'' (required). 
-  <無効化> +  * ''id=''< module_id > (required). It should be a module id. 
-  <モジュールグループID> +  * ''other=''< serialized parameters > (required). They are module configuration and data, serialized in the following order: 
-  <警告の最小値> + 
-  <警告の最大値> +  * ''op=set'' (必須) 
-  <警告文字列> +  * ''op2=update_snmp_module'' (必須) 
-  <障害の最小値> +  * ''id=''<モジュールID> (必須) モジュールIDでなければいけません。 
-  <障害の最大値> +  * ''other=''<連続パラメータ> (必須) 次の順番でモジュールの設定とデータを指定します。 
-  <障害文字列> + 
-  <連続抑制回数> +  - < id_agent > 
-  <データの保存> +  - < disabled > 
-  <対象のIP> +  - < id_module_group > 
-  <モジュールのポート> +  - < min_warning > 
-  <SNMPバージョン> +  - < max_warning > 
-  <SNMPコミュニティ> +  - < str_warning > 
-  <SNMP OID> +  - < min_critical > 
-  <モジュールの間隔> +  - < max_critical > 
-  <データ保存倍率> +  - < str_critical > 
-  <最小値> +  - < ff_threshold > 
-  <最大値> +  - < history_data > 
-  <カスタムID> +  - < ip_target > 
-  <説明> +  - < module_port > 
-  <snmp3 暗号化方式 [AES|DES]> +  - < snmp_version > 
-  <snmp3 暗号化パスワード> +  - < snmp_community > 
-  <snmp3 セキュリティレベル [authNoPriv|authPriv|noAuthNoPriv]> +  - < snmp_oid > 
-  <snmp3 認証方式 [MD5|SHA]> +  - < module_interval > 
-  <snmp3 認証ユーザ> +  - < post_process > 
-  <snmp3 認証パスワード> +  - < min_value > 
-  <イベントタイプの無効化> (バージョン 5 以降のみ) +  - < max_value > 
-  <個別状態変化の利用> (バージョン 5.1 以降のみ) +  - < custom_id > 
-  <正常移行時連続抑制回数> (バージョン 5.1 以降のみ) +  - < description > 
-  <警告移行時連続抑制回数> (バージョン 5.1 以降のみ) +  - < snmp3_priv_method [AES|DES] > 
-  <障害移行時連続抑制回数> (バージョン 5.1 以降のみ) +  - < snmp3_priv_pass > 
-  <ff_type> (バーン 733 以降)+  - < snmp3_sec_level [authNoPriv|authPriv|noAuthNoPriv] > 
 +  - < snmp3_auth_method [MD5|SHA] > 
 +  - < snmp3_auth_user > 
 +  - < snmp3_auth_pass > 
 +  - < disabled_types_event > 
 +  - < each_ff > 
 +  - < ff_threshold_normal > 
 +  - < ff_threshold_warning > 
 +  - < ff_threshold_critical> 
 +  - < policy_linked > 
 +  - < ff_type > 
 +  - < ignore_unknown > Accepts values ''0'' and ''1''
 +  - < number_of_intervals_in_warning > Allows state scaling by specifying the maximum number of consecutive intervals in which the module remains in warning state. If this value is exceeded, the module will escalate to critical status. 
 + 
 +  - <エージェントID> 
 +  <無効化> 
 +  <モジュールグループID> 
 +  <警告の最小値> 
 +  <警告の最大値> 
 +  <警告文字列> 
 +  <障害の最小値> 
 +  <障害の最大値> 
 +  <障害文字列> 
 +  <連続抑制回数> 
 +  <データの保存> 
 +  <対象のIP> 
 +  <モジュールのポート> 
 +  <SNMPバージョン> 
 +  <SNMPコミュニティ> 
 +  <SNMP OID> 
 +  <モジュールの間隔> 
 +  <データ保存倍率> 
 +  <最小値> 
 +  <最大値> 
 +  <カスタムID> 
 +  <説明> 
 +  <snmp3 暗号化方式 [AES|DES]> 
 +  <snmp3 暗号化パスワード> 
 +  <snmp3 セキュリティレベル [authNoPriv|authPriv|noAuthNoPriv]> 
 +  <snmp3 認証方式 [MD5|SHA]> 
 +  <snmp3 認証ユーザ> 
 +  <snmp3 認証パスワード> 
 +  <イベントタイプの無効化> 
 +  <個別状態変化の利用> 
 +  <正常移行時連続抑制回数> 
 +  <警告移行時連続抑制回数> 
 +  <障害移行時連続抑制回数> 
 +  - <リクポリシー> 
 +  <ff_type> 
 +  - <不明の無視> ''0'' または ''1'' 
 +  - < 警告の間隔数 > モュールが警告状態に留まる連続間隔の最大数を指定することにより、状態のスケーリグを可能にします。 こ値を超えると、モジュールは障害状態にエスカレートします。 
 + 
 +Example ([[#pandora_fms_external_api|see call syntax)]]: 
 + 
 +例 ([[#pandora_fms_外部_api|書式を参照]]): 
 + 
 +(SNMP v: 3, snmp3_priv_method: AES, snmp3_priv_pass: example_priv_passw, snmp3_sec_level: authNoPriv, snmp3_auth_method:MD5, snmp3_auth_user: pepito_user, snmp3_auth_pass: example_priv_passw):
  
-**例** 
 例 (SNMPバージョン: 3、snmp3暗号化方式: AES、snmp3暗号化パスワード: example_priv_passw、snmp3セキュリティレベル: authNoPriv、snmp3認証方式:MD5、snmp3認証ユーザ: pepito_user、snmp3認証パスワード: example_priv_passw) 例 (SNMPバージョン: 3、snmp3暗号化方式: AES、snmp3暗号化パスワード: example_priv_passw、snmp3セキュリティレベル: authNoPriv、snmp3認証方式:MD5、snmp3認証ユーザ: pepito_user、snmp3認証パスワード: example_priv_passw)
  
-<code> +<code bash
-http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_snmp_module&id=33432&other=44 |0|6|20|25||26|30||15|1|127.0.0.1|60|3|public|.1.3.6.1.2.1.1.1.0|180|50.00|10|60|0|SNMP%20module%20modified%20by%20API|AES|example_priv_passw|authNoPriv|MD5|pepito_user|example_auth_passw&other_mode=url_encode_separator_|+…/include/api.php?op=set&op2=update_snmp_module&id=33432&other=44|0|6|20|25||26|30||15|1|127.0.0.1|60|3|public|.1.3.6.1.2.1.1.1.0|180|50.00|10|60|0|SNMP%20module&20modified%20by%20API|AES|example_priv_passw|authNoPriv|MD5|example_user|example_auth_passw&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora 
 + 
 +</code> 
 + 
 +Another example with state scaling and SNMP v1: 
 + 
 +状態スケーリングと SNMP v1 を使用した別の例: 
 + 
 +<code bash> 
 +/include/api.php?op=set&op2=update_snmp_module&id=137&other=|0|6|20|25||26|30||15|1|127.0.0.1|60|1|public|.1.3.6.1.2.1.1.1.0|180|50.00|10|60|||||||||||2020&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora" 
 + 
 +</code> 
 + 
 +Another example with state scaling and SNMP v3: 
 + 
 +状態スケーリングと SNMP v3 を使用した別の例: 
 + 
 +<code bash> 
 +/include/api.php?op=set&op2=update_snmp_module&id=138&other=|0|6|20|25||26|30||15|1|127.0.0.1|60|3|public|.1.3.6.1.2.1.1.1.0|180|50.00|10|60|0|SNMP%20module%20modified%20by%20API|AES|example_priv_passw|authNoPriv|MD5|example_user|example_auth_passw|||||||||2020&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora" 
 </code> </code>
  
  • ja/documentation/pandorafms/technical_reference/02_annex_externalapi.1713255033.txt.gz
  • 最終更新: 2024/04/16 08:10
  • by junichi