Captures statistics for APIs in the API Gateway from Amazon CloudWatch and displays them in the AppDynamics Metric Browser.
- Please give the following permissions to the account being used to with the extension.
- cloudwatch:ListMetrics
- cloudwatch:GetMetricStatistics
- Before the extension is installed, the prerequisites mentioned here need to be met. Please do not proceed with the extension installation if the specified prerequisites are not met.
- Download and install Apache Maven which is configured with
Java 8
to build the extension artifact from source. You can check the java version used in maven using commandmvn -v
ormvn --version
. If your maven is using some other java version then please download java 8 for your platform and set JAVA_HOME parameter before starting maven. - The extension needs to be able to connect to AWS Cloudwatch 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.
- Clone the "aws-api-gateway-monitoring-extension" repo using
git clone <repoUrl>
command. - Run 'mvn clean install' from aws-api-gateway-monitoring-extension
- Copy and unzip AWSAPIGatewayMonitor-<version>.zip from 'target' directory into <machine_agent_dir>/monitors/
- Edit config.yml file in AWSAPIGatewayMonitor and provide the required configuration (see Configuration section).
- Restart the Machine Agent.
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 order to use the extension, you need to update the config.yml file that is present in the extension folder. The following is a step-by-step explanation of the configurable fields that are present in the config.yml file.
-
If SIM is enabled, then use the following metricPrefix
metricPrefix: "Custom Metrics|AWS APIGateway"
Else, 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|AWS APIGateway|".For example, ``` metricPrefix: "Server|Component:100|Custom Metrics|AWS APIGateway|" ```
More details around metric prefix can be found here.
-
Provide accessKey(required) and secretKey(required) of our account(s), also provide displayAccountName(any name that represents your account) and regions(required). If you are running this extension inside an EC2 instance which has IAM profile configured then you don't have to configure these values, extension will use IAM profile to authenticate.
accounts: - awsAccessKey: "XXXXXXXX1" awsSecretKey: "XXXXXXXXXX1" displayAccountName: "TestAccount_1" regions: ["us-east-1","us-west-1","us-west-2"] - awsAccessKey: "XXXXXXXX2" awsSecretKey: "XXXXXXXXXX2" displayAccountName: "TestAccount_2" regions: ["eu-central-1","eu-west-1"]
-
Provide the list of Api Ids that needs to be monitored. This list accepts regular expressions. (Previously api names were expected but the field has been deprecated)
apiId: ["api1", "api2"]
-
Configure the
metricsConfig
section to control how metrics are collected from CloudWatch:metricsTimeRange: Controls the time window for metric collection
startTimeInMinsBeforeNow
: How many minutes back from current time to start collecting metrics (default: 60)endTimeInMinsBeforeNow
: How many minutes back from current time to end collecting metrics (default: 0, meaning current time)
getMetricStatisticsRateLimit: Rate limit per second for CloudWatch GetMetricStatistics API calls (default: 400). This helps avoid hitting AWS API throttling limits. See AWS CloudWatch limits for more details.
maxErrorRetrySize: Maximum number of retry attempts for failed requests or throttling errors (default: 0, meaning no retries).
defaultPeriod: Default time period in seconds for all metrics. Must be a multiple of 60 (default: 300). Valid values include 60, 300, 3600, etc. Individual metrics can override this using the 'period' field in their specific configuration.
metricsConfig: metricsTimeRange: startTimeInMinsBeforeNow: 60 endTimeInMinsBeforeNow: 0 getMetricStatisticsRateLimit: 400 maxErrorRetrySize: 0 defaultPeriod: 300
- 4XXError - The number of client-side errors captured in a specified period.
- 5XXError - The number of server-side errors captured in a given period.
- CacheHitCount - The number of requests served from the API cache in a given period.
- CacheMissCount - The number of requests served from the back end in a given period, when API caching is enabled.
- Count - The total number API requests in a given period.
- IntegrationLatency - The time between when API Gateway relays a request to the back end and when it receives a response from the back end.
- Latency - The time between when API Gateway receives a request from a client and when it returns a response to the client. The latency includes the integration latency and other API Gateway overhead.
Apart from the above metric, we also have a metric called "API calls", that gives out the number of cloudwatch API calls from the extension.
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.
Always feel free to fork and contribute any changes directly here on GitHub.
Name | Version |
---|---|
Extension Version | 2.0.6 |
Last Update | 28/05/2021 |
Changes list | ChangeLog |
Note: While extensions are maintained and supported by customers under the open-source licensing model, they interact with agents and Controllers that are subject to AppDynamics’ maintenance and support policy. Some extensions have been tested with AppDynamics 4.5.13+ artifacts, but you are strongly recommended against using versions that are no longer supported.