Skip to main content

Cost categories overview

Cost categories provide an understanding of where and how your money is being spent. Cost categories allow you to take data across multiple sources and attribute it to business contexts, such as departments, teams, and other spend categories. For example, if your business is organized by teams with multiple accounts, you can create a Cost Category named Teams and map costs to each team from all your accounts. The cost category called Teams shows you what each team is spending across AWS, GCP, Clusters, etc. You could drill down further into the cost data available for every item in your cost category. For example, in a cost category called Teams, you could view cost data for a particular team (cost bucket) such as Operations. You can then use Cost Categories in CCM Perspectives to filter across accounts, products, etc.

Apart from viewing costs based purely on different data sources (AWS, GCP, Clusters, etc.) without context, cost categories allow you to view spending across these data sources according to different business contexts and help you gain useful insights.

How does it work?

  1. Create cost categories — Allows you to categorize based on business requirements and get a contextual view of your expenses.
  2. Create cost buckets — A cost category is composed of one or more buckets. A bucket is one or more filters that collect data from a data source. For example, a Cost Category called Departments would have a separate cost bucket for each department. Each bucket collects the data sources that belong to each department.​
  3. Create shared buckets — You can create a shared bucket to share the cost across cost buckets in a given category. For example, let us consider the cost category Departments — the cost incurred in maintaining a database is attributed to multiple departments in an organization. So, you can create a shared bucket named Database Cost (enter a name that's relevant to your scenario) and define the rules and conditions to visualize cost data as per your requirement. You could choose to split this cost equally between all the cost buckets, or you could split the cost proportionally based on usage, or you could allocate a fixed percentage of cost for each cost bucket.​
  4. View your expense data — After creating Cost Categories, you can use them in Perspective filters and Group By. You can even use Cost Categories to define Perspectives. The Cost Categories used in Perspectives are updated separately from the Perspectives. This allows you to update a single Cost Category and have the result automatically reflected in all the Perspectives that use that Cost Category.

If there are items that don't belong to any of these cost categories, the cost associated is displayed as unallocated costs.

Prerequisites and permissions

To use cost categories, your Harness user account must belong to a user group with the following role permissions:

  • Cloud Cost Management: Cost Categories: Create/Edit

For more details, go to CCM Roles and Permissions.

Visual summary

How to create a Cost Category:

How to use a Cost Category:

Create cost categories

You can create a Cost Category

  1. In your Harness application, go to Cloud Costs.
  2. Go to Setup, and then select Cost Categories.
  3. Select New Cost Category.

You can also create a new Cost Category when you create a Perspective.

The new Cost Category appears.

  1. In the new Cost Category, enter a name. For example, if this Cost Category is for departments, you could name it Departments.

Create cost buckets

  1. Select New Cost Bucket.

  2. Enter a name for the cost bucket, such as the name of a department.

  3. Define the rules (data sources) for the cost bucket. You could add multiple conditions to this rule using the AND operator.
    Add a new row for each rule until the cost bucket correctly includes all the costs incurred for this bucket. These rules are defined using the OR operator.
    Typically, you want to create multiple cost buckets in the cost category. For example, if the Cost Category is for departments, you would create a cost bucket for each department such as finance, operations, facilities, and so on.

AND and OR
The AND and OR operators are used to filter data based on more than one condition:

  • AND: use AND to filter data sources that include both criteria.

  • OR: use OR to filter data sources that include one of the criteria.You can use AND and OR together.

Create shared cost buckets

  1. Select + New Shared Bucket.
  2. Enter a relevant name for the shared bucket.
  3. Define rules and conditions as per requirement.
  4. Select the sharing strategy.
    For example, consider two cost targets named team A and team B. These two teams use the same database. To enable sharing of cost between these two teams, you need to create a shared cost bucket named sharedDB (enter a name that relates to the shared bucket).
  • Equally: This option enables sharing of the shared bucket cost equally (50%) between both teams A and B. You can view it in the grid and chart.

  • Proportionally: This option enables sharing of the shared bucket cost proportionally between both teams. If the cost for team A is $60 and that of team B is $40. Then, 60% of DB cost is borne by team A and 40% by team B.

  • Fixed percentage: This option allows the distribution of the cost of the shared bucket by a fixed percentage between cost buckets. For example, 30% to team A and 70% to team B.

Manage unallocated costs

When used in a Perspective as a filter or Group By, the Cost Category shows data that matches its filters.

Unallocated Costs are costs that do not match the Cost Categories in the Perspective graph and rows.

In Manage Unallocated Costs, you can choose to show or ignore unallocated costs, and choose a name for how those costs are displayed.

Save the cost category. Now, you can view the cost bucket details in a cost category on the Cost Categories page.