corecluster_ logs_ query
Query CoreCluster logs.
When to use it
Search the logs of a CoreCluster's sites at once with LogsQL over a time window: the matching lines newest first, each naming its site, with a cursor for the next page; or one table per log account for a query ending in stats, uniq or top. Use it when a problem may come from another site on the same cluster; for one site, corestack_logs_query.
Ask for it
Using the Corefinity MCP server, call corecluster_logs_query with cluster_id 812, sites [4211,4230], source web-error, range 1h. (Query CoreCluster logs.) Tell me what it returned.Inputs
The CoreCluster. At least 1.
Next_cursor from the previous page. Up to 65,536 characters.
Production (the default): each site's production row; all: its environments too. Defaults to production.
productionallFields whose top ten values to add (a records page only); a name that is not a field name is left out. Up to 20 items.
The filter builder's entries (level, text, fields), ANDed with the query.
ISO 8601; with to, instead of range. Format: date-time.
Defaults to 200. 1 to 1000.
LogsQL, sent as written (* when empty). Up to 4,096 characters.
Back from now, inside the cluster's retention.
15m1h6h24h7d30dThe site ids (production rows) of this cluster to read, each once; omitted or empty: every site you may see on it. corestack_site_list with cluster_id names them. Up to 200 items.
One log source. Defaults to all.
allweb-accessweb-errorphpappcrondatabasecachesearchqueueISO 8601; defaults to now. Format: date-time.
Example call
{
"name": "corecluster_logs_query",
"arguments": {
"cluster_id": 812,
"sites": [4211, 4230],
"source": "web-error",
"range": "1h"
}
}If it is refused
| Reason | What to do |
|---|---|
logs_not_collected | None of the sites read has its logs collected on this cluster yet (or none is left after sites, environment and the token's pins); nothing to read. |
logs_unavailable | This source's logs start once the sites' next platform update has applied. |
query_too_wide | The read covers too many sites or too much text at once; name fewer sites, add a source or narrow the window. |
logs_cluster_unavailable | Logs cannot be read at the moment; try again shortly. |
tenant_mismatch | Also answers a platform cluster, and a sites entry that is not one of this cluster's sites you may see. |
invalid_arguments | With fields.cursor: the cursor is not this call's — another token's or person's, another query's, or past its window. Run the query again. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |
logs_busy | See how this server works. |
The answer
kindisrecords(the lines newest first,next_cursorfor the next page — send it back with the same arguments andwindow) ortable(one table per log account for a query ending in an aggregating pipe; no cursor).- Every line carries
site{id, label, environment}. A query with any pipe is shown without site names (siteis null throughout, andwarningssays so): a pipe can drop or rewrite the field a line's site is read from. tenantis the cluster's logs tenant (quota and retention), or null when the read spans several.window{from, to}holds the absolute instants read; send them asfrom/toto read the same window again.- A page cursor works only for this token and person, with the same query and window.
- A large page comes as a link, as
corestack_logs_query's: its metadata withlinked {uri, …}and aresource_linktocorestack://logs/pages/{ref}; read it withresources/readbefore it expires, under the same token.
A token limited to some sites
The read holds only the rows the token's pins cover — its lines, and an export's file. A sites entry outside the pins
is pin_refused naming that site. Under a token limited to some environments of a site, leave sites out and send
environment: "all": the read then covers exactly the rows the token may read.