Create the log fetcher for cluster
POSThttps://api.spectrocloud.com/v1/spectroclusters/:uid/features/logFetcher
Create the log fetcher for cluster
Request
Path Parameters
uid stringrequired
Cluster uid for which log is requested
Header Parameters
ProjectUid string
Scope the request to the specified project uid
- application/json
Body
durationint64
Default value: 10
Duration for which log is requested
k8s
modestring
Possible values: [cluster
, app
]
Default value: cluster
Accepted Values - ["cluster", "app"]. if "app" then logs will be fetched from the virtual cluster
noOfLinesint64
Default value: 1000
No of lines of logs requested
node
Responses
- 201
Created successfully
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
uidstringrequired
{
"uid": "string"
}
- curl
- python
- go
- nodejs
- java
- CURL
curl -L 'https://api.spectrocloud.com/v1/spectroclusters/:uid/features/logFetcher' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'ApiKey: <API_KEY_VALUE>' \
-d '{
"duration": 10,
"k8s": {
"labelSelector": [
"string"
],
"namespaces": [
"string"
]
},
"mode": "cluster",
"noOfLines": 1000,
"node": {
"logs": [
"string"
]
}
}'