Datadog-Twemproxy Integration

Overview

Track overall and per-pool stats on each of your twemproxy servers. This Agent check collects metrics for client and server connections and errors, request and response rates, bytes in and out of the proxy, and more.

Setup

Installation

The Agent’s twemproxy check is packaged with the Agent, so simply install the Agent on each of your Twemproxy servers.

Configuration

Create a file twemproxy.yaml in the Agent’s conf.d directory. See the sample twemproxy.yaml for all available configuration options:

init_config:

instances:
    - host: localhost
      port: 2222 # change if your twemproxy doesn't use the default stats monitoring port

Restart the Agent to begin sending twemproxy metrics to Datadog.

Validation

Run the Agent’s info subcommand and look for twemproxy under the Checks section:

  Checks
  ======
    [...]

    twemproxy
    -------
      - instance #0 [OK]
      - Collected 20 metrics, 0 events & 1 service check

    [...]

Compatibility

The twemproxy check is compatible with all major platforms.

Data Collected

Metrics

twemproxy.curr_connections
(gauge)
number of current connections
shown as connection
twemproxy.total_connections
(rate)
number of total connections
shown as connection
twemproxy.client_eof
(gauge)
number of eof on client connections
shown as error
twemproxy.client_err
(gauge)
number of errors on client connections
shown as error
twemproxy.client_connections
(gauge)
number of active client connections
shown as connection
twemproxy.server_ejects
(gauge)
number of times backend server was ejected
shown as event
twemproxy.forward_error
(gauge)
number of times we encountered a forwarding error
shown as error
twemproxy.fragments
(gauge)
number of fragments created from a multi-vector request
shown as request
twemproxy.in_queue
(gauge)
number of requests in incoming queue
shown as request
twemproxy.out_queue
(gauge)
number of requests in outgoing queue
shown as request
twemproxy.in_queue_bytes
(gauge)
current request bytes in incoming queue
shown as byte
twemproxy.out_queue_bytes
(gauge)
current request bytes in outgoing queue
shown as byte
twemproxy.server_connections
(gauge)
number of active server connections
shown as connection
twemproxy.server_err
(gauge)
number of errors on server connections
shown as error
twemproxy.server_timedout
(gauge)
number of timeouts on server connections
shown as timeout
twemproxy.server_eof
(gauge)
number of eof on server connections
shown as error
twemproxy.responses
(rate)
number of responses
shown as response
twemproxy.requests
(rate)
number of requests
shown as request
twemproxy.response_bytes
(rate)
number of responses
shown as byte
twemproxy.request_bytes
(rate)
number of requests
shown as byte

Events

The Twemproxy check does not include any event at this time.

Service Checks

twemproxy.can_connect:

Returns CRITICAL if the Agent cannot connect to the Twemproxy stats endpoint to collect metrics, otherwise OK.

Troubleshooting

Need help? Contact Datadog Support.

Further Reading

Learn more about infrastructure monitoring and all our integrations on our blog