Skip to main content

AWS CloudWatch Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a sync or streaming data flow that sends data to an AWS CloudWatch location.
aws_cloudwatch_api.png

AWS CloudWatch

Create an AWS CloudWatch Destination

  1. Click the + icon on the Nexset that will be sent to the AWS CloudWatch destination, and select the Send to Destination option from the menu.

  2. Select the AWS CloudWatch connector from the list of available destination connectors. Then, select the credential that will be used to connect to the AWS CloudWatch organization, and click Next; or, create a new AWS CloudWatch credential for use in this flow.

  3. In Nexla, AWS CloudWatch destinations can be created using pre-built endpoint templates, which expedite destination setup for common AWS CloudWatch endpoints. Each template is designed specifically for the corresponding AWS CloudWatch endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    AWS CloudWatch destinations can also be configured manually, allowing you to send data to AWS CloudWatch endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common AWS CloudWatch endpoints. Each template is designed specifically for the corresponding AWS CloudWatch endpoint, making destination setup easy and efficient.

  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

    PutMetricData

    This endpoint publishes metric data points to AWS CloudWatch. Use this endpoint when you need to send custom metrics, application metrics, or business metrics to CloudWatch for monitoring and alerting purposes.

    • This endpoint uses POST requests to the CloudWatch API endpoint with the Action=PutMetricData query parameter. The endpoint URL is automatically constructed based on your credential configuration as https://monitoring.{'{region}'}.amazonaws.com?Action=PutMetricData.
    • The endpoint sends data from your Nexset as the request body in JSON format. Each record in your Nexset will be sent as a metric data point to CloudWatch. The request body should follow the AWS CloudWatch API specification for PutMetricData, including Namespace, MetricData array with MetricName, Value, Timestamp, Dimensions, and other optional parameters.
    • Ensure your Nexset data includes the required fields for CloudWatch metric data points: Namespace (the namespace for the metric), MetricName (the name of the metric), Value (the value of the metric), and Timestamp (the time the metric data was collected). Optional fields include Dimensions (key-value pairs that define the metric), Unit (the unit of measure), and StatisticValues (for aggregated metrics).
    • Batch mode is disabled by default for this endpoint. Each record in your Nexset will be sent as a separate API request to CloudWatch. If you need to send multiple metric data points in a single request, you can enable batch mode in the advanced settings, but note that CloudWatch has limits on the number of metric data points per request (up to 20 metric data points per PutMetricData call).

    The request body must be properly formatted JSON that matches the AWS CloudWatch API specification for PutMetricData. The JSON should include a Namespace field and a MetricData array containing one or more metric data points. Each metric data point should include MetricName, Value, Timestamp, and optionally Dimensions, Unit, and StatisticValues. The endpoint requires AWS Signature Version 4 authentication, which is handled automatically by your credential configuration. Batch mode is disabled by default (batch.mode: false), so each record will be sent as a separate request. For detailed information about PutMetricData parameters, request formatting, and response structures, see the AWS CloudWatch API documentation.

    PutDashboard

    This endpoint creates or updates a CloudWatch dashboard with the specified configuration. Use this endpoint when you need to programmatically create or update CloudWatch dashboards for monitoring and visualization purposes.

    • This endpoint uses POST requests to the CloudWatch API endpoint with the Action=PutDashboard query parameter. The endpoint URL is automatically constructed based on your credential configuration as https://monitoring.{'{region}'}.amazonaws.com?Action=PutDashboard.
    • The endpoint sends data from your Nexset as the request body in JSON format. Each record in your Nexset should contain the dashboard configuration following the AWS CloudWatch API specification for PutDashboard, including DashboardName (the name of the dashboard) and DashboardBody (a JSON string containing the complete dashboard configuration with widgets, metrics, and visualization settings).
    • Ensure your Nexset data includes the required fields for CloudWatch dashboard creation: DashboardName (the name of the dashboard) and DashboardBody (a JSON string containing the dashboard configuration). The DashboardBody should be a valid JSON string that defines the dashboard widgets, metrics, and visualization settings according to CloudWatch dashboard syntax.
    • Batch mode is disabled by default for this endpoint. Each record in your Nexset will be sent as a separate API request to CloudWatch. If you need to create or update multiple dashboards, you can send multiple records, but each will be processed as a separate PutDashboard request.

    The request body must be properly formatted JSON that matches the AWS CloudWatch API specification for PutDashboard. The JSON should include DashboardName and DashboardBody fields. The DashboardBody must be a valid JSON string containing the complete dashboard configuration with widgets, metrics, and visualization settings. The endpoint requires AWS Signature Version 4 authentication, which is handled automatically by your credential configuration. Batch mode is disabled by default (batch.mode: false), so each record will be sent as a separate request. For detailed information about PutDashboard parameters, request formatting, and response structures, see the AWS CloudWatch API documentation.

Configure Manually

AWS CloudWatch destinations can be manually configured to send data to any valid AWS CloudWatch API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the AWS CloudWatch API from the Method pulldown menu. The AWS CloudWatch API primarily uses POST requests for data writing operations. The most common methods are:

    • POST: For sending data to the API or creating/updating resources (most common for CloudWatch)
    • PUT: For updating existing data
    • PATCH: For partial updates to existing data
    • DELETE: For removing data

API Endpoint URL

  1. Enter the URL of the AWS CloudWatch API endpoint to which this destination will send data in the Set API URL field. This should be the complete URL including the protocol (https://) and any required path parameters. AWS CloudWatch API endpoints typically follow the pattern https://monitoring.{'{region}'}.amazonaws.com?Action={'{ActionName}'} where {region} is your AWS region and {ActionName} is the CloudWatch API action you want to execute.

Ensure the API endpoint URL is correct and accessible with your current credentials. The CloudWatch API endpoint URL is automatically constructed based on your credential's region setting as https://monitoring.{'{region}'}.amazonaws.com. You can test the endpoint using the Test button after configuring the URL. For detailed information about AWS CloudWatch API endpoints and available actions, see the AWS CloudWatch API documentation.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this destination, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2). Additional headers are often required for API versioning, content type specifications, or custom authentication requirements.

    You do not need to include any headers already present in the credentials. Common headers like Authorization, Content-Type, and Accept are typically handled automatically by Nexla based on your credential configuration. AWS CloudWatch API requests use AWS Signature Version 4 authentication, which is handled automatically by your credential configuration. The Content-Type header is typically set to application/json for CloudWatch API requests.

Request Body

Optional
  • If the API endpoint requires a specific request body format, configure how Nexla should format the request body from your Nexset data. The request body can be sent as JSON, XML, or form data, depending on the API endpoint requirements.

    • For JSON format, select JSON from the Request Body Format dropdown, and the Nexset data will be sent as a JSON object in the request body. AWS CloudWatch API endpoints typically use JSON format for request bodies.

    • For XML format, select XML from the Request Body Format dropdown, and the Nexset data will be converted to XML format in the request body.

    • For Form data format, select Form Data from the Request Body Format dropdown, and the Nexset data will be sent as form-encoded data in the request body.

The request body format should match the requirements of the specific CloudWatch API endpoint you're using. Most CloudWatch API endpoints use JSON format for request bodies. Ensure your Nexset data structure matches the expected format for the API endpoint, including required fields, data types, and nested structures as specified in the AWS CloudWatch API documentation.

Save & Activate the Destination

  1. Once all of the relevant steps in the above sections have been completed, click the Create button in the upper right corner of the screen to save and create the new AWS CloudWatch destination. Nexla will now begin sending data from the selected Nexset to the configured endpoint.