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.
The Agent’s Twemproxy check is included in the Datadog Agent package, so you don’t need to install anything else on your Twemproxy servers.
To configure this check for an Agent running on a host:
Edit the twemproxy.d/conf.yaml
file in the conf.d/
folder at the root of your Agent’s configuration directory . See the sample twemproxy.d/conf.yaml for all available configuration options:
init_config :
instances :
- host : localhost
port : 2222
Copy
Restart the Agent to begin sending Twemproxy metrics to Datadog.
Collecting logs is disabled by default in the Datadog Agent, you need to enable it in datadog.yaml
:
Add this configuration block to your twemproxy.d/conf.yaml
file to start collecting your Apache Logs:
logs :
- type : file
path : "<LOG_FILE_PATH>"
source : twemproxy
service : "<SERVICE_NAME>"
Copy
Change the path
and service
parameter values and configure them for your environment. See the sample twemproxy.d/conf.yaml for all available configuration options.
Restart the Agent .
For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.
Parameter Value <INTEGRATION_NAME>
twemproxy
<INIT_CONFIG>
blank or {}
<INSTANCE_CONFIG>
{"host": "%%host%%", "port":"22222"}
Collecting logs is disabled by default in the Datadog Agent. To enable it, see Kubernetes log collection documentation .
Parameter Value <LOG_CONFIG>
{"source": "twemproxy", "service": "<SERVICE_NAME>"}
Run the Agent’s status subcommand and look for twemproxy
under the Checks section.
twemproxy.client_connections (gauge)number of active client connectionsShown as connection twemproxy.client_eof (gauge)number of eof on client connectionsShown as error twemproxy.client_err (gauge)number of errors on client connectionsShown as error twemproxy.curr_connections (gauge)number of current connectionsShown as connection twemproxy.forward_error (gauge)number of times we encountered a forwarding errorShown as error twemproxy.fragments (gauge)number of fragments created from a multi-vector requestShown as request twemproxy.in_queue (gauge)number of requests in incoming queueShown as request twemproxy.in_queue_bytes (gauge)current request bytes in incoming queueShown as byte twemproxy.out_queue (gauge)number of requests in outgoing queueShown as request twemproxy.out_queue_bytes (gauge)current request bytes in outgoing queueShown as byte twemproxy.request_bytes (gauge)total request bytesShown as byte twemproxy.requests (gauge)number of requestsShown as request twemproxy.response_bytes (gauge)total response bytesShown as byte twemproxy.responses (gauge)number of responsesShown as response twemproxy.server_connections (gauge)number of active server connectionsShown as connection twemproxy.server_ejects (gauge)number of times backend server was ejectedShown as event twemproxy.server_eof (gauge)number of eof on server connectionsShown as error twemproxy.server_err (gauge)number of errors on server connectionsShown as error twemproxy.server_timedout (gauge)number of timeouts on server connectionsShown as timeout twemproxy.total_connections (gauge)rate of new connectionsShown as connection
The Twemproxy check does not include any events.
twemproxy.can_connect Returns Critical if the Agent cannot send data to the Twemproxy endpoint, OK otherwise.Statuses: ok, critical
Need help? Contact Datadog support .