This extension works only with the standalone machine agent.
##Use Case
HAProxy is an open source, high performance TCP/HTTP Load Balancer commonly used to improve the performance of web sites and services by spreading requests across multiple servers. The HAProxy Monitoring extension collects key metrics from HAProxy Load balancer of the underlying proxies/servers and presents them to the AppDynamics Metric Browser.
Notes: Works with HAProxy v 1.3 and above.
##Installation
- Run
mvn clean install
from the haproxy-monitoring-extension directory and find the HAProxyMonitor.zip in the "target" folder. - Unzip as "HAProxyMonitor" and copy the "HAProxyMonitor" directory to
<MACHINE_AGENT_HOME>/monitors
- In
<MACHINE_AGENT_HOME>/monitors/HAProxyMonitor/
, open monitor.xml and configure the HAProxy parameters.
<argument name="host" is-required="true" default-value="demo.1wt.eu"/>
<argument name="port" is-required="true" default-value="80"/>
<!--URI of the haproxy CSV stats url. See the 'CSV Export' link on your haproxy stats page -->
<argument name="csv-export-uri" is-required="true" default-value=";csv"/>
<argument name="username" is-required="false" default-value=""/>
<argument name="password" is-required="false" default-value=""/>
<!--proxy names you wish to monitor as a comma separated values. If empty all the proxies are monitored -->
<argument name="proxynames" is-required="false" default-value=""/>
<!--HA Proxy stats as a comma separated values to be excluded from monitoring -->
<argument name="excludeStats" is-required="false" default-value="pid,iid,sid"/>
<argument name="metric-prefix" is-required="false" default-value="Custom Metrics|HAProxy|"/>
- Restart the Machine Agent.
In the AppDynamics Metric Browser, look for: Application Infrastructure Performance | <Tier> | Custom Metrics | HAProxy
##Password Encryption Support
To avoid setting the clear text password in the monitor.xml. Please follow the process to encrypt the password and set the encrypted password and the key in the monitor.xml
- Download the util jar to encrypt the password from https://github.com/Appdynamics/maven-repo/raw/master/releases/com/appdynamics/appd-exts-commons/1.1.2/appd-exts-commons-1.1.2.jar
- Encrypt password from the commandline java -cp "appd-exts-commons-1.1.2.jar" com.appdynamics.extensions.crypto.Encryptor myKey myPassword
- Add the following properties in the monitor.xml substituting the default password argument.
<argument name="password-encrypted" is-required="true" default-value="<ENCRYPTED_PASSWORD>"/> <argument name="encryption-key" is-required="true" default-value="myKey"/>
All the HA proxy metrics are shown. For the complete list of metrics please visit http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#9
##Contributing
Always feel free to fork and contribute any changes directly here on GitHub.
##Community
Find out more in the AppSphere community.
##Support
For any questions or feature request, please contact AppDynamics Support.