Search a service's log by category
Reads the service's log the way its software writes it and sorts the lines into categories: for the service the app's address routes to, the ingress access log by status class beside the service's own errors; for PostgreSQL, slow statements, lock waits, deadlocks, errors, connections, autovacuum, checkpoints and temporary files; likewise for MySQL, MongoDB, ClickHouse, Redis, RabbitMQ, Postfix, Sidekiq and Celery; other services by level. Returns each category's line count and volume per step, and the newest 200 lines of the requested categories with the fields parsed from them and, for PostgreSQL, the statement logged with them. Filters take the fields `level` and, on access logs, `route`. Logs are kept for seven days. `serviceName` is a compose service.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Query Parameters
Value in
- "production"
- "preview"
- "development"
How far back to look; the answer has 30 to 96 points across it
"1h"Value in
- "15m"
- "1h"
- "6h"
- "24h"
- "7d"
Text a line, or the statement logged with it, must contain, ignoring case
length <= 200Comma-separated categories whose lines to return; the default categories when absent, none when empty
length <= 400Filters, each written <field><op><value> with op =, !=, =~ or !~; =~ and !~ take a regular expression matched against the whole value, ignoring case. Repeat the parameter for several; every one must hold
items <= 20Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/workspaces/string/apps/string/services/string/logs/role"{ "preset": "access", "start": 0, "step": 0, "categories": [ { "id": "string", "label": "string", "on": true, "source": "log", "count": 0, "volume": [ 0 ] } ], "lines": [ { "ts": 0, "category": "string", "severity": "string", "level": "error", "message": "string", "statement": "string", "fields": { "property1": "string", "property2": "string" }, "pod": "string" } ], "routes": [ "string" ], "query": "string"}Read one route over time GET
Returns one route's request rate, 5xx rate and duration quantiles at each step of the range. `route` and `method` name the route as readServiceRoutes lists it. `serviceName` is a compose service.
Read the settings behind a service's log GET
Returns the settings that decide what searchServiceRoleLog can find, read from the running engine (PostgreSQL's log_* settings, MySQL's error log and deadlock settings, Redis's slowlog and memory policy) or, for the service the app's address routes to, from the ingress. Also returns what they mean for each category and, for Redis, lines built from its memory and error counters, which Redis never logs. `serviceName` is a compose service.