Skip to main content
Sumo Logic

AWS Metadata (Tag) Source for Metrics

A Sumo Logic AWS Metadata Source allows you to attach AWS tags to the metrics you collect from AWS sources, so you use those tags in metric queries.

A Sumo Logic AWS Metadata Source allows you to collect tags  you have assigned to selected AWS resources. For information about assigning tags to AWS resources, see Tagging Resources in AWS help.

These tags are automatically applied to metrics ingested from other metrics sources, such as host metrics from installed collectors on your EC2  instances. Note that metrics ingested from an HTTP source are not automatically tagged. For HTTP sources, you must add the tags InstanceID and Region. You can add them in the header with X-Sumo-Dimensions or X-Sumo-Metadata as well as to the metric itself. For reference see Other Supported HTTP Headers.

When you run a metric query, the tags associated with the queried metric will appear as columns in the Legend section of the metric query tab.

Only one AWS Metadata Source is required to collect tags from multiple hosts.

Set up an AWS metadata source

To set up an AWS Metadata Source for metrics:

  1. Grant permission for Sumo Logic to describe EC2 instances and get resources. For more information, see the  AWS Metadata (Tag) Source for Metrics Policy and AWS CloudWatch Source Policy  sections on Grant Access to an AWS Product.
  2. In Sumo Logic, select Manage Data > Collection > Collection
  3. Next to a Hosted Collector, click Add Source.
  4. Select AWS Metadata.
  5. Configure the following:
  • Name. Enter a name to display for the new Source.
  • Description. Optional description.
  • Regions. Select one or more Amazon regions.
  • Tag Filters.  Leave this field blank to collect all tags configured for the EC2 instance. To collect a subset of tags, follow the instructions in Define AWS tag filters
  • AWS Access. Choose between two Access Method options. Select Role-based access or Key access based on the AWS authentication you are providing. Role-based access is preferred, this was completed in step 1, see Grant Sumo Logic access to an AWS Product.
    • For Role-based access enter the Role ARN that was provided by AWS after creating the role. 
    • For Key access enter the Access Key ID and Secret Access Key. See AWS Access Key ID and AWS Secret Access Key for details.
  1. Click Save.

After creating an AWS Metadata Source, it may take up to 10 minutes for EC2 tags to appear when querying for metrics.

Define AWS tag filters 

Define your filter to match against your tag. For instance, in a key value pair define the filter to match against the key, not the value. If you do not define tag filters, all tags configured for your AWS instances will be collected.

If you want to collect a subset of tags, you can enter a comma-separated list of one or more of the following types of filters:

  • One or more specific tag names, for example, “Cluster, Deployment, Name”
  • A wildcard filter, for example, “dev-*”
  • An exclusion (blacklist) filter, which begins with an exclamation mark, for example, ”!master-container” or “!prod-*”

 For example, assume that the tags configured for your EC2 instances are:

  • Cluster
  • Deployment
  • DeployStatus
  • Name

The table below shows the results of several example tag filters 

This tag filter value Results in collection of these tags
!DeployStatus Cluster
!Dep* Cluster
Deploy*, !DeployStatus, Cluster  Cluster