CorefinityCorefinityDocs
Open the Control PanelControl Panel
Varnish · 5 of 12

corestack_varnish_stats

Varnish cache statistics.

Scope readNo secrets returned
On this page

When to use it

A Magento 2 row's Varnish figures over the last hour, 24 hours or 7 days: hit ratio, requests, hits, misses and passes, cached objects, page storage used, evictions, backend fetches and errors, per bucket and in total, with the recent purges and the hourly purge allowance. The figures come from a sample of the row's Varnish counters every 5 minutes, so the newest bucket is still filling. Use corestack_varnish_get for the status, version and cache size.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_varnish_stats with site_id 4211, range 24h. (Varnish cache statistics.) Tell me what it returned.

Inputs

rangestring

1h gives 12 buckets of 5 minutes, 24h (the default) 24 hourly buckets, 7d 28 buckets of 6 hours.

1h24h7d
site_idintegerRequired

The row, a Magento 2 site or one of its environments. At least 1.

Example call

tools/call
{
  "name": "corestack_varnish_stats",
  "arguments": {
    "site_id": 4211,
    "range": "24h"
  }
}

If it is refused

ReasonWhat to do
varnish_not_offeredThe row is not a Magento 2 site.
varnish_offVarnish is switched off on this row; Magento's built-in cache is serving pages.
invalid_argumentsThe arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe 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_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

Answer

  • available: false with reason: "sampler_pending" until the row's first two samples exist (about 10 minutes after Varnish is first switched on, or after its next platform update); the buckets are then empty.
  • buckets[]: at (the bucket's start, UTC), hits, misses, passes, requests, backend_fetches, backend_errors, evictions (counts in the bucket), hit_ratio (hits ÷ (hits + misses), 0–1; passes such as admin, checkout, customer and signed-in API calls are never cached and are left out), requests_per_s, objects, bytes_used and storage_bytes (page storage used and its size), transient_bytes, reset (Varnish began counting again in the bucket). A value Varnish did not report for a bucket is null, never 0.
  • totals: the same counts over the range, hit_ratio, pass_ratio, requests_per_s, peak_requests_per_s, hit_ratio_7d, the newest objects, bytes_used and storage_bytes, resets (times Varnish began counting again), and missing (counters this Varnish does not report).
  • recent_purges[] (newest first, up to 10 in 7 days): at, source (person, deployment or automatic), via (panel, api or mcp), by.name, mode, items, hosts (empty = every host), status and confirmed. Varnish confirms a purge; it does not count pages.
  • purges_this_hour: used, limit and, when none is left, available_at. Magento's own purges and deployments are not counted.
  • hosts: the site's own hosts, the only ones a purge by address or pattern may name.
  • sampled_at (the newest sample) and stale (no sample for more than 15 minutes).

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT