シッパーに関する情報をクエリします。
デバッグ
リクエストヘッダー
この操作には操作固有のリクエストヘッダーはなく、共通のリクエストヘッダーのみを使用します。 詳細については、「共通パラメーター」トピックの「共通リクエストヘッダー」セクションをご参照ください。
リクエスト構文
GET /openapi/collectors/[ResId] HTTP/1.1
リクエストパラメーター
パラメーター | タイプ | 場所 | 必須 | 例 | 説明 |
ResId | String | パス | はい | ct-cn-rg31ahn82m0qd**** | シッパー ID。 |
レスポンスパラメーター
パラメーター | タイプ | 例 | 説明 |
RequestId | String | 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1**** | リクエスト ID。 |
Result | Struct | 返された結果。 | |
collectorPaths | List | ["/var/log"] | シッパーのコレクションパス。 |
configs | configs の配列 | シッパーの構成ファイルに関する情報。 | |
content | String | fileBeat.inputs:xxx | 構成ファイルの内容。 |
fileName | String | filebeat.yml | 構成ファイルの名前。 |
dryRun | ブール値 | false | ドライランを実行するかどうかを示します。有効な値:
|
extendConfigs | extendConfigs の配列 | シッパーの拡張構成。 | |
configType | String | collectorDeployMachine | 構成タイプ。有効な値:
|
enableMonitoring | ブール値 | true | の値が の場合にのみ、Kibana Monitoring が有効になっているかどうかを示します。構成タイプ 有効な値:collectorTargetInstance。有効な値:
|
groupId | String | default_ct-cn-5i2l75bz4776**** | の値が の場合にのみ、マシングループの ID を返します。 構成タイプ です collectorDeployMachine。 |
host | String | es-cn-n6w1o1x0w001c****-kibana.internal.elasticsearch.aliyuncs.com:5601 | の値が の場合にのみ、Kibana ダッシュボードを有効にした後、内部ネットワーク経由で Kibana にアクセスするために使用されるアドレスを返します。 構成タイプ です collectorElasticsearchForKibana。 |
hosts | List | ["es-cn-n6w1o1x*****.elasticsearch.aliyuncs.com:9200"] | の値が の場合にのみ、シッパーの出力のアクセスアドレスを返します。 構成タイプ です collectorTargetInstance。 |
instanceId | String | es-cn-n6w1o1**** | シッパーに関連付けられているオブジェクトの ID です。configType の値が collectorTargetInstance の場合、このパラメーターの値は、シッパーの出力構成部分で指定されたリソースの ID です。configType の値が collectorDeployMachine で、type の値が ACKCluster の場合、このパラメーターの値は Container Service for Kubernetes (ACK) クラスターの ID です。 |
instanceType | String | elasticsearch | の値が の場合にのみ、シッパーの出力のタイプを返します。有効な値: elasticsearch および logstash。 構成タイプ です collectorTargetInstance。 |
kibanaHost | String | https://es-cn-nif1z89fz003i****.kibana.elasticsearch.aliyuncs.com:5601 | の値が の場合にのみ、Kibana ダッシュボードを有効にした後、インターネット経由で Kibana にアクセスするために使用されるアドレスを返します。 構成タイプ です collectorElasticsearchForKibana。 |
machines | machines の配列 | の値が で、 の値が の場合にのみ、シッパーがインストールされている ECS インスタンスに関する情報を返します。 構成タイプ です collectorDeployMachine と値 種類 です ECSインスタンス ID。 | |
agentStatus | String | heartOk | ECS インスタンス上のシッパーのステータス。有効な値:
|
instanceId | String | i-bp1gyhphjaj73jsr**** | シッパーがインストールされている ECS インスタンスの ID。 |
protocol | String | HTTP | の値が の場合にのみ、使用される転送プロトコルを返します。シッパーの出力にアクセスできるプロトコルと同じです。有効な値: HTTP および HTTPS。 構成タイプ です collectorTargetInstance。 |
successPodsCount | String | 8 | ACK クラスターでデータが正常に収集されたポッドの数。 |
totalPodsCount | String | 10 | ACK クラスターでログを収集する必要のあるポッドの数。 |
type | String | ECSInstanceId | の値が の場合にのみ、シッパーがインストールされているマシンのタイプを返します。構成タイプ です collectorDeployMachine 有効な値:
|
userName | String | elastic | の値が または の場合にのみ、シッパーの出力にアクセスするために使用されるユーザー名を返します。デフォルト値: elastic。 構成タイプ です collectorTargetInstance または collectorElasticsearchForKibana。 |
gmtCreatedTime | String | 2020-06-20T07:26:47.000+0000 | シッパーが作成された時刻。 |
gmtUpdateTime | String | 2020-06-20T07:26:47.000+0000 | シッパーが更新された時刻。 |
name | String | ct-cn-4135is2tj194p**** | シッパーの名前。 |
ownerId | String | 16852099488***** | アカウント ID。 |
resId | String | ct-cn-rg31ahn82m0qd**** | シッパー ID。 |
resType | String | fileBeat | シッパーのタイプ。有効な値: fileBeat、metricBeat、heartBeat、および auditBeat。 |
resVersion | String | 6.8.5_with_community | シッパーのバージョン。 |
status | String | active | シッパーのステータス。有効な値:
|
vpcId | String | vpc-bp16k1dvzxtma***** | シッパーが存在する仮想プライベートクラウド (VPC) の ID。 |
extendConfigs で返されるパラメーターは、 configType の値によって異なります。 configType の有効な値には、 collectorTargetInstance、 collectorElasticsearchForKibana、 collectorDeployMachine が含まれます。
collectorTargetInstance
ECS
configType、 instanceId、 instanceType、 hosts、 userName、 password、 protocol、 enableMonitoring
ACK
configType、 instanceId、 instanceType、 userName、 password、 protocol、 enableMonitoring
collectorElasticsearchForKibana
ECS
configType、 instanceId、 host、 kibanaHost、 userName、 password、 protocol
ACK
configType
collectorDeployMachine
ECS
configType、 type、 machines、 groupId
ACK
configType、 type、 instanceId、 totalPodsCount、 successPodsCount
例
サンプルリクエスト
GET /openapi/collectors/ct-cn-6z8b5eblvi706**** HTTP/1.1
共通リクエストパラメーター
サンプルの成功レスポンス
JSON
形式
{
"name": "filebeats",
"resVersion": "6.8.5_with_community",
"resId": "ct-cn-6fy17c8z99c7i****",
"resType": "fileBeat",
"ownerId": "168520994880****",
"status": "active",
"vpcId": "vpc-bp16k1dvzxtmagcva****",
"dryRun": false,
"gmtCreatedTime": "2020-11-05T12:42:47.000+0000",
"gmtUpdateTime": "2020-11-06T05:13:10.000+0000",
"collectorPaths": "/var/log/*.log",
"configs": {
"fileName": "/conf/filebeat.yml",
"content": "fileBeat.inputs:xxx"
},
"extendConfigs": [
{
"instanceId": "es-cn-n6w1o1x0w001c****",
"configType": "collectorElasticsearchForKibana",
"host": "es-cn-n6w1o1x0w001c****-kibana.internal.elasticsearch.aliyuncs.com:5601",
"kibanaHost": "https://es-cn-n6w1o1x0w001c****.kibana.elasticsearch.aliyuncs.com:5601",
"userName": "elastic",
"protocol": "HTTPS"
},
{
"instanceId": "es-cn-n6w1o1x0w001c****",
"instanceType": "elasticsearch",
"configType": "collectorTargetInstance",
"hosts": [
"es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200",
"es-cn-nif1z89fz003i****.elasticsearch.aliyuncs.com:9200"
],
"userName": "elastic",
"protocol": "HTTPS",
"enableMonitoring": true
},
{
"machines": [
{
"instanceId": "es-cn-n6w1o1x0w001c****",
"agentStatus": "heartOk"
},
{
"instanceId": "es-cn-nif1z89fz003i****",
"agentStatus": "heartOk"
}
],
"type": "ECSInstanceId",
"configType": "collectorDeployMachine",
"groupId": "default_ct-cn-6fy17c8z99c7i****"
}
]
}
エラーコード
エラーコードのリストについては、「サービスエラーコード」をご参照ください。