Read a worker's jobs and queues
Finds the job library the service uses and reads it: BullMQ, Sidekiq and Celery state in a Redis service of the same app, RabbitMQ queues, and Sidekiq and Celery job lines in the service's own logs. Returns finished and failed runs per step, each job type with its failure share, run-time p95 and newest outcomes, repeat and cron schedules, and each queue with its waiting jobs, rates, oldest job, consumers and dead letters. `searched` says where Monitor looked and what it found; nothing is invented when nothing is found. Works on a worker, a Redis or a RabbitMQ service. Failure texts need readServiceJobDetails.
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"
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/workspaces/string/apps/string/services/string/jobs"{ "at": 0, "start": 0, "step": 0, "searched": [ { "service": "string", "kind": "redis", "found": [ "bullmq" ], "error": "string" } ], "done": [ 0 ], "failed": [ 0 ], "p95": 0, "types": [ { "name": "string", "library": "bullmq", "queue": "string", "runs": 0, "failed": 0, "p95": 0, "recent": [ "done" ], "scheduled": true, "sampled": true } ], "schedules": [ { "name": "string", "library": "bullmq", "queue": "string", "pattern": "string", "every": 0, "tz": "string", "next": 0 } ], "queues": [ { "name": "string", "library": "bullmq", "service": "string", "waiting": 0, "active": 0, "delayed": 0, "inRate": 0, "outRate": 0, "oldest": 0, "consumers": 0, "dead": 0, "deadLetter": true, "consumedBy": [ "string" ] } ], "depth": { "property1": [ 0 ], "property2": [ 0 ] }, "notes": [ "string" ], "queries": [ { "lang": "PromQL", "text": "string" } ]}Turn on a database's statement statistics and slow log POST
Turns on what streamEngineStats lists as off. Postgres: adds pg_stat_statements to shared_preload_libraries and restarts the service, then creates the extension in the `postgres` database on a second call, and logs statements slower than 250 ms with lock waits, through ALTER SYSTEM. MySQL and MariaDB: the statement history consumer and deadlock printing at runtime, and on MariaDB user statistics. Never resets any counter.
Read a worker's recent runs and failures GET
Returns the newest job runs with their state, attempt, run time and error text, the jobs that schedules added within the range, the newest failure of each job type, and up to three failed or dead jobs per queue. Requires the developer role, because error texts can carry job data.