Skip to content

AWS Metrics from CloudWatch

Overview

AWS Metrics from CloudWatch integration will poll all your metrics from specified AWS account every 10 minutes, with one exception so far which is S3 metrics that are avaliable on CloudWatch side daily. Tags and metric definitions are pulled every 5 minutes. As a prerequisite, you need to first prepare an AWS IAM policy and role with this CloudFormation template

For more information about this integration, click here.

How to use with Terraform

To deploy this integration using Terraform, you can use the coralogix_integration resource provided by the Coralogix Terraform provider. Below is an example configuration:

resource "coralogix_integration" "aws-metrics-collector" {
  integration_key = "aws-metrics-collector"
  version         = "0.9.1"

  parameters = {
    IntegrationName       = "cx-aws-cw-metrics"
    AwsRoleArn            = "arn:aws:iam::012345678901:role/access-cloudwatch-metrics"
    AwsRegion             = "eu-west-1"
    ApplicationName       = "<ApplicationName>"
    SubsystemName         = "<SubsystemName>"
    MetricNamespaces      = [ "value1", "value2" ]
    Statistics            = [ "Maximum", "Minimum", "SampleCount", "Sum", "Average" ]
    WithAggregations      = false
    EnrichWithTags        = true
    DiscoverNamespaces    = false
    IncludeLinkedAccounts = false
  }
}

Replace the placeholder values with your actual configuration parameters. Refer to the parameter table below for required fields and their descriptions.

Revisions

