AWS Cost by Tag Monitoring
Last updated on 28 April, 2024The Cost by Tag DataSource is a multi-instance DataSource that allows you to collect values for any tagged items in your AWS Cost and Usage Report so you can view a breakdown of your costs. LogicMonitor automatically provides the AWS Cost by Tag DataSource when you set up AWS billing. To leverage the DataSource as multi-instance, you can add instances using one of the following methods:
- Enable Active Discovery (AD)—When AD is enabled for the Cost by Tag DataSource, LogicMonitor can discover one instance per tag value. This allows LogicMonitor to automatically discover all the tag values for you so you do not have to manually input all values. For example, if you use the cost by tag DataSource for applications and your environment has 100 applications in use, LogicMonitor can automatically discover all applications for you and add them as instances for your AWS account. For more information, see What is Active Discovery?.
- Manually add instances—You can manually add instances to a DataSource by inputting values for each tag that you want to track cost for.
For each tag you want to track costs for, you must use a different DataSource. You can clone the DataSource as needed. For more information, see Cloning a LogicModule.
Recommendation: Use the Cost by Tag DataSource provided by LogicMonitor as a template to clone as needed.
Requirements for Monitoring the AWS Cost by Tag DataSource
To monitor the AWS Cost by Tag DataSource, you must set up monitoring for AWS billing. For more information, see AWS Billing Monitoring Setup.
If your environment does not include the Cost by Tag DataSource, you must import it. For more information about importing DataSources, see LogicModule Updates.
Enabling Active Discovery for the Cost by Tag DataSource
- Navigate to Settings > DataSources, and select the “AWS_Billing_CostByTag” from the DataSources list.
Note: You can perform a search for “AWS_Billing_CostByTag” using the search bar, or you can open the disclosure triangles for the DataSources.
- (Optional) Modify the values in the Name, Displayed as, and Description fields as necessary.
- Select Enable Active Discovery.
- From Discovery schedule, select a frequency option.
Recommendation: Select an option that allows LogicMonitor to collect values more than once. The default “Only when host/DataSource added or changed” option collects values only once.
- From Discovery method, select “AWS Billing Report”.
- In the AWS Billing Report Attribute field, enter the tag that you want to track. You must prefix the value with “user”. For example, enter “user:OS” to discover the different operating systems.
Important: LogicMonitor discovers the user-defined tags from the Cost and Usage Report.
- Select Save.
LogicMonitor discovers all values and monitors costs for the specified key.
Manually Adding Instances to the Cost by Tag DataSource
- Navigate to Resources and select the AWS account from the Resources Tree that you want to add instances to.
- Select the account level resource, and then select Manage > Add Monitored Instance.
Note: If you currently have a Cost by Tag DataSource with instances, you can add instances from the Instances tab.
- From the Add Monitored Instance settings, enter “Cost by Tag” in the DataSource field.
LogicMonitor attempts to match values as you type. - In the Name field, enter a value for how you want the instance to display in the Resources Tree.
- In the Wildcard value field, enter the tag that you want to track. You must prefix the value with “user”. For example, enter “user:OS” to discover the different operating systems.
Important: LogicMonitor discovers the user-defined tags from the Cost and Usage Report.
- (Optional) In the Description field, enter a description of the instance.
- In the Group field, enter the instance group you want the instance displayed in.
LogicMonitor attempts to match values as you type. - Select Save.
The Cost by Tag DataSource displays in the Resource Tree for the AWS account. You can repeat these steps for additional instances as necessary.