CLOUDWATCH MULE® INTEGRATION

Configuration

The CloudWatch Mule® Integration is a CloudWatch custom integration and it is configured through a conf.yml file located at  /home/cmi-agent/iocs/conf/conf.yml  in Linux systems

The configuration in the conf.yml is divided into two parts:

  • init_config: A common part used by all the executions
  • instances A list of instances to be scheduled independently

init_config

This section contains the common configuration used by all the instance executions. It contains the following configurations:

  • hosts: Grouping of all the hosts' definitions needed to read the metrics out of the Anypoint Platform. Some hosts are specific to some APIs, if so, it is specified in the description:

  • anypoint: The Anypoint server host URL. It is preconfigured with https://anypoint.mulesoft.com but it could be different for EU or GOV Mule Regions, see https://docs.mulesoft.com/access-management/managing-users#prerequisites

  • object_store_v2: Object Store V2 server host URL. See https://docs.mulesoft.com/object-store/osv2-apis for the full list of available hosts. This host definition is used by the Object Store API. Example value: https://object-store-us-east-1.anypoint.mulesoft.com

  • Object Store V2: Object Store V2 Stats API. It is preconfigured with https://object-store-stats.anypoint.mulesoft.com

  • mule_server: This is the URL or IP address of the server where a Mule Runtime with the Mule Agent is running. The MULE_SERVER host definition is utilized by the ARM APIs. For example, the value might be http://localhost:9999.

  • auth_provider: This is the OAuth Provider URL responsible for obtaining a Bearer token used for making requests to all the APIs. By default, it is preconfigured with https://anypoint.mulesoft.com/accounts/api/v2/oauth2/token. However, please note that it might differ for EU or GOV Mule Regions. For specific configurations in these regions, refer to the documentation at link to documentation, see https://docs.mulesoft.com/access-management/managing-users#prerequisites

  • username: The user name for the authentication API

  • aws_secret_name: The AWS Secret Manager Name where the password for the authentication API is stored.

  • env_id: The Environment ID for environment-specific requests

  • org_id: The Organization ID for the requests that require to specify it

  • api_key:The API key provided when you purchased the product

  • customer_key: The Customer key provided when you purchased the product

  • connection_wait_time: The number of seconds that authentication method will wait until the next retry. If not specified it defaults to 2

  • connection_attempts_num: The number of retry attempts that the authentication method will perform. If not specified it defaults to 3

  •  

In the Full Example section, there is an example of a configuration file with all the values configured.

instances

This section contains a list of instances defined following the YAML list item notation -. Each instance is scheduled independently to run a set of APIs with a specific threads number configuration. Each instance contains the following configurations:

  • min_collection_interval: The time in seconds between executions. If not specified it defaults to 15 seconds
  • threads: The number of allowed parallel threads running the instance
  • api_filter: If not specified, all the APIs are executed, otherwise it must contain a list of APIs to run within the instance following the YAML list item notation

In the Full Example section, there is an example of a configuration file with a list of instances. The example is taken directly from the  conf.yml file distributed with the integration and contains the optimum numbers we recommend for almost any scenario for min_collection_interval and threads.

The metric collection of any instance can be disabled at any time by commenting out the whole instance. This means, commenting on the two attributes mentioned above.

Configuration process

The instances section contains a list of instances that were set to a periodicity and concurrency level according to each API-provided information. Even if all these values can be changed, we recommend just go with the defaults.

The main configuration parameters to pay attention to are:

  • object_store_v2.

  • mule_server

  • username

  • aws_secret_name.

  • env_id.

  • org_id.

  • api_key

  • customer_key.

For EU or GOV Mule Regions, the anypointand oauth_provider should be changed too. See https://docs.mulesoft.com/access-management/managing-users#prerequisites