The following methods can be used to monitor VHA6.
To see your VHA6 statistics:
varnishstat -1 -f *vha6_stats*
The following metrics are logged:
broadcast_candidates
- Requests evaluated for broadcasting.broadcasts
- Requests that have been broadcasted.broadcast_skip
- Requests that were skipped via a request override.
See skip.broadcast_nocache
- Requests that could not be broadcasted due to uncacheability.broadcast_lowttl
- Request that could not be broadcasted due to low TTL and grace.
See min_ttl
and min_grace.broadcast_toolarge
- Requests that could not be broadcasted due to being too large.
See max_bytes.error_rate_limited
- The number of new replications started per second hit the rate limit.
See max_requests_sec.error_max_broadcasts
- The number of ongoing replications hit the rate limit.
See max_requests_sec.fetch_peer
- Broadcasts which hit this node and were converted to a peer fetch.fetch_peer_hit
- Broadcasts which hit this node and were a cache hit.fetch_self
- Broadcasts which hit the broadcasting node. These are expected for each broadcast.fetch_origin
- Fetches which hit this node as an origin from a peer.fetch_origin_deliver
- Fetches which successfully delivered an origin object to the peer.fetch_peer_insert
- Peer fetches which successfully inserted an object.error_fetch
- Peer fetches which resulted in an network or server error.error_fetch_insert
- Peer fetches which resulted in an origin VHA error.error_origin_mismatch
- Origin received the wrong fetch.error_origin_miss
- Origin does not have the object.error_version_mismatch
- VHA6 versions do not match across nodes.error_no_token
- No token present in transaction.error_bad_token
- Invalid token present in transaction.error_stale_token
- A valid token is present but its expired.
See token_ttl.legacy_vha
- A legacy vha-agent
request was detected.Use the following 1 liner to aggregate VHA6 stats across all VCLs:
varnishstat -1 -f *vha6_stats* | awk -F'[ .]+' '{t[$4]+=$5}END{for(f in t)print f " " t[f]}'
To see all VHA6 transactions:
varnishlog -g request -q "ReqMethod ~ VHA"
To capture VHA6 errors:
varnishlog -g request -q "VHA6 ~ ERROR"
All peer responses have a vha6-origin
header containing the origin hostname (server.identity).
To remove this header, add the following VCL:
sub vcl_deliver {
unset resp.http.vha6-origin;
}