0.9.0
NameTypeRequiredDescription
ApplicationNameStringYesThe application name to be used in the integration. Added as the cx_application_name label to each metric.
AwsRegionStringYesSelect the AWS region from which to retrieve metrics. Choose the region where your resources are hosted.
AwsRoleArnStringYesThe ARN of the role that trusts the Coralogix AWS account.
DiscoverNamespacesBooleanYesEnable this option to automatically discover and collect metrics from all available CloudWatch and custom namespaces for your AWS account. This may increase AWS costs and metrics may take time to appear as namespaces are discovered.
EnrichWithTagsBooleanYesAdd resource tags as labels to specific resource metrics.
IncludeLinkedAccountsBooleanYesIf your account is a CloudWatch Monitoring Account, you can enable this option to try to fetch metrics from all linked accounts.
IntegrationNameStringYes
MetricNamespacesListYesSelect the metric namespaces to specify which metrics to collect. If left empty, no metrics will be collected.
StatisticsListYesSelect statistics to be collected.
SubsystemNameStringYesThe subsystem name to be used in the integration. Added as the cx_subsystem_name label to each metric.
WithAggregationsBooleanYesAdd optional aggregation metrics for Minimum and Maximum statistics. This will create additional metrics with suffixes _min and _max. Note that this can result in increased data usage. The same data results can be achieved using queries.
CustomMetricNamespacesStringNoEnter your custom metric namespaces to specify which metrics to collect. If left empty, no metrics will be collected.
EcsEnhancedMonitoringEnabledBooleanNoEnable ECS Enhanced Monitoring for additional metrics and ECS service and container_instances tags. Note that this will result in increased data usage. The following permissions are required: ecs::Describe* and ecs::List*. Permissions without an * can be found in the changelog.
ElastiCacheEnhancedMonitoringEnabledBooleanNoEnable ElastiCache Enhanced Monitoring for additional metrics. Note that this will result in increased data usage. The following permissions are required: elasticache:DescribeCacheClusters, elasticache:ListTagsForResource and ec2:DescribeInstanceTypes.
ExtendedStatisticsToCollectJSONNoEnter a JSON-formatted string containing additional statistics, they will be collected only for metrics matching selected Metric Namespaces. If you do not want any additional statistics put [] as a value. Example: [{\"metric_selector\":{\"namespace\": \"AWS/EC2\", \"metric_names\": [\"CPUUtilization\"]}, \"extended_statistics\": [\"p99\"]}]. Supported statistics are [\"p99\", \"p95\", \"p90\", \"p80\", \"p70\", \"p50\"].
ExternalIdStringNoOptional. Fill this field if your defined AWS Role depends on the sts:ExternalId field, otherwise no data will be received from your AWS account.
MetricSelectorsJSONNoEnter a JSON-formatted string containing specific metric selectors. This configuration helps limit metrics collected per namespace. If you define a namespace in both "Namespaces" and here, only the metric_names specified here will be collected. We do not support duplicate metric selector configurations per namespace.
PollIntervalMinutesNumberNoPoll interval in minutes, can be set to 10 and more.
RdsEnhancedMonitoringEnabledBooleanNoEnable RDS Enhanced Monitoring for additional metrics and RDS provisioned and reserved instance tags. Note that this will result in increased data usage. The following permissions are required: rds::Describe*, rds::List*, and ec2:DescribeInstanceTypes. Permissions without an * can be found in the changelog.
ResourceTagsFilterStringNoEnter a comma-separated list of tag keys or key-value pairs to use as filter. Metrics on resources not matching the filter will be skipped. Note that not all metrics are linked to resources, this filter will have no effect on them. If no filter is defined, ALL metrics will be collected.
StaticLabelsListNoList of key-value pairs that will be added as labels to every metric in the integration.
TagsKeyFilterListNoEnter a comma-separated list of tag keys. Only tags matching these keys will be added as labels to the metrics. If empty, all of the tags will be added.
0.8.0
NameTypeRequiredDescription
ApplicationNameStringYesThe application name to be used in the integration. Added as the cx_application_name label to each metric.
AwsRegionStringYesSelect the AWS region from which to retrieve metrics. Choose the region where your resources are hosted.
AwsRoleArnStringYesThe ARN of the role that trusts the Coralogix AWS account.
DiscoverNamespacesBooleanYesEnable this option to automatically discover and collect metrics from all available CloudWatch and custom namespaces for your AWS account. This may increase AWS costs and metrics may take time to appear as namespaces are discovered.
EnrichWithTagsBooleanYesAdd resource tags as labels to specific resource metrics.
IntegrationNameStringYes
MetricNamespacesListYesSelect the metric namespaces to specify which metrics to collect. If left empty, no metrics will be collected.
StatisticsListYesSelect statistics to be collected.
SubsystemNameStringYesThe subsystem name to be used in the integration. Added as the cx_subsystem_name label to each metric.
WithAggregationsBooleanYesAdd optional aggregation metrics for Minimum and Maximum statistics. This will create additional metrics with suffixes _min and _max. Note that this can result in increased data usage. The same data results can be achieved using queries.
CustomMetricNamespacesStringNoEnter your custom metric namespaces to specify which metrics to collect. If left empty, no metrics will be collected.
EcsEnhancedMonitoringEnabledBooleanNoEnable ECS Enhanced Monitoring for additional metrics and ECS service and container_instances tags. Note that this will result in increased data usage. The following permissions are required: ecs::Describe* and ecs::List*. Permissions without an * can be found in the changelog.
ElastiCacheEnhancedMonitoringEnabledBooleanNoEnable ElastiCache Enhanced Monitoring for additional metrics. Note that this will result in increased data usage. The following permissions are required: elasticache:DescribeCacheClusters, elasticache:ListTagsForResource and ec2:DescribeInstanceTypes.
ExtendedStatisticsToCollectJSONNoEnter a JSON-formatted string containing additional statistics, they will be collected only for metrics matching selected Metric Namespaces. If you do not want any additional statistics put [] as a value. Example: [{\"metric_selector\":{\"namespace\": \"AWS/EC2\", \"metric_names\": [\"CPUUtilization\"]}, \"extended_statistics\": [\"p99\"]}]. Supported statistics are [\"p99\", \"p95\", \"p90\", \"p80\", \"p70\", \"p50\"].
ExternalIdStringNoOptional. Fill this field if your defined AWS Role depends on the sts:ExternalId field, otherwise no data will be received from your AWS account.
MetricSelectorsJSONNoEnter a JSON-formatted string containing specific metric selectors. This configuration helps limit metrics collected per namespace. If you define a namespace in both "Namespaces" and here, only the metric_names specified here will be collected. We do not support duplicate metric selector configurations per namespace.
PollIntervalMinutesNumberNoPoll interval in minutes, can be set to 10 and more.
RdsEnhancedMonitoringEnabledBooleanNoEnable RDS Enhanced Monitoring for additional metrics and RDS provisioned and reserved instance tags. Note that this will result in increased data usage. The following permissions are required: rds::Describe*, rds::List*, and ec2:DescribeInstanceTypes. Permissions without an * can be found in the changelog.
ResourceTagsFilterStringNoEnter a comma-separated list of tag keys or key-value pairs to use as filter. Metrics on resources not matching the filter will be skipped. Note that not all metrics are linked to resources, this filter will have no effect on them. If no filter is defined, ALL metrics will be collected.
StaticLabelsListNoList of key-value pairs that will be added as labels to every metric in the integration.
TagsKeyFilterListNoEnter a comma-separated list of tag keys. Only tags matching these keys will be added as labels to the metrics. If empty, all of the tags will be added.
0.7.0
NameTypeRequiredDescription
ApplicationNameStringYesThe application name to be used in the integration. Added as the cx_application_name label to each metric.
AwsRegionStringYesSelect the AWS region from which to retrieve metrics. Choose the region where your resources are hosted.
AwsRoleArnStringYesThe ARN of the role that trusts the Coralogix AWS account.
EnrichWithTagsBooleanYesAdd resource tags as labels to specific resource metrics.
IntegrationNameStringYes
MetricNamespacesListYesSelect the metric namespaces to specify which metrics to collect. If left empty, no metrics will be collected.
StatisticsListYesSelect statistics to be collected.
SubsystemNameStringYesThe subsystem name to be used in the integration. Added as the cx_subsystem_name label to each metric.
WithAggregationsBooleanYesAdd optional aggregation metrics for Minimum and Maximum statistics. This will create additional metrics with suffixes _min and _max. Note that this can result in increased data usage. The same data results can be achieved using queries.
CustomMetricNamespacesStringNoEnter your custom metric namespaces to specify which metrics to collect. If left empty, no metrics will be collected.
EcsEnhancedMonitoringEnabledBooleanNoEnable ECS Enhanced Monitoring for additional metrics and ECS service and container_instances tags. Note that this will result in increased data usage. The following permissions are required: ecs::Describe* and ecs::List*. Permissions without an * can be found in the changelog.
ElastiCacheEnhancedMonitoringEnabledBooleanNoEnable ElastiCache Enhanced Monitoring for additional metrics. Note that this will result in increased data usage. The following permissions are required: elasticache:DescribeCacheClusters, elasticache:ListTagsForResource and ec2:DescribeInstanceTypes.
ExtendedStatisticsToCollectJSONNoEnter a JSON-formatted string containing additional statistics, they will be collected only for metrics matching selected Metric Namespaces. If you do not want any additional statistics put [] as a value. Example: [{\"metric_selector\":{\"namespace\": \"AWS/EC2\", \"metric_names\": [\"CPUUtilization\"]}, \"extended_statistics\": [\"p99\"]}]. Supported statistics are [\"p99\", \"p95\", \"p90\", \"p80\", \"p70\", \"p50\"].
ExternalIdStringNoOptional. Fill this field if your defined AWS Role depends on the sts:ExternalId field, otherwise no data will be received from your AWS account.
MetricSelectorsJSONNoEnter a JSON-formatted string containing specific metric selectors. This configuration helps limit metrics collected per namespace. If you define a namespace in both "Namespaces" and here, only the metric_names specified here will be collected. We do not support duplicate metric selector configurations per namespace.
PollIntervalMinutesNumberNoPoll interval in minutes, can be set to 10 and more.
RdsEnhancedMonitoringEnabledBooleanNoEnable RDS Enhanced Monitoring for additional metrics and RDS provisioned and reserved instance tags. Note that this will result in increased data usage. The following permissions are required: rds::Describe*, rds::List*, and ec2:DescribeInstanceTypes. Permissions without an * can be found in the changelog.
ResourceTagsFilterStringNoEnter a comma-separated list of tag keys or key-value pairs to use as filter. Metrics on resources not matching the filter will be skipped. Note that not all metrics are linked to resources, this filter will have no effect on them. If no filter is defined, ALL metrics will be collected.
StaticLabelsListNoList of key-value pairs that will be added as labels to every metric in the integration.
TagsKeyFilterListNoEnter a comma-separated list of tag keys. Only tags matching these keys will be added as labels to the metrics. If empty, all of the tags will be added.
0.6.1
NameTypeRequiredDescription
ApplicationNameStringYesThe application name to be used in the integration. Added as the cx_application_name label to each metric.
AwsRegionStringYesSelect the AWS region from which to retrieve metrics. Choose the region where your resources are hosted.
AwsRoleArnStringYesThe ARN of the role that trusts the Coralogix AWS account.
EnrichWithTagsBooleanYesAdd resource tags as labels to specific resource metrics.
IntegrationNameStringYes
MetricNamespacesListYesSelect the metric namespaces to specify which metrics to collect. If left empty, no metrics will be collected.
SubsystemNameStringYesThe subsystem name to be used in the integration. Added as the cx_subsystem_name label to each metric.
WithAggregationsBooleanYesAdd optional aggregation metrics, like average, min and max. Note that this can result in increased data usage. The same data results can be achieved using queries.
CustomMetricNamespacesStringNoEnter your custom metric namespaces to specify which metrics to collect. If left empty, no metrics will be collected.
EcsEnhancedMonitoringEnabledBooleanNoEnable ECS Enhanced Monitoring for additional metrics and ECS service and container_instances tags. Note that this will result in increased data usage. The following permissions are required: ecs::Describe* and ecs::List*. Permissions without an * can be found in the changelog.
ElastiCacheEnhancedMonitoringEnabledBooleanNoEnable ElastiCache Enhanced Monitoring for additional metrics. Note that this will result in increased data usage. The following permissions are required: elasticache:DescribeCacheClusters, elasticache:ListTagsForResource and ec2:DescribeInstanceTypes.
ExtendedStatisticsToCollectJSONNoEnter a JSON-formatted string containing additional statistics, they will be collected only for metrics matching selected Metric Namespaces. If you do not want any additional statistics put [] as a value. Example: [{\"metric_selector\":{\"namespace\": \"AWS/EC2\", \"metric_names\": [\"CPUUtilization\"]}, \"extended_statistics\": [\"p99\"]}]. Supported statistics are [\"p99\", \"p95\", \"p90\", \"p80\", \"p70\", \"p50\"].
ExternalIdStringNoOptional. Fill this field if your defined AWS Role depends on the sts:ExternalId field, otherwise no data will be received from your AWS account.
MetricSelectorsJSONNoEnter a JSON-formatted string containing specific metric selectors. This configuration helps limit metrics collected per namespace. If you define a namespace in both "Namespaces" and here, only the metric_names specified here will be collected. We do not support duplicate metric selector configurations per namespace.
PollIntervalMinutesNumberNoPoll interval in minutes, can be set to 10 and more.
RdsEnhancedMonitoringEnabledBooleanNoEnable RDS Enhanced Monitoring for additional metrics and RDS provisioned and reserved instance tags. Note that this will result in increased data usage. The following permissions are required: rds::Describe*, rds::List*, and ec2:DescribeInstanceTypes. Permissions without an * can be found in the changelog.
ResourceTagsFilterStringNoEnter a comma-separated list of tag keys or key-value pairs to use as filter. Metrics on resources not matching the filter will be skipped. Note that not all metrics are linked to resources, this filter will have no effect on them. If no filter is defined, ALL metrics will be collected.
StaticLabelsListNoList of key-value pairs that will be added as labels to every metric in the integration.
TagsKeyFilterListNoEnter a comma-separated list of tag keys. Only tags matching these keys will be added as labels to the metrics. If empty, all of the tags will be added.
0.6.0
NameTypeRequiredDescription
ApplicationNameStringYesThe application name to be used in the integration. Added as the cx_application_name label to each metric.
AwsRegionStringYesSelect the AWS region from which to retrieve metrics. Choose the region where your resources are hosted.
AwsRoleArnStringYesThe ARN of the role that trusts the Coralogix AWS account.
EnrichWithTagsBooleanYesAdd resource tags as labels to specific resource metrics.
IntegrationNameStringYes
MetricNamespacesListYesSelect the metric namespaces to specify which metrics to collect. If left empty, no metrics will be collected.
SubsystemNameStringYesThe subsystem name to be used in the integration. Added as the cx_subsystem_name label to each metric.
WithAggregationsBooleanYesAdd optional aggregation metrics, like average, min and max. Note that this can result in increased data usage. The same data results can be achieved using queries.
CustomMetricNamespacesStringNoEnter your custom metric namespaces to specify which metrics to collect. If left empty, no metrics will be collected.
EcsEnhancedMonitoringEnabledBooleanNoEnable ECS Enhanced Monitoring for additional metrics and ECS service and container_instances tags. Note that this will result in increased data usage. The following permissions are required: ecs::Describe* and ecs::List*. Permissions without an * can be found in the changelog.
ElastiCacheEnhancedMonitoringEnabledBooleanNoEnable ElastiCache Enhanced Monitoring for additional metrics. Note that this will result in increased data usage. The following permissions are required: elasticache:DescribeCacheClusters, elasticache:ListTagsForResource and ec2:DescribeInstanceTypes.
ExtendedStatisticsToCollectJSONNoEnter a JSON-formatted string containing additional statistics, they will be collected only for metrics matching selected Metric Namespaces. If you do not want any additional statistics put [] as a value. Example: [{\"metric_selector\":{\"namespace\": \"AWS/EC2\", \"metric_names\": [\"CPUUtilization\"]}, \"extended_statistics\": [\"p99\"]}]. Supported statistics are [\"p99\", \"p95\", \"p90\", \"p80\", \"p70\"].
ExternalIdStringNoOptional. Fill this field if your defined AWS Role depends on the sts:ExternalId field, otherwise no data will be received from your AWS account.
PollIntervalMinutesNumberNoPoll interval in minutes, can be set to 10 and more.
RdsEnhancedMonitoringEnabledBooleanNoEnable RDS Enhanced Monitoring for additional metrics and RDS provisioned and reserved instance tags. Note that this will result in increased data usage. The following permissions are required: rds::Describe*, rds::List*, and ec2:DescribeInstanceTypes. Permissions without an * can be found in the changelog.
ResourceTagsFilterStringNoEnter a comma-separated list of tag keys or key-value pairs to use as filter. Metrics on resources not matching the filter will be skipped. Note that not all metrics are linked to resources, this filter will have no effect on them. If no filter is defined, ALL metrics will be collected.
StaticLabelsListNoList of key-value pairs that will be added as labels to every metric in the integration.
TagsKeyFilterListNoEnter a comma-separated list of tag keys. Only tags matching these keys will be added as labels to the metrics. If empty, all of the tags will be added.