*View the list of fields stored in Elasticsearch
Requests
HTTP request
GET /v5/logs/fieldopts
Retrieve the search option for searching the log
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| start_time | number | True | timestamp of start time range |
| end_time | number | True | timestamp of end time range |
| size | number | False | page size |
| region_name | string | True | name of cluster |
| kubernetes_namespace | string | False | comma seperated names of k8s namespace |
| project_name | string | False | comma seperated names of projects |
| application_name | string | False | comma seperated names of application |
| node | string | False | comma seperated names of node |
| pod_name | string | False | comma seperated names of pod |
| container_id8 | string | False | comma seperated first 8 chars of docker container id |
| file_name | string | False | comma seperated names of path |
| component | string | False | comma seperated names of component |
| fields | string | False | field names seperated with comma |
| type | string | False | type of logs, choices: system, platform, kubernetes, workload, default to workload |
| query_string | string | False | full text search query |
| workload | string | False | workload type and workload name pairs, such as: Deployment:lanaya,StatefulSet:apollo |
Responses
Content-Type
application/json
Status code: 200
OK
Sample response
field opts aggregation result
{
"application_name": [
"test-app1.huzl-ovn"
],
"container_id8": [
"c778a9d6",
"6733117c",
"fb39af44"
],
"kubernetes_namespace": [
"asm-e2e-demo-ns",
"rook-ceph",
"shuai-ovn",
"huzl-ovn",
"e2eauto-ovn",
"xxli"
],
"node": [
"192.168.17.21",
"192.168.17.23",
"192.168.17.22",
"192.168.17.20"
],
"paths": [
"stdout",
"stderr"
],
"pod_name": [
"deploy-a-55bc6c7f6f-wqpwp",
"deploy-a-d6cb88c4d-q7k5z",
"deploy-e-6585bf847-tcgks"
],
"project_name": [
"stability",
"huzl2",
"e2eauto",
"asm-e2e-demo"
],
"region_name": [
"ovn"
]
}Parameters
| Name | Type | Description |
|---|---|---|
| application_name | array |
name of application
Path: application_name |
| application_name[] | string |
items
Path: application_name[] |
| container_id8 | array |
first 8 chars of id of docker container
Path: container_id8 |
| container_id8[] | string |
items
Path: container_id8[] |
| kubernetes_namespace | array |
name of namespace pod belongs to
Path: kubernetes_namespace |
| kubernetes_namespace[] | string |
items
Path: kubernetes_namespace[] |
| node | array |
name of node logs collected from
Path: node |
| node[] | string |
items
Path: node[] |
| paths | array |
log paths, stdout, stderr or user defined paths collected
Path: paths |
| paths[] | string |
items
Path: paths[] |
| pod_name | array |
name of pod
Path: pod_name |
| pod_name[] | string |
items
Path: pod_name[] |
| project_name | array |
name of project
Path: project_name |
| project_name[] | string |
items
Path: project_name[] |
| region_name | array |
region_name
Path: region_name |
| region_name[] | string |
items
Path: region_name[] |