corestack_ varnish_ stats
Varnish cache statistics.
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
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.
1h24h7dsite_idintegerRequired
The row, a Magento 2 site or one of its environments. At least 1.
Example call
{
"name": "corestack_varnish_stats",
"arguments": {
"site_id": 4211,
"range": "24h"
}
}If it is refused
| Reason | What to do |
|---|---|
varnish_not_offered | The row is not a Magento 2 site. |
varnish_off | Varnish is switched off on this row; Magento's built-in cache is serving pages. |
invalid_arguments | The 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_mismatch | The object does not exist or the token may not see it. Check the id. |
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. |
Answer
available: false withreason: "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_usedandstorage_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 isnull, never 0.totals: the same counts over the range,hit_ratio,pass_ratio,requests_per_s,peak_requests_per_s,hit_ratio_7d, the newestobjects,bytes_usedandstorage_bytes,resets(times Varnish began counting again), andmissing(counters this Varnish does not report).recent_purges[](newest first, up to 10 in 7 days):at,source(person,deploymentorautomatic),via(panel,apiormcp),by.name,mode,items,hosts(empty = every host),statusandconfirmed. Varnish confirms a purge; it does not count pages.purges_this_hour:used,limitand, 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) andstale(no sample for more than 15 minutes).
The same task elsewhere
Was this helpful?