Skip to content

Latest commit

 

History

History
849 lines (734 loc) · 17.4 KB

global_query_apis.md

File metadata and controls

849 lines (734 loc) · 17.4 KB

Lobster API document v1.0

Scroll down for example requests and responses.

Descriptions of Lobster global query APIs

Post

Get metadata of logs

POST /api/{version}/logs

Get metadata of logs for conditions

Body parameter

{
  "attachment": false,
  "burst": 0,
  "clusters": [
    "string"
  ],
  "container": "string",
  "containers": [
    "string"
  ],
  "end": "string",
  "exclude": "string",
  "id": "string",
  "include": "string",
  "labels": [
    {
      "property1": "string",
      "property2": "string"
    }
  ],
  "local": false,
  "namespace": "string",
  "namespaces": [
    "string"
  ],
  "page": 0,
  "pod": "string",
  "pod_uid": "string",
  "pods": [
    "string"
  ],
  "setName": "string",
  "setNames": [
    "string"
  ],
  "source": {
    "path": "string",
    "type": "string"
  },
  "sources": [
    {
      "path": "string",
      "type": "string"
    }
  ],
  "start": "string"
}

Parameters

Name In Type Required Description
version path string true v1 or v2
body body query.Request true request parameters

Example responses

200 Response

[
  {
    "cluster": "string",
    "container": "string",
    "id": "string",
    "labels": {
      "property1": "string",
      "property2": "string"
    },
    "line": 0,
    "namespace": "string",
    "pod": "string",
    "podUid": "string",
    "setName": "string",
    "size": 0,
    "source": {
      "path": "string",
      "type": "string"
    },
    "startedAt": "string",
    "storeAddr": "string",
    "updatedAt": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
204 No Content No chunks string
400 Bad Request Invalid parameters string
405 Method Not Allowed Method not allowed string
429 Too Many Requests too many requests string
500 Internal Server Error Failed to read logs string

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [model.Chunk] false none none
This operation does not require authentication

Export logs within range

POST /api/{version}/logs/export

Export logs for conditions

Body parameter

{
  "attachment": false,
  "burst": 0,
  "clusters": [
    "string"
  ],
  "container": "string",
  "containers": [
    "string"
  ],
  "end": "string",
  "exclude": "string",
  "id": "string",
  "include": "string",
  "labels": [
    {
      "property1": "string",
      "property2": "string"
    }
  ],
  "local": false,
  "namespace": "string",
  "namespaces": [
    "string"
  ],
  "page": 0,
  "pod": "string",
  "pod_uid": "string",
  "pods": [
    "string"
  ],
  "setName": "string",
  "setNames": [
    "string"
  ],
  "source": {
    "path": "string",
    "type": "string"
  },
  "sources": [
    {
      "path": "string",
      "type": "string"
    }
  ],
  "start": "string"
}

Parameters

Name In Type Required Description
version path string true v1 or v2
body body query.Request true request parameters

Example responses

200 Response

"string"

Responses

Status Meaning Description Schema
200 OK OK string
204 No Content No chunks string
400 Bad Request Invalid parameters string
405 Method Not Allowed Method not allowed string
429 Too Many Requests too many requests string
500 Internal Server Error Failed to read logs string
This operation does not require authentication

Get series within range

POST /api/{version}/logs/series

Get series for conditions

Body parameter

{
  "attachment": false,
  "burst": 0,
  "clusters": [
    "string"
  ],
  "container": "string",
  "containers": [
    "string"
  ],
  "end": "string",
  "exclude": "string",
  "id": "string",
  "include": "string",
  "labels": [
    {
      "property1": "string",
      "property2": "string"
    }
  ],
  "local": false,
  "namespace": "string",
  "namespaces": [
    "string"
  ],
  "page": 0,
  "pod": "string",
  "pod_uid": "string",
  "pods": [
    "string"
  ],
  "setName": "string",
  "setNames": [
    "string"
  ],
  "source": {
    "path": "string",
    "type": "string"
  },
  "sources": [
    {
      "path": "string",
      "type": "string"
    }
  ],
  "start": "string"
}

Parameters

Name In Type Required Description
version path string true v1 or v2
body body query.Request true request parameters

Example responses

200 Response

{
  "contents": "string",
  "pageInfo": {
    "current": 0,
    "hasNext": true,
    "isPartialContents": true,
    "total": 0
  },
  "series": [
    {
      "chunk_key": "string",
      "lines": 0,
      "name": "string",
      "samples": [
        {
          "lines": 0,
          "size": 0,
          "timestamp": "string"
        }
      ],
      "size": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK query.Response
204 No Content No chunks string
400 Bad Request Invalid parameters string
405 Method Not Allowed Method not allowed string
429 Too Many Requests too many requests string
500 Internal Server Error Failed to read logs string
This operation does not require authentication

Get logs within range

POST /api/v2/logs/range

Get logs for conditions

Body parameter

{
  "attachment": false,
  "burst": 0,
  "clusters": [
    "string"
  ],
  "container": "string",
  "containers": [
    "string"
  ],
  "end": "string",
  "exclude": "string",
  "id": "string",
  "include": "string",
  "labels": [
    {
      "property1": "string",
      "property2": "string"
    }
  ],
  "local": false,
  "namespace": "string",
  "namespaces": [
    "string"
  ],
  "page": 0,
  "pod": "string",
  "pod_uid": "string",
  "pods": [
    "string"
  ],
  "setName": "string",
  "setNames": [
    "string"
  ],
  "source": {
    "path": "string",
    "type": "string"
  },
  "sources": [
    {
      "path": "string",
      "type": "string"
    }
  ],
  "start": "string"
}

Parameters

Name In Type Required Description
body body query.Request true request parameters

Example responses

200 Response

{
  "contents": [
    {
      "cluster": "string",
      "container": "string",
      "labels": {
        "property1": "string",
        "property2": "string"
      },
      "message": "string",
      "namespace": "string",
      "pod": "string",
      "sourcePath": "string",
      "sourceType": "string",
      "stream": "string",
      "tag": "string",
      "time": "string"
    }
  ],
  "pageInfo": {
    "current": 0,
    "hasNext": true,
    "isPartialContents": true,
    "total": 0
  },
  "series": [
    {
      "chunk_key": "string",
      "lines": 0,
      "name": "string",
      "samples": [
        {
          "lines": 0,
          "size": 0,
          "timestamp": "string"
        }
      ],
      "size": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK query.ResponseEntries
204 No Content No chunks string
400 Bad Request Invalid parameters string
405 Method Not Allowed Method not allowed string
429 Too Many Requests too many requests string
500 Internal Server Error Failed to read logs string
501 Not Implemented Not supported version string
This operation does not require authentication

Schemas

github_com_naver_lobster_pkg_lobster_model.Sample

{
  "lines": 0,
  "size": 0,
  "timestamp": "string"
}

Properties

Name Type Required Restrictions Description
lines integer false none none
size integer false none none
timestamp string false none none

model.Chunk

{
  "cluster": "string",
  "container": "string",
  "id": "string",
  "labels": {
    "property1": "string",
    "property2": "string"
  },
  "line": 0,
  "namespace": "string",
  "pod": "string",
  "podUid": "string",
  "setName": "string",
  "size": 0,
  "source": {
    "path": "string",
    "type": "string"
  },
  "startedAt": "string",
  "storeAddr": "string",
  "updatedAt": "string"
}

Properties

Name Type Required Restrictions Description
cluster string false none none
container string false none none
id string false none none

model.Entry

{
  "cluster": "string",
  "container": "string",
  "labels": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string",
  "namespace": "string",
  "pod": "string",
  "sourcePath": "string",
  "sourceType": "string",
  "stream": "string",
  "tag": "string",
  "time": "string"
}

Properties

Name Type Required Restrictions Description
cluster string false none none
container string false none none
labels object false none none
» additionalProperties string false none none
message string false none none
namespace string false none none
pod string false none none
sourcePath string false none none
sourceType string false none none
stream string false none none
tag string false none none
time string false none none

model.Labels

{
  "property1": "string",
  "property2": "string"
}

Properties

Name Type Required Restrictions Description
additionalProperties string false none none

model.PageInfo

{
  "current": 0,
  "hasNext": true,
  "isPartialContents": true,
  "total": 0
}

Page inforamtion.

Properties

Name Type Required Restrictions Description
current integer false none none
hasNext boolean false none none
isPartialContents boolean false none partial logs are returned
total integer false none none

model.Series

{
  "chunk_key": "string",
  "lines": 0,
  "name": "string",
  "samples": [
    {
      "lines": 0,
      "size": 0,
      "timestamp": "string"
    }
  ],
  "size": 0
}

Name: "{cluster}{namespace}{pod}{container}{source}-{file number}".

Properties

Name Type Required Restrictions Description
chunk_key string false none none
lines integer false none none
name string false none none
samples [github_com_naver_lobster_pkg_lobster_model.Sample] false none none

model.Source

{
  "path": "string",
  "type": "string"
}

Properties

Name Type Required Restrictions Description
path string false none none
type string false none none

query.Request

{
  "attachment": false,
  "burst": 0,
  "clusters": [
    "string"
  ],
  "container": "string",
  "containers": [
    "string"
  ],
  "end": "string",
  "exclude": "string",
  "id": "string",
  "include": "string",
  "labels": [
    {
      "property1": "string",
      "property2": "string"
    }
  ],
  "local": false,
  "namespace": "string",
  "namespaces": [
    "string"
  ],
  "page": 0,
  "pod": "string",
  "pod_uid": "string",
  "pods": [
    "string"
  ],
  "setName": "string",
  "setNames": [
    "string"
  ],
  "source": {
    "path": "string",
    "type": "string"
  },
  "sources": [
    {
      "path": "string",
      "type": "string"
    }
  ],
  "start": "string"
}

Properties

Name Type Required Restrictions Description
attachment boolean false none none
burst integer false none The number of logs that can be returned in one page and this can be greater or less than burst
clusters [string] false none Get chunks belongs to clusters
container string false none Use internally
containers [string] false none Get chunks belongs to namespace and containers
end string false none End time for query
exclude string false none none
id string false none Use internally
include string false none Regular expression to search logs
labels [model.Labels] false none Get chunks belongs to namespaces and labels

query.Response

{
  "contents": "string",
  "pageInfo": {
    "current": 0,
    "hasNext": true,
    "isPartialContents": true,
    "total": 0
  },
  "series": [
    {
      "chunk_key": "string",
      "lines": 0,
      "name": "string",
      "samples": [
        {
          "lines": 0,
          "size": 0,
          "timestamp": "string"
        }
      ],
      "size": 0
    }
  ]
}

Response wrapping series and logs from store.

Properties

Name Type Required Restrictions Description
contents string false none logs in string

query.ResponseEntries

{
  "contents": [
    {
      "cluster": "string",
      "container": "string",
      "labels": {
        "property1": "string",
        "property2": "string"
      },
      "message": "string",
      "namespace": "string",
      "pod": "string",
      "sourcePath": "string",
      "sourceType": "string",
      "stream": "string",
      "tag": "string",
      "time": "string"
    }
  ],
  "pageInfo": {
    "current": 0,
    "hasNext": true,
    "isPartialContents": true,
    "total": 0
  },
  "series": [
    {
      "chunk_key": "string",
      "lines": 0,
      "name": "string",
      "samples": [
        {
          "lines": 0,
          "size": 0,
          "timestamp": "string"
        }
      ],
      "size": 0
    }
  ]
}

Response wrapping series and logs from querier.

Properties

Name Type Required Restrictions Description
contents [model.Entry] false none log entries