The Service Map for APM is here!

Varnish

Agent Check Agent Check

Supported OS: Linux Mac OS Windows

Varnish default dashboard

Overview

This check collects varnish metrics regarding:

  • Clients: connections and requests
  • Cache performance: hits, evictions, etc
  • Threads: creation, failures, threads queued
  • Backends: successful, failed, retried connections

It also submits service checks for the health of each backend.

Setup

Installation

The Varnish check is included in the Datadog Agent package, so you don’t need to install anything else on your Varnish servers.

Configuration

  1. Edit the varnish.d/conf.yaml file, in the conf.d/ folder at the root of your Agent’s configuration directory to start collecting your Varnish metrics and logs. See the sample varnish.d/conf.yaml for all available configuration options.

  2. Restart the Agent

Prepare Varnish

If you’re running Varnish 4.1+, add the dd-agent system user to the Varnish group (e.g. sudo usermod -G varnish -a dd-agent).

Metric Collection

  • Add this configuration block to your varnish.d/conf.yaml file to start gathering your Varnish metrics:
  init_config:

  instances:
    - varnishstat: /usr/bin/varnishstat        # or wherever varnishstat lives
      varnishadm: <PATH_TO_VARNISHADM_BIN>     # to submit service checks for the health of each backend
  #   secretfile: <PATH_TO_VARNISH_SECRETFILE> # if you configured varnishadm and your secret file isn't /etc/varnish/secret
  #   tags:
  #     - instance:production

If you don’t set varnishadm, the Agent won’t check backend health. If you do set it, the Agent needs privileges to execute the binary with root privileges. Add the following to your /etc/sudoers file:

  dd-agent ALL=(ALL) NOPASSWD:/usr/bin/varnishadm

See the sample varnish.yaml for all available configuration options.

Log Collection

Available for Agent >6.0

  • To enable Varnish logging uncomment the following in /etc/default/varnishncsa:
VARNISHNCSA_ENABLED=1

Add the following at the end of the same file:

LOG_FORMAT="{\"date_access\": \"%{%Y-%m-%dT%H:%M:%S%z}t\", \"network.client.ip\":\"%h\", \"http.auth\" : \"%u\", \"varnish.x_forwarded_for\" : \"%{X-Forwarded-For}i\", \"varnish.hit_miss\":  \"%{Varnish:hitmiss}x\", \"network.bytes_written\": %b, \"http.response_time\": %D, \"http.status_code\": \"%s\", \"http.url\": \"%r\", \"http.ident\": \"%{host}i\", \"http.method\": \"%m\", \"varnish.time_first_byte\" : %{Varnish:time_firstbyte}x, \"varnish.handling\" : \"%{Varnish:handling}x\", \"http.referer\": \"%{Referer}i\", \"http.useragent\": \"%{User-agent}i\" }"

DAEMON_OPTS="$DAEMON_OPTS -c -a -F '${LOG_FORMAT}'"

Restart Varnishncsa to make sure the changes are taken into account.

  • Collecting logs is disabled by default in the Datadog Agent, you need to enable it in datadog.yaml:
  logs_enabled: true
  • Add this configuration block to your varnish.d/conf.yaml file to start collecting your Varnish logs:
  logs:
    - type: file
       path: /var/log/varnish/varnishncsa.log
      source: varnish
      sourcecategory: http_web_access
      service: varnish

Change the path and service parameter value and configure them for your environment. See the sample varnish.yaml for all available configuration options.

Learn more about log collection in the log documentation

Validation

Run the Agent’s status subcommand and look for varnish under the Checks section.

Data Collected

Metrics

