両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン |
ja:documentation:08_technical_reference:02_annex_externalapi [2022/11/11 22:16] – [get events] junichi | ja:documentation:08_technical_reference:02_annex_externalapi [2022/11/25 22:31] – [get tags] junichi |
---|
- ''more_criticity'': returns the number of most critical events, for example if requested in JSON format: ''{"type":"json","data":[{"criticity":"4","user_can_manage":"1","user_can_write":"1","server_id":5,"server_name":"stod"}]}''. | - ''more_criticity'': returns the number of most critical events, for example if requested in JSON format: ''{"type":"json","data":[{"criticity":"4","user_can_manage":"1","user_can_write":"1","server_id":5,"server_name":"stod"}]}''. |
- < group_id > returns **non-validated** events belonging to a group of agents, use numeric values only. | - < group_id > returns **non-validated** events belonging to a group of agents, use numeric values only. |
- < tag > any of the tags registered in PFMS. | - < tag > any of the tags registered in PFMS (see ''[[:en:documentation:08_technical_reference:02_annex_externalapi#get_tags|get tags]]'' ). JSON format required, for example: ''[“2”,“5”]'' (see [[:en:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_external_api|call syntax]]). |
- < event type > any of the following values: | - < event type > any of the following values: |
* ''going_unknown'' | * ''going_unknown'' |
- ''more_criticity'': 最も重大なイベントの数を返します。JSON 形式でリクエストされた場合の例: ''{"type":"json","data":[{"criticity":"4","user_can_manage":"1","user_can_write":"1","server_id":5,"server_name":"stod"}]}''. | - ''more_criticity'': 最も重大なイベントの数を返します。JSON 形式でリクエストされた場合の例: ''{"type":"json","data":[{"criticity":"4","user_can_manage":"1","user_can_write":"1","server_id":5,"server_name":"stod"}]}''. |
- < グループ ID > エージェントのグループに属する **未承諾** イベントを返します。数値のみ指定できます。 | - < グループ ID > エージェントのグループに属する **未承諾** イベントを返します。数値のみ指定できます。 |
- < タグ > Pandora FMS に登録されている任意のタグです。 | - < タグ > Pandora FMS に登録されている任意のタグです。(''[[:ja:documentation:08_technical_reference:02_annex_externalapi#get_tags|get tags]]'' を参照)。JSON フォーマットである必要があります。例: ''[“2”,“5”]'' ([[:ja:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_外部_api|書式]] を参照)。 |
- < イベントタイプ > 以下の値を指定できます: | - < イベントタイプ > 以下の値を指定できます: |
* ''going_unknown'' | * ''going_unknown'' |
=== get tags === | === get tags === |
| |
書式: | [[:en:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_external_api|Call syntax]]: |
| |
* op=get (必須) | [[:ja:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_外部_api|書式]]: |
* op2=tags (必須) | |
* return_type=csv (必須) | |
| |
**例** | * ''op=get'' (required) |
| * ''op2=tags'' (required) |
| * ''return_type=csv'' or ''return_type=json'' (required) |
| * ''other=''< field separator > if you request in CSV format you must specify separator, otherwise it will return the fields together. |
| |
この例では、システムの全てのタグを返します。 | * ''op=get'' (必須) |
| * ''op2=tags'' (必須) |
| * ''return_type=csv'' または、''return_type=json'' (必須) |
| * ''other=''< フィールドセパレータ > CSV フォーマットを指定した場合はフィールドセパレータは必須です。指定しないと各フィールドが一緒に返されます。 |
| |
<code> | Example (see [[:en:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_external_api|call syntax]]): |
http://localhost/pandora_console/include/api.php?op=get&op2=tags&return_type=csv | |
| **例** ([[:ja:documentation:08_technical_reference:02_annex_externalapi#pandora_fms_外部_api|書式]]を参照): |
| |
| This example will return all tags in the system in CSV format with semicolon separator. |
| |
| この例では、システムの全てのタグをセミコロンで区切った CSV フォーマットで返します。 |
| |
| <code bash> |
| …/include/api.php?op=get&op2=tags&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora |
| |
</code> | </code> |