I've got a few load balancers that all perform health checks on a number of varnish instances. The health check on the varnish side consists of matching the request method and URL to return a 200 response.
if (req.method == "GET" && req.url == "/ping") {
return(synth(200, "OK"));
}
Using HAProxy i've got health checks configured to poll /ping on the backend servers. This is generating a lot of messages in varnishncsa. Is it possible to somehow drop log entries going into varnishncsa if they match a certain req.url?
In addition to the link provided by Kirrus, there is a reference for the VSL Query Language here: http://www.varnish-cache.org/docs/4.0/reference/vsl-query.html
varnishncsa is actually just using a query against the varnishlog. You can override what query it uses with '-q' -- update the command line parameter in your pid0 system of choice. If initV, override DAEMON_OPTS in /etc/default/varnishncsa.
Actual documentation of it is a little sparse, but there's some examples here: https://info.varnish-software.com/blog/logging-varnish-40