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.
HAProxy Monitoring Extension works with HAProxy v1.3 and above.
In order to use this extension, you do need a Standalone JAVA Machine Agent or SIM Agent. For more details on downloading these products, please visit here. The extension needs to be able to connect to the HAProxy in order to collect and send metrics. To do this, you will have to either establish a remote connection in between the extension and the product, or have an agent on the same machine running the product in order for the extension to collect and send the metrics.
Please place the extension in the "monitors" directory of your Machine Agent installation directory. Do not place the extension in the "extensions" directory of your Machine Agent installation directory. In the AppDynamics Metric Browser, look for Application Infrastructure Performance|<Tier>|Custom Metrics|HAProxy and you should be able to see all the metrics.
Configure the extension by editing the config.yml file in
Configure the "COMPONENT_ID" under which the metrics need to be reported. This can be done by changing the value of
<COMPONENT_ID> in metricPrefix: Server|Component:<COMPONENT_ID>|Custom Metrics|HAProxy|. For example,
metricPrefix: "Server|Component:100|Custom Metrics|HAProxy|"
The extension supports reporting metrics from multiple HAProxy instances. The monitor provides an option to add HAProxy server/s for monitoring the metrics provided by the particular end-point. Have a look at config.yml for more details. For example:
metricPrefix: "Server|Component:<COMPONENT_ID>|Custom Metrics|HAProxy|" servers: - displayName: "Local HAProxy" host: "demo.haproxy.org" port: 80 csvExportUri: ";csv" username: "" password: "" encryptedPassword: "" useSsl: false connection: connectTimeout: 10000 socketTimeout: 10000
Configure the numberOfThreads. For example, If number of servers that need to be monitored is 5, then number of threads required is 5 * 1 = 5
You can add/remove metrics of your choice by modifying the provided metrics.xml file. This file consists of all the metrics that will be monitored and sent to the controller. Please look how the metrics have been defined and follow the same convention, when adding new metrics. You do have the ability to chosoe your Rollup types as well as set an alias that you would like to be displayed on the metric browser.
pxnameProxy Name and
svnameService Name as under the servers tag as shown below.
<proxy-servers name="proxy-servers"> <servers pxname="http-in" svname="FRONTEND" /> </proxy-servers>
metricto be monitored under the metric tag as shown below.
<stat name="metrics"> <metric attr="qcur" alias="queued_requests" column="2" aggregationType = "OBSERVATION" timeRollUpType = "CURRENT" clusterRollUpType = "COLLECTIVE" /> </stat>
For configuring the metrics, the following properties can be used:
|Property||Default value||Possible values||Description|
|alias||metric name||Any string||The substitute name to be used in the metric browser instead of metric name.|
|aggregationType||"AVERAGE"||"AVERAGE", "SUM", "OBSERVATION"||Aggregation qualifier|
|timeRollUpType||"AVERAGE"||"AVERAGE", "SUM", "CURRENT"||Time roll-up qualifier|
|clusterRollUpType||"INDIVIDUAL"||"INDIVIDUAL", "COLLECTIVE"||Cluster roll-up qualifier|
|multiplier||1||Any number||Value with which the metric needs to be multiplied.|
|convert||null||Any key value map||Set of key value pairs that indicates the value to which the metrics need to be transformed. eg: UP:1, OPEN:1|
|delta||false||true, false||If enabled, gives the delta values of metrics instead of actual values.|
All these metric properties are optional, and the default value shown in the table is applied to the metric (if a property has not been specified) by default.
Please visit this page to get detailed instructions on password encryption. The steps in this document will guide you through the whole process.
Workbench is an inbuilt feature provided with each extension in order to assist you to fine tune the extension setup before you actually deploy it on the controller. Please review the following document on How to use the Extensions WorkBench.
Please follow the steps listed in this troubleshooting-document in order to troubleshoot your issue. These are a set of common issues that customers might have faced during the installation of the extension. If these don't solve your issue, please follow the last step on the troubleshooting-document to contact the support team.
If after going through the Troubleshooting Document you have not been able to get your extension working, please file a ticket and add the following information.
Please provide the following in order for us to assist you better.
1. Stop the running machine agent. 2. Delete all existing logs under <MachineAgent>/logs. 3. Please enable debug logging by editing the file <MachineAgent>/conf/logging/log4j.xml. Change the level value of the following <logger> elements to debug. <logger name="com.singularity"> <logger name="com.appdynamics"> 4. Start the machine agent and please let it run for 10 mins. Then zip and upload all the logs in the directory <MachineAgent>/logs/*. 5. Attach the zipped <MachineAgent>/conf/* directory here. 6. Attach the zipped <MachineAgent>/monitors/ExtensionFolderYouAreHavingIssuesWith directory here.
For any support related questions, you can also contact firstname.lastname@example.org.
Always feel free to fork and contribute any changes directly here on GitHub.
|Controller Compatibility||3.7 or Later|
|Product Tested On||1.7.5|