varnish.accept_fail
(gauge)
Accept failures. This metric is only provided by varnish 3.x.
shown as connection
varnish.backend_busy
(gauge)
Maximum number of connections to a given backend.
shown as connection
varnish.backend_conn
(gauge)
Successful connections to a given backend.
shown as connection
varnish.backend_fail
(gauge)
Failed connections for a given backend.
shown as connection
varnish.backend_recycle
(gauge)
Backend connections with keep-alive that are returned to the pool of connections.
shown as connection
varnish.backend_req
(gauge)
Backend requests.
shown as request
varnish.backend_retry
(gauge)
Backend connection retries.
shown as connection
varnish.backend_reuse
(gauge)
Recycled connections that has were reused.
shown as connection
varnish.backend_toolate
(gauge)
Backend connections closed because they were idle too long.
shown as connection
varnish.backend_unhealthy
(gauge)
Backend connections not tried because the backend was unhealthy.
shown as connection
varnish.bans
(gauge)
Bans in system, including bans superseded by newer bans and bans already checked by the ban-lurker. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_added
(gauge)
Bans added to ban list. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_completed
(gauge)
Bans which are no longer active, either because they got checked by the ban-lurker or superseded by newer identical bans. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_deleted
(gauge)
Bans deleted from ban list. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_dups
(gauge)
Bans replaced by later identical bans. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_lurker_contention
(gauge)
Times the ban-lurker waited for lookups. This metric is only provided by varnish 4.x.
shown as event
varnish.bans_lurker_obj_killed
(gauge)
Objects killed by ban-lurker. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_lurker_tested
(gauge)
Bans and objects tested against each other by the ban-lurker. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_lurker_tests_tested
(gauge)
Tests and objects tested against each other by the ban-lurker. 'ban req.url == foo && req.http.host == bar' counts as one in 'bans_tested' and as two in 'bans_tests_tested'. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_obj
(gauge)
Bans which use obj.* variables. These bans can possibly be washed by the ban-lurker. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_obj_killed
(gauge)
Objects killed by bans during object lookup. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_persisted_bytes
(gauge)
Bytes used by the persisted ban lists. This metric is only provided by varnish 4.x.
shown as byte
varnish.bans_persisted_fragmentation
(gauge)
Extra bytes accumulated through dropped and completed bans in the persistent ban lists. This metric is only provided by varnish 4.x.
shown as byte
varnish.bans_req
(gauge)
Bans which use req.* variables. These bans can not be washed by the ban-lurker. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_tested
(gauge)
Bans and objects tested against each other during hash lookup. This metric is only provided by varnish 4.x.
shown as object
varnish.bans_tests_tested
(gauge)
Tests and objects tested against each other during lookup. 'ban req.url == foo && req.http.host == bar' counts as one in 'bans_tested' and as two in 'bans_tests_tested'. This metric is only provided by varnish 4.x.
shown as object
varnish.busy_sleep
(gauge)
Requests sent to sleep without a worker thread because they found a busy object. This metric is only provided by varnish 4.x.
shown as request
varnish.busy_wakeup
(gauge)
Requests taken off the busy object sleep list and and rescheduled. This metric is only provided by varnish 4.x.
shown as request
varnish.cache_hit
(gauge)
Requests served from the cache.
shown as request
varnish.cache_hitpass
(gauge)
Requests passed to a backend where the decision to pass them found in the cache.
shown as request
varnish.cache_miss
(gauge)
Requests fetched from a backend server.
shown as request
varnish.client_conn
(gauge)
Client connections accepted. This metric is only provided by varnish 3.x.
shown as connection
varnish.client_drop
(gauge)
Client connection dropped, no session. This metric is only provided by varnish 3.x.
shown as connection
varnish.client_drop_late
(gauge)
Client connection dropped late. This metric is only provided by varnish 3.x.
shown as connection
varnish.client_req
(gauge)
Parseable client requests seen.
shown as request
varnish.client_req_400
(gauge)
Requests that were malformed in some drastic way. This metric is only provided by varnish 4.x.
shown as request
varnish.client_req_411
(gauge)
Requests that were missing a Content-Length: header. This metric is only provided by varnish 4.x.
shown as request
varnish.client_req_413
(gauge)
Requests that were too big. This metric is only provided by varnish 4.x.
shown as request
varnish.client_req_417
(gauge)
Requests with a bad Expect: header. This metric is only provided by varnish 4.x.
shown as request
varnish.dir_dns_cache_full
(gauge)
DNS director full DNS cache. This metric is only provided by varnish 3.x.
shown as event
varnish.dir_dns_failed
(gauge)
DNS director failed lookup. This metric is only provided by varnish 3.x.
shown as event
varnish.dir_dns_hit
(gauge)
DNS director cached lookup hit. This metric is only provided by varnish 3.x.
shown as event
varnish.dir_dns_lookups
(gauge)
DNS director lookups. This metric is only provided by varnish 3.x.
shown as event
varnish.esi_errors
(gauge)
Edge Side Includes (ESI) parse errors.
shown as event
varnish.esi_warnings
(gauge)
Edge Side Includes (ESI) parse warnings.
shown as event
varnish.exp_mailed
(gauge)
Objects mailed to expiry thread for handling. This metric is only provided by varnish 4.x.
shown as object
varnish.exp_received
(gauge)
Objects received by expiry thread for handling. This metric is only provided by varnish 4.x.
shown as object
varnish.fetch_1xx
(gauge)
Back end response with no body because of 1XX response (Informational).
shown as response
varnish.fetch_204
(gauge)
Back end response with no body because of 204 response (No Content).
shown as response
varnish.fetch_304
(gauge)
Back end response with no body because of 304 response (Not Modified).
shown as response
varnish.fetch_bad
(gauge)
Back end response's body length could not be determined and/or had bad headers.
shown as response
varnish.fetch_chunked
(gauge)
Back end response bodies that were chunked.
shown as response
varnish.fetch_close
(gauge)
Fetch wanted close.
shown as response
varnish.fetch_eof
(gauge)
Back end response bodies with EOF.
shown as response
varnish.fetch_failed
(gauge)
Back end response fetches that failed.
shown as response
varnish.fetch_head
(gauge)
Back end HEAD requests.
shown as response
varnish.fetch_length
(gauge)
Back end response bodies with Content-Length.
shown as response
varnish.fetch_no_thread
(gauge)
Back end fetches that failed because no thread was available. This metric is only provided by varnish 4.x.
shown as response
varnish.fetch_oldhttp
(gauge)
Number of responses served by backends with http < 1.1
shown as response
varnish.fetch_zero
(gauge)
Number of responses that have zero length.
shown as response
varnish.hcb_insert
(gauge)
HCB inserts.
shown as event
varnish.hcb_lock
(gauge)
HCB lookups with lock.
shown as event
varnish.hcb_nolock
(gauge)
HCB lookups without lock.
shown as event
varnish.LCK.backend.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.backend.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.backend.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.backend.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.ban.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.ban.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.ban.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.ban.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.busyobj.creat
(gauge)
Created locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.busyobj.destroy
(gauge)
Destroyed locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.busyobj.locks
(gauge)
Lock operations. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.cli.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.cli.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.cli.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.cli.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.exp.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.exp.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.exp.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.exp.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.hcb.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.hcb.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.hcb.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.hcb.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.hcl.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.hcl.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.hcl.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.hcl.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.herder.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.herder.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.herder.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.herder.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.hsl.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.hsl.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.hsl.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.hsl.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.lru.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.lru.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.lru.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.lru.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.mempool.creat
(gauge)
Created locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.mempool.destroy
(gauge)
Destroyed locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.mempool.locks
(gauge)
Lock operations. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.nbusyobj.creat
(gauge)
Created locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.nbusyobj.destroy
(gauge)
Destroyed locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.nbusyobj.locks
(gauge)
Lock operations. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.objhdr.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.objhdr.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.objhdr.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.objhdr.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.pipestat.creat
(gauge)
Created locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.pipestat.destroy
(gauge)
Destroyed locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.pipestat.locks
(gauge)
Lock operations. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.sess.creat
(gauge)
Created locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.sess.destroy
(gauge)
Destroyed locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.sess.locks
(gauge)
Lock operations. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.sessmem.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.sessmem.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.sessmem.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.sessmem.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.sma.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.sma.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.sma.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.sma.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.smf.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.smf.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.smf.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.smf.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.smp.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.smp.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.smp.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.smp.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.sms.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.sms.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.sms.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.sms.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.stat.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.stat.creat
(gauge)
Created locks. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.stat.destroy
(gauge)
Destroyed locks. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.stat.locks
(gauge)
Lock operations. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.vbe.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.vbe.creat
(gauge)
Created locks. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.vbe.destroy
(gauge)
Destroyed locks. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.vbe.locks
(gauge)
Lock operations. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.vbp.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.vbp.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.vbp.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.vbp.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.vcapace.creat
(gauge)
Created locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.vcapace.destroy
(gauge)
Destroyed locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.vcapace.locks
(gauge)
Lock operations. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.vcl.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.vcl.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.vcl.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.vcl.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.vxid.creat
(gauge)
Created locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.vxid.destroy
(gauge)
Destroyed locks. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.vxid.locks
(gauge)
Lock operations. This metric is only provided by varnish 4.x.
shown as lock
varnish.LCK.wq.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.wq.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.wq.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.wq.locks
(gauge)
Lock operations.
shown as lock
varnish.LCK.wstat.colls
(gauge)
Collisions. This metric is only provided by varnish 3.x.
shown as lock
varnish.LCK.wstat.creat
(gauge)
Created locks.
shown as lock
varnish.LCK.wstat.destroy
(gauge)
Destroyed locks.
shown as lock
varnish.LCK.wstat.locks
(gauge)
Lock operations.
shown as lock
varnish.losthdr
(gauge)
HTTP header overflows.
shown as event
varnish.MEMPOOL.busyobj.allocs
(gauge)
Allocations. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.busyobj.frees
(gauge)
Frees. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.busyobj.live
(gauge)
In use. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.busyobj.pool
(gauge)
In pool. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.busyobj.randry
(gauge)
Pool ran dry. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.busyobj.recycle
(gauge)
Recycled from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.busyobj.surplus
(gauge)
Too many for pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.busyobj.sz_needed
(gauge)
Size allocated. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.busyobj.sz_wanted
(gauge)
Size requested. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.busyobj.timeout
(gauge)
Timed out from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.busyobj.toosmall
(gauge)
Too small to recycle. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req0.allocs
(gauge)
Allocations. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req0.frees
(gauge)
Frees. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req0.live
(gauge)
In use. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.req0.pool
(gauge)
In pool. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.req0.randry
(gauge)
Pool ran dry. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req0.recycle
(gauge)
Recycled from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req0.surplus
(gauge)
Too many for pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req0.sz_needed
(gauge)
Size allocated. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.req0.sz_wanted
(gauge)
Size requested. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.req0.timeout
(gauge)
Timed out from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req0.toosmall
(gauge)
Too small to recycle. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req1.allocs
(gauge)
Allocations. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req1.frees
(gauge)
Frees. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req1.live
(gauge)
In use. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.req1.pool
(gauge)
In pool. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.req1.randry
(gauge)
Pool ran dry. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req1.recycle
(gauge)
Recycled from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req1.surplus
(gauge)
Too many for pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req1.sz_needed
(gauge)
Size allocated. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.req1.sz_wanted
(gauge)
Size requested. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.req1.timeout
(gauge)
Timed out from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.req1.toosmall
(gauge)
Too small to recycle. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess0.allocs
(gauge)
Allocations. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess0.frees
(gauge)
Frees. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess0.live
(gauge)
In use. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.sess0.pool
(gauge)
In pool. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.sess0.randry
(gauge)
Pool ran dry. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess0.recycle
(gauge)
Recycled from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess0.surplus
(gauge)
Too many for pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess0.sz_needed
(gauge)
Size allocated. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.sess0.sz_wanted
(gauge)
Size requested. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.sess0.timeout
(gauge)
Timed out from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess0.toosmall
(gauge)
Too small to recycle. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess1.allocs
(gauge)
Allocations. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess1.frees
(gauge)
Frees. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess1.live
(gauge)
In use. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.sess1.pool
(gauge)
In pool. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.sess1.randry
(gauge)
Pool ran dry. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess1.recycle
(gauge)
Recycled from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess1.surplus
(gauge)
Too many for pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess1.sz_needed
(gauge)
Size allocated. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.sess1.sz_wanted
(gauge)
Size requested. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.sess1.timeout
(gauge)
Timed out from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.sess1.toosmall
(gauge)
Too small to recycle. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.vbc.allocs
(gauge)
Allocations. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.vbc.frees
(gauge)
Frees. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.vbc.live
(gauge)
In use. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.vbc.pool
(gauge)
In pool. This metric is only provided by varnish 4.x.
varnish.MEMPOOL.vbc.randry
(gauge)
Pool ran dry. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.vbc.recycle
(gauge)
Recycled from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.vbc.surplus
(gauge)
Too many for pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.vbc.sz_needed
(gauge)
Size allocated. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.vbc.sz_wanted
(gauge)
Size requested. This metric is only provided by varnish 4.x.
shown as byte
varnish.MEMPOOL.vbc.timeout
(gauge)
Timed out from pool. This metric is only provided by varnish 4.x.
shown as event
varnish.MEMPOOL.vbc.toosmall
(gauge)
Too small to recycle. This metric is only provided by varnish 4.x.
shown as event
varnish.MGT.child_died
(gauge)
Child processes that died due to signals. This metric is only provided by varnish 4.x.
shown as process
varnish.MGT.child_dump
(gauge)
Child processes that produced core dumps. This metric is only provided by varnish 4.x.
shown as process
varnish.MGT.child_exit
(gauge)
Child processes the were cleanly stopped. This metric is only provided by varnish 4.x.
shown as process
varnish.MGT.child_panic
(gauge)
Child processes that panicked. This metric is only provided by varnish 4.x.
shown as process
varnish.MGT.child_start
(gauge)
Child processes that started. This metric is only provided by varnish 4.x.
shown as process
varnish.MGT.child_stop
(gauge)
Child processes that exited with an unexpected return code. This metric is only provided by varnish 4.x.
shown as process
varnish.MGT.uptime
(gauge)
This metric is only provided by varnish 4.x.
varnish.n_backend
(gauge)
Number of backends.
varnish.n_ban
(gauge)
Active bans. This metric is only provided by varnish 3.x.
shown as object
varnish.n_ban_add
(gauge)
New bans added. This metric is only provided by varnish 3.x.
shown as object
varnish.n_ban_dups
(gauge)
Duplicate bans removed. This metric is only provided by varnish 3.x.
shown as object
varnish.n_ban_obj_test
(gauge)
Objects tested. This metric is only provided by varnish 3.x.
shown as object
varnish.n_ban_re_test
(gauge)
Regexps tested against. This metric is only provided by varnish 3.x.
shown as object
varnish.n_ban_retire
(gauge)
Old bans deleted. This metric is only provided by varnish 3.x.
shown as object
varnish.n_expired
(gauge)
Objects that expired from cache because of TTL.
shown as object
varnish.n_gunzip
(gauge)
Gunzip operations.
shown as event
varnish.n_gzip
(gauge)
Gzip operations.
shown as event
varnish.n_lru_moved
(gauge)
Move operations done on the LRU list.
shown as operation
varnish.n_lru_nuked
(gauge)
Objects forcefully evicted from storage to make room for new objects.
shown as operation
varnish.n_obj_purged
(gauge)
Purged objects. This metric is only provided by varnish 4.x.
shown as object
varnish.n_object
(gauge)
object structs made.
shown as object
varnish.n_objectcore
(gauge)
objectcore structs made.
shown as object
varnish.n_objecthead
(gauge)
objecthead structs made.
shown as object
varnish.n_objoverflow
(gauge)
Objects overflowing workspace. This metric is only provided by varnish 3.x.
shown as object
varnish.n_objsendfile
(gauge)
Objects sent with sendfile. This metric is only provided by varnish 3.x.
shown as object
varnish.n_objwrite
(gauge)
Objects sent with write. This metric is only provided by varnish 3.x.
shown as object
varnish.n_purges
(gauge)
Purges executed. This metric is only provided by varnish 4.x.
shown as event
varnish.n_sess
(gauge)
sess structs made. This metric is only provided by varnish 3.x.
shown as object
varnish.n_sess_mem
(gauge)
sess_mem structs made. This metric is only provided by varnish 3.x.
shown as object
varnish.n_vampireobject
(gauge)
Unresurrected objects.
shown as object
varnish.n_vbc
(gauge)
vbc structs made. This metric is only provided by varnish 3.x.
shown as object
varnish.n_vcl
(gauge)
Total VCLs loaded.
shown as object
varnish.n_vcl_avail
(gauge)
Available VCLs.
shown as object
varnish.n_vcl_discard
(gauge)
Discarded VCLs.
shown as object
varnish.n_waitinglist
(gauge)
waitinglist structs made.
shown as object
varnish.n_wrk
(gauge)
Worker threads. This metric is only provided by varnish 3.x.
shown as thread
varnish.n_wrk_create
(gauge)
Worker threads created. This metric is only provided by varnish 3.x.
shown as event
varnish.n_wrk_drop
(gauge)
Dropped work requests. This metric is only provided by varnish 3.x.
shown as event
varnish.n_wrk_failed
(gauge)
Worker threads not created. This metric is only provided by varnish 3.x.
shown as event
varnish.n_wrk_lqueue
(gauge)
Work request queue length. This metric is only provided by varnish 3.x.
shown as event
varnish.n_wrk_max
(gauge)
Worker threads limited. This metric is only provided by varnish 3.x.
shown as event
varnish.n_wrk_queued
(gauge)
Queued work requests. This metric is only provided by varnish 3.x.
shown as event
varnish.pools
(gauge)
Thread pools. This metric is only provided by varnish 4.x.
varnish.s_bodybytes
(gauge)
Total body size. This metric is only provided by varnish 3.x.
shown as byte
varnish.s_fetch
(gauge)
Backend fetches.
shown as request
varnish.s_hdrbytes
(gauge)
Total header size. This metric is only provided by varnish 3.x.
shown as byte
varnish.s_pass
(gauge)
Passed requests.
shown as request
varnish.s_pipe
(gauge)
Pipe sessions seen.
shown as connection
varnish.s_pipe_hdrbytes
(gauge)
Total request bytes received for piped sessions. This metric is only provided by varnish 4.x.
shown as byte
varnish.s_pipe_in
(gauge)
Total number of bytes forwarded from clients in pipe sessions. This metric is only provided by varnish 4.x.
shown as byte
varnish.s_pipe_out
(gauge)
Total number of bytes forwarded to clients in pipe sessions. This metric is only provided by varnish 4.x.
shown as byte
varnish.s_req
(gauge)
Requests.
shown as request
varnish.s_req_bodybytes
(gauge)
Total request body bytes received. This metric is only provided by varnish 4.x.
shown as byte
varnish.s_req_hdrbytes
(gauge)
Total request header bytes received. This metric is only provided by varnish 4.x.
shown as byte
varnish.s_resp_bodybytes
(gauge)
Total response body bytes transmitted. This metric is only provided by varnish 4.x.
shown as byte
varnish.s_resp_hdrbytes
(gauge)
Total response header bytes transmitted. This metric is only provided by varnish 4.x.
shown as byte
varnish.s_sess
(gauge)
Client connections.
shown as connection
varnish.s_synth
(gauge)
Synthetic responses made. This metric is only provided by varnish 4.x.
shown as response
varnish.sess_closed
(gauge)
Client connections closed.
shown as connection
varnish.sess_conn
(gauge)
Client connections accepted. This metric is only provided by varnish 4.x.
shown as connection
varnish.sess_drop
(gauge)
Client connections dropped due to lack of worker thread. This metric is only provided by varnish 4.x.
shown as connection
varnish.sess_dropped
(gauge)
Client connections dropped due to a full queue. This metric is only provided by varnish 4.x.
shown as connection
varnish.sess_fail
(gauge)
Failures to accept a TCP connection. Either the client changed its mind, or the kernel ran out of some resource like file descriptors. This metric is only provided by varnish 4.x.
shown as connection
varnish.sess_herd
(gauge)

