amazon-cloudwatch-agent icon indicating copy to clipboard operation
amazon-cloudwatch-agent copied to clipboard

Add AMP as a metrics destination

Open sky333999 opened this issue 1 year ago • 1 comments

Description of changes

Introduce the ability to publish metrics to Amazon Managed Prometheus as a destination. Key highlights:

  • Add metrics_destinations under metrics section of the agent config. The two supported destinations are cloudwatch (default if unspecified) and amp.
  • amp destination requires the workspace_id as a required input. The remote write endpoint is built using a regex on top of the workspace ID.
  • Leverages the prometheusremotewriteexporter to publish metrics to AMP.
  • Attaches the sigv4authextension to sign API calls made to AMP using AWS credentials.
  • Extract rollup_dimensions and drop_original_metrics functionality into a new processor that can be applied to non-cloudwatch destinations.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

Manually tested changes on an EC2 to publish cpu metrics to AMP. Screenshot 2024-05-28 at 11 26 16 PM

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

sky333999 avatar May 28 '24 15:05 sky333999

This PR was marked stale due to lack of activity.

github-actions[bot] avatar Jun 11 '24 00:06 github-actions[bot]

This PR was marked stale due to lack of activity.

github-actions[bot] avatar Sep 04 '24 00:09 github-actions[bot]