This C2C collects cost and usage reports from the AWS Cost Explorer.
The AWS Cost Explorer Source reports errors, its health, and initialization status. Other than indicating that the source is healthy, you are also informed, in real-time, if the source is running into trouble communicating with AWS API, or if there's an error that requires user action indicated by Sumo Logic Health Events.
An AWS Cost Explorer Source goes through the following states when created:
- Pending. Once the Source is submitted, details are stored and the source is placed in a Pending state.
- Started. A collection task is created on the hosted collector.
- Initialized. Task configuration is complete in Sumo Logic.
- Authenticated. The Source has successfully authenticated with AWS
- Collecting. The Source is actively collecting data from AWS accounts.
If the Source has any issues during any one of these states, it is placed in an Error state.
Hover your mouse over the status icon to view a tooltip with details on the detected issue.
When you delete the Source, it is placed in a Stopping state. When it has successfully stopped, it is deleted from your Hosted Collector.
Create an AWS Cost Explorer Source
When you create an AWS Cost Explorer collector Source, you add it to an existing Sumo Logic hosted collector. Before creating the Source, identify the hosted collector you want to use or simply create a new hosted collector. For further instructions, see Create a Hosted Collector.
To configure an AWS Cost Explorer Source:
- On the Manage Data > Collection > Collection.
- On the Collection page, click Add Source next to a Hosted Collector.
- Search for and select AWS Cost Explorer.
- Enter a Name for the Source in the Sumo Logic console. The Description is optional.
- (Optional) For Source Category, enter any string to tag the output collected from the Source. Category metadata is stored in a searchable field called
- For Fields, click the +Add link to add custom log metadata. Define the fields you want to associate. Each field needs a name (key) and value.
- A green circle with a check mark is shown when the field exists and is enabled in the Fields table schema.
- An orange triangle with an exclamation point is shown when the field doesn't exist, or is disabled, in the Fields table schema. In this case, an option to automatically add or enable the nonexistent fields to the Fields table schema is provided. If a field is sent to Sumo Logic that does not exist in the Fields schema or is disabled it is ignored, known as dropped.
It is preferable to add an account field (for the dashboards) and assign it a friendly name to identify the corresponding AWS account.
- For the AWS Access Key and AWS Secret Key, provide the IAM User access key and secret key you want to use to authenticate collection requests.
Make sure your IAM user has the following IAM policy attached with it.
- (Optional) For the Enable Regions field, provide the regions which need to be monitored for cost. The cost incurred across these regions will be fetched separately. The region list here includes all the standard AWS regions along with “global”. “Global” region includes services like Amazon CloudFront, Amazon Route 53, and Amazon IAM. If the field is left empty (default behavior), then data will be fetched from all the enabled regions of the respective AWS account. It is recommended to provide only the regions which are actively used and need to be monitored for cost. This will save the AWS cost for running this source on unused regions.
- For the Cost Type, provide supported cost types / MetricTypes. For details on the CostType, see Amazon's Understanding your AWS Cost Datasets: A Cheat Sheet.
- For Granularity, provide 2 supported granularities for each of the MetricTypes (or cost types):
- Daily Costs (Polled every 12h)
- Monthly Costs (Polled every day)
- Add Processing Rules.
- Click Submit when complete.
It can take up to 48 hours for AWS to generate your billing data. For accuracy, Sumo Logic does not present any billing analysis for the previous 48-60 hours.
When Sumo Logic detects an issue it is tracked by Health Events. The following table shows the three possible error types, the reason the error would occur, if the Source attempts to retry, and the name of the event log in the Health Event Index.
|Type||Reason||Retries||Retry Behavior||Health Event Name|
|ThirdPartyConfig||Normally due to an invalid configuration. You'll need to review your Source configuration and make an update.||No retries are attempted until the Source is updated.||Not applicable||ThirdPartyConfigError|
|ThirdPartyGeneric||Normally due to an error communicating with the third party service APIs.||Yes||The Source will retry for up to 90 minutes, after which retries will be attempted every 60 minutes.||ThirdPartyGenericError|
|FirstPartyGeneric||Normally due to an error communicating with the internal Sumo Logic APIs.||Yes||The Source will retry for up to 90 minutes, after which retries will be attempted every 60 minutes.||FirstPartyGenericError|
|config||JSON Object||Yes||Contains the configuration parameters for the Source.|
|schemaRef||JSON Object||Yes||Use ||Not modifiable|
|sourceType||String||Yes||Use Universal for an AWS Cost Explorer Source.||Not modifiable|
The following table shows the config parameters for an AWS Cost Explorer Source.
|name||String||Yes||Type the desired name of the Source. The name must be unique per Collector. This value is assigned to the metadata field _source.||modifiable|
|description||String||No||Null||Type a description of the Source.||modifiable|
|category||String||No||Null||Type a category of the source. This value is assigned to the metadata field ||modifiable|
|fields||JSON Object||No||JSON map of key-value fields (metadata) to apply to the Collector or Source.|
Use the string field account to tag the logs with friendly aws account name.
|accessID||String||Yes||Provide the AWS IAM User access key ID you want to use to authenticate collection requests.||modifiable|
|accessKey||String||Yes||Provide the AWS Secret Key you want to use to authenticate collection requests.||modifiable|
|granularity||String array||Yes||Provide a list, such as ["daily","monthly"]||modifiable|
|costMetrics||String array||Yes||Provide a list, such as||modifiable|
|AWS Region||String array||No||Provide a list, such as ||modifiable|
"type":"AWS Cost Explorer"