shown as connection
varnish.sess_linger
(gauge)
This metric is only provided by varnish 3.x.
shown as connection
varnish.sess_pipe_overflow
(gauge)
This metric is only provided by varnish 4.x.
shown as connection
varnish.sess_pipeline
(gauge)

shown as connection
varnish.sess_queued
(gauge)
Client connections queued to wait for a thread. This metric is only provided by varnish 4.x.
shown as connection
varnish.sess_readahead
(gauge)

shown as connection
varnish.shm_cont
(gauge)
SHM MTX contention.
shown as event
varnish.shm_cycles
(gauge)
SHM cycles through buffer.
shown as event
varnish.shm_flushes
(gauge)
SHM flushes due to overflow.
shown as event
varnish.shm_records
(gauge)
SHM records.
shown as event
varnish.shm_writes
(gauge)
SHM writes.
shown as event
varnish.SMA.s0.c_bytes
(gauge)
Total space allocated by this storage.
shown as byte
varnish.SMA.s0.c_fail
(gauge)
Times the storage has failed to provide a storage segment.
shown as event
varnish.SMA.s0.c_freed
(gauge)
Total space returned to this storage.
shown as byte
varnish.SMA.s0.c_req
(gauge)
Times the storage has been asked to provide a storage segment.
shown as event
varnish.SMA.s0.g_alloc
(gauge)
Storage allocations outstanding.
shown as event
varnish.SMA.s0.g_bytes
(gauge)
Space allocated from the storage.
shown as byte
varnish.SMA.s0.g_space
(gauge)
Space left in the storage.
shown as byte
varnish.SMA.Transient.c_bytes
(gauge)
Total space allocated by this storage.
shown as byte
varnish.SMA.Transient.c_fail
(gauge)
Times the storage has failed to provide a storage segment.
shown as event
varnish.SMA.Transient.c_freed
(gauge)
Total space returned to this storage.
shown as byte
varnish.SMA.Transient.c_req
(gauge)
Times the storage has been asked to provide a storage segment.
shown as event
varnish.SMA.Transient.g_alloc
(gauge)
Storage allocations outstanding.
shown as event
varnish.SMA.Transient.g_bytes
(gauge)
Space allocated from the storage.
shown as byte
varnish.SMA.Transient.g_space
(gauge)
Space left in the storage.
shown as byte
varnish.sms_balloc
(gauge)
SMS space allocated.
shown as byte
varnish.sms_bfree
(gauge)
SMS space freed.
shown as byte
varnish.sms_nbytes
(gauge)
SMS outstanding space.
shown as byte
varnish.sms_nobj
(gauge)
SMS outstanding allocations.
shown as event
varnish.sms_nreq
(gauge)
SMS allocator requests.
shown as event
varnish.thread_queue_len
(gauge)
Length of session queue waiting for threads. This metric is only provided by varnish 4.x.
shown as connection
varnish.threads
(gauge)
Number of threads. This metric is only provided by varnish 4.x.
shown as thread
varnish.threads_created
(gauge)
Threads created. This metric is only provided by varnish 4.x.
shown as thread
varnish.threads_destroyed
(gauge)
Threads destroyed. This metric is only provided by varnish 4.x.
shown as thread
varnish.threads_failed
(gauge)
Threads that failed to get created. This metric is only provided by varnish 4.x.
shown as thread
varnish.threads_limited
(gauge)
Threads that were needed but couldn't be created because of a thread pool limit. This metric is only provided by varnish 4.x.
shown as thread
varnish.uptime
(gauge)
varnish.vmods
(gauge)
Loaded VMODs. This metric is only provided by varnish 4.x.
shown as object
varnish.vsm_cooling
(gauge)
Space which will soon (max 1 minute) be freed in the shared memory used to communicate with tools like varnishstat, varnishlog etc. This metric is only provided by varnish 4.x.
shown as byte
varnish.vsm_free
(gauge)
Free space in the shared memory used to communicate with tools like varnishstat, varnishlog etc. This metric is only provided by varnish 4.x.
shown as byte
varnish.vsm_overflow
(gauge)
Data which does not fit in the shared memory used to communicate with tools like varnishstat, varnishlog etc. This metric is only provided by varnish 4.x.
shown as byte
varnish.vsm_overflowed
(gauge)
Total data which did not fit in the shared memory used to communicate with tools like varnishstat, varnishlog etc. This metric is only provided by varnish 4.x.
shown as byte
varnish.vsm_used
(gauge)
Used space in the shared memory used to communicate with tools like varnishstat, varnishlog etc. This metric is only provided by varnish 4.x.
shown as byte
varnish.n_purgesps
(rate)
Purges executed. This metric is only provided by varnish 4.x.
shown as event

Events

The Varnish check does not include any events at this time.

Service Checks

varnish.backend_healthy:

The Agent submits this service check if you configure varnishadm. It submits a service check for each Varnish backend, tagging each with backend:<backend_name>.

Troubleshooting

Need help? Contact Datadog Support.

Further Reading


Mistake in the docs? Feel free to contribute!