Docs » Integrations Guide » Use the Smart Agent » Monitors » telegraf/varnish

telegraf/varnish 🔗

Monitor Type: telegraf/varnish (Source)

Accepts Endpoints: Yes

Multiple Instances Allowed: Yes

Overview 🔗

This is an embedded form of the Telegraf Varnish plugin.

Keep in mind this monitor will use varnishstat command so the signalfx-agent needs to be run on the same host as the varnish server.

Also, signalfx-agent should have permission to run this command properly:

usermod -a -G varnish signalfx-agent

For more information check telegraf official documentation but do not forget to adapt commands using signalfx-agent instead of telegraf.

Configuration 🔗

To activate this monitor in the Smart Agent, add the following to your agent config:

monitors:  # All monitor config goes under this key
 - type: telegraf/varnish
   ...  # Additional config

For a list of monitor options that are common to all monitors, see Common Configuration.

Config option Required Type Description
useSudo no bool If running as a restricted user enable this flag to prepend sudo. (default: false)
binary no string The location of the varnishstat binary. (default: /usr/bin/varnishstat)
stats no list of strings Which stats to gather. Glob matching can be used (i.e. stats = ["MAIN.*"]). Stats []string yaml:"stats" default:"[\"MAIN.cache_hit\", \"MAIN.cache_miss\", \"MAIN.uptime\"]" (default: [MAIN.*])
instanceName no string Optional name for the varnish instance to query. It corresponds to -n parameter value.

Metrics 🔗

These are the metrics available for this monitor. Metrics that are categorized as container/host (default) are in bold and italics in the list below.

  • varnish.backend_busy (gauge)
    Maximum number of connections to a given backend.
  • varnish.backend_conn (gauge)
    Successful connections to a given backend.
  • varnish.backend_fail (gauge)
    Failed connections for a given backend.
  • varnish.backend_recycle (gauge)
    Backend connections with keep-alive that are returned to the pool of connections.
  • varnish.backend_req (gauge)
    Number of requests to the backend.
  • varnish.backend_reuse (gauge)
    Recycled connections that has were reused.
  • varnish.backend_toolate (gauge)
    Backend connections closed because they were idle too long.
  • varnish.backend_unhealthy (gauge)
    Backend connections not tried because the backend was unhealthy.
  • varnish.cache_hit (cumulative)
    Requests served from the cache.
  • varnish.cache_hitpass (cumulative)
    Requests passed to a backend where the decision to pass them found in the cache..
  • varnish.cache_miss (cumulative)
    Requests fetched from a backend server.
  • varnish.client_req (cumulative)
    Good client requests.
  • varnish.n_lru_nuked (cumulative)
    Objects forcefully evicted from the cache because of a lack of space.
  • varnish.sess_dropped (gauge)
    Sessions dropped due to a full queue.
  • varnish.sess_queued (gauge)
    Client connections queued to wait for a thread..
  • varnish.thread_queue_len (gauge)
    Length of session queue waiting for threads.
  • varnish.threads (gauge)
    Number of threads in all pools.
  • varnish.threads_created (gauge)
    Number of times a thread has been created.
  • varnish.threads_failed (gauge)
    Number of times that Varnish unsuccessfully tried to create a thread.
  • varnish.threads_limited (gauge)
    Threads that were needed but couldn’t be created because of a thread pool limit.

Non-default metrics (version 4.7.0+) 🔗

To emit metrics that are not default, you can add those metrics in the generic monitor-level extraMetrics config option. Metrics that are derived from specific configuration options that do not appear in the above list of metrics do not need to be added to extraMetrics.

To see a list of metrics that will be emitted you can run agent-status monitors after configuring this monitor in a running agent instance.

Dimensions 🔗

The following dimensions may occur on metrics emitted by this monitor. Some dimensions may be specific to certain metrics.

Name Description
plugin The plugin name "telegraf/varnish".
section Varnish section ("MAIN", "MGT", "MEMPOOL", "SMA", "VBE", "LCK").