How to Build a Service Tree in CMDB for Efficient Resource Management
This guide explains the concept, design, and step‑by‑step implementation of a service tree in a CMDB, showing how to map departments, products, and services to resources for better visibility, cost tracking, and operational control.
Service tree is a CMDB resource organization method that combines a tree structure with the company’s organizational hierarchy, enabling developers to clearly see which resources they are using.
Service Tree Design
The service tree consists of three layers: Department / Product / Service . All resources are attached under the service layer.
1. People Collection
This layer corresponds to a node in the company’s org chart; the hierarchy is flexible, and each branch under a department is managed by the people assigned to that node.
2. Department Layer
Maps the organizational structure onto the service tree, primarily to identify the responsible department for cost and availability functions.
3. Product Layer
Connects services and people; a product aggregates multiple services that together provide a unified functionality to users, inheriting department‑related data from above and grouping services below.
4. Service Layer
Represents collections of resources, each service being a distinct set of resources.
Ultimately, the service tree attaches all machine resources to this hierarchical structure.
Operation Process
Using an open‑source CMDB, we quickly implement a service tree for server resources by using resource attributes as tags to create the hierarchical structure.
Step 1: Create Corresponding Attributes
Model Configuration → Attribute Library → Add Attribute
Step 2: Department → department_name
Step 3: Product → product_name
Step 4: Service → service_name
Step 5: Server Model Modification
Bind attributes to the corresponding resources.
5.1 Model Configuration → Model Management → Select the model to modify
5.2 Choose the attribute to bind
Step 6: Resource Entry
When entering each resource, specify its department, product, and service.
Step 7: Tree View Subscription
Modify the tree view subscription configuration in My Subscriptions.
Select the tree view structure as shown.
Step 8: Suggested Service Tree
Conclusion
By linking departments and products with the company’s organizational structure, each resource can be associated with its responsible department, simplifying management and enabling accurate cost accounting.
Open‑source CMDB link: https://github.com/pycook/cmdb
Feel free to give a star and like the project.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
