This article will help you get the Twemproxy plugin for sd-agent configured and returning metrics
Installing the twemproxy plugin package
Install the twemproxy plugin on Debian/Ubuntu:
sudo apt-get install sd-agent-twemproxy
Install the twemproxy plugin on RHEL/CentOS:
sudo yum install sd-agent-twemproxy
Read more about agent plugins.
Configuring the agent to monitor twemproxy
1. Configure the check in /etc/sd-agent/conf.d/twemproxy.yaml
init_config: instances: - host: localhost port: 2222 # change if your twemproxy doesn't use the default stats monitoring port
2. Restart the agent
sudo /etc/init.d/sd-agent restart
or
sudo systemctl restart sd-agent
Verifying the configuration
Execute info to verify the configuration with the following:
sudo /etc/init.d/sd-agent info
or
/usr/share/python/sd-agent/agent.py info
If the agent has been configured correctly you'll see an output such as:
twemproxy ----- - instance #0 [OK] - Collected * metrics
You can also view the metrics returned with the following command:
sudo -u sd-agent /usr/share/python/sd-agent/agent.py check twemproxy
Configuring graphs
Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the twemproxy metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.
Monitored metrics
Metric | Values |
---|---|
twemproxy.client_connections number of active client connections |
connection / None Type: float |
twemproxy.client_eof number of eof on client connections |
error / None Type: float |
twemproxy.client_err number of errors on client connections |
error / None Type: float |
twemproxy.curr_connections number of current connections |
connection / None Type: float |
twemproxy.forward_error number of times we encountered a forwarding error |
error / None Type: float |
twemproxy.in_queue number of requests in incoming queue |
request / None Type: float |
twemproxy.in_queue_bytes current request bytes in incoming queue |
byte / None Type: float |
twemproxy.out_queue number of requests in outgoing queue |
request / None Type: float |
twemproxy.out_queue_bytes current request bytes in outgoing queue |
byte / None Type: float |
twemproxy.request_bytes number of requests |
byte / None Type: float |
twemproxy.requests number of requests |
request / None Type: float |
twemproxy.response_bytes number of responses |
byte / None Type: float |
twemproxy.responses number of responses |
response / None Type: float |
twemproxy.server_connections number of active server connections |
connection / None Type: float |
twemproxy.server_ejects number of times backend server was ejected |
event / None Type: float |
twemproxy.server_eof number of eof on server connections |
error / None Type: float |
twemproxy.server_err number of errors on server connections |
error / None Type: float |
twemproxy.server_timedout number of timeouts on server connections |
timeout / None Type: float |
twemproxy.total_connections number of total connections |
connection / None Type: float |
Comments