Implement cost allocation with tags
After you add tags to Hologres instances, you can view billing details and costs by tag in the Expenses and Costs console. This topic describes how to use tags to split bills of Hologres instances.
Overview
Tags associate Hologres instances with business departments or cost centers, so that billing data can be filtered, grouped, and exported by department. After tagging instances and enabling the split bill feature, billing data becomes available the following day.
The workflow consists of three steps:
Prerequisites
Before you begin, ensure that you have:
-
Hologres instances running under an Alibaba Cloud account
-
The split bill feature enabled in the Expenses and CostsSplit Bill console. For details, see Enable features
Step 1: Plan tags
Design a tag scheme before applying tags to instances. Each tag is a key-value pair. Use a consistent set of tag keys across all instances to make split billing data easier to filter and analyze.
Example: An enterprise has three departments sharing one Alibaba Cloud account. The following table shows a tag scheme for each instance.
<table> <thead> <tr> <td><p><b>Hologres instance name</b></p></td> <td><p><b>Business department</b></p></td> <td><p><b>Tag</b></p></td> </tr> </thead> <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> <tbody> <tr> <td><p>Instance A</p></td> <td><p>Data R&D Department</p></td> <td><p>department:Dev</p></td> </tr> <tr> <td><p>Instance B</p></td> <td><p>Business Department 1</p></td> <td><p>department:OLAP</p></td> </tr> <tr> <td><p>Instance C</p></td> <td><p>Business Department 1</p></td> <td><p>department:OLAP</p></td> </tr> <tr> <td><p>Instance D</p></td> <td><p>Business Department 2</p></td> <td><p>department:Serving</p></td> </tr> </tbody> </table>
In this example, the primary instance A belongs to the Data R&D Department (writes and processes data), secondary instances B and C belong to Business Department 1 (Online Analytical Processing (OLAP) analysis), and secondary instance D belongs to Business Department 2 (online services).
Step 2: Add tags to instances
-
Go to the Instances page in the Hologres console. In the top navigation bar, select a region, then click the ID of the instance you want to tag.
-
In the Basic Information section of the Instance Details page, click
next to Tag. -
In the Edit Tag dialog box, set the Select Tags parameter:
-
To apply an existing tag, click Existing Tags and select a tag from the drop-down list.
-
To create a new tag, click Create Tag, enter a key such as
departmentand a value such asDev, then click Create.
-
-
Click OK.
Step 3: View split bills
After tagging an instance, billing data filtered by tag is available the following day.
Split bills
-
Go to the Split Bill page in the Expenses and Costs console.
Before you use the split bill feature for the first time, you must enable the feature. For more information, see Enable features and Split Bill. To filter data by tag on the Cost Analysis page and Bill Details page, enable the cost allocation tags feature and specify tags as cost allocation tags. If the feature is enabled but no tags are specified as cost allocation tags, no tags appear on those pages.
-
On the Split Bill page:
-
To customize which fields appear in the bill, click
. -
To export bill splitting details, click
, then download the file from the Export Record page.
-
Cost analysis
On the Cost Analysis page in the Expenses and Costs console, specify tag filters to view costs by tag. You can also export the cost list in CSV format. For more information, see Cost Analysis.Cost Analysis