Home / API Documentation / Operations center / Logging / Log statistics are viewed in minutes

*Log statistics are viewed in minutes

Requests

HTTP request

GET /v5/logs/searchwithaggregations

Get logs and aggregation count of logs

Query parameters

Name Type Required Description
start_time number Truetimestamp of start time range
end_time number Truetimestamp of end time range
pageno number Truerequest page number
size number Falsepage size
region_name string Truename of cluster
kubernetes_namespace string Falsecomma seperated names of k8s namespace
project_name string Falsecomma seperated names of projects
application_name string Falsecomma seperated names of application
node string Falsecomma seperated names of node
pod_name string Falsecomma seperated names of pod
container_id8 string Falsecomma seperated first 8 chars of docker container id
file_name string Falsecomma seperated names of path
component string Falsecomma seperated names of component
product string Falseproduct names seperated with comma
fields string Falsefield names seperated with comma
type string Falsetype of logs, choices: system, platform, kubernetes, workload, default to workload
query_string string Falsefull text search query
ascending boolean Falsein ascending order, default to false
workload string Falseworkload type and workload name pairs, such as: Deployment:lanaya,StatefulSet:apollo

Responses

Content-Type application/json

Status code: 200

OK

Sample response

log detail and aggregations result

{
   "buckets": [
     {
       "count": 0,
       "time": 1675751160
     }
   ],
   "items": [
     {
       "spec": {
         "data": {
           "@timestamp": "2023-02-07T06:35:31+000000",
           "application_name": "",
           "component": "",
           "container_id": "2eab9327ffb657f07d69e278652955bd8605e8b9a6d7986e47b568c43083b3d5",
           "container_id8": "2eab9327",
           "docker_container_name": "istio-proxy",
           "file_name": "stdout",
           "kubernetes_container_name": "istio-proxy",
           "kubernetes_labels": {
             "app": "in-01",
             "asm_cpaas_io/owning-resource": "in-01-kcfdd",
             "asm_cpaas_io/owning-resource-ns": "asm-e2e-c-platform-log",
             "install_operator_istio_io/owning-resource": "unknown",
             "istio": "asm-e2e-c-platform-log-in-01",
             "istio_io/rev": "1-14",
             "msname": "in-01",
             "operator_istio_io/component": "IngressGateways",
             "pod-template-hash": "7cdd475f45",
             "service_istio_io/canonical-name": "in-01",
             "service_istio_io/canonical-revision": "latest",
             "sidecar_istio_io/inject": "true",
             "topology_istio_io/network": "highovn"
           },
           "kubernetes_namespace": "asm-e2e-c-platform-log",
           "log_data": "2023-02-07T06:35:05.559285Z\tinfo\t\u003cem\u003eEnvoy\u003c/em\u003e proxy is ready",
           "log_id": "1675751728577079-1675751731254576732",
           "log_index": "log-workload-20230207",
           "log_level": "0",
           "log_type": "log",
           "node": "192.168.138.156",
           "nodes": "",
           "paths": "stdout",
           "pod_id": "35cda106-60aa-46a9-8af6-33b8e85100a3",
           "pod_name": "in-01-kcfdd-7cdd475f45-w99vd",
           "product": "",
           "project_name": "asm-e2e-c-platform",
           "provider": "",
           "region_id": "",
           "region_name": "highovn",
           "root_account": "",
           "source": "container",
           "time": 1675751728.577079,
           "workload": "Deployment:in-01-kcfdd"
         }
       }
     }
   ],
   "total_items": 1,
   "total_page": 1
 }

Parameters

Name Type Description
buckets array buckets
Path: buckets
buckets[] object log aggregation bucket
Path: buckets[]
buckets[].count integer Record count in the specified time interval
Path: buckets[].count
buckets[].time integer Time interval start time
Path: buckets[].time
items array items
Path: items
items[] object object holding the log data
Path: items[]
total_items integer Total count of all logs satisfies the specified conditions
Path: total_items
total_page integer Total page number of all logs satisfies the specified conditions
Path: total_page

Other status codes