Asset Inventory Management
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
Asset Inventory Management is a core pillar of the Horizon Configuration Management Database (CMDB) system. It is designed to provide comprehensive visibility into an organization's IT infrastructure by automatically discovering and cataloging hardware assets, software installations, and their complex interdependencies. The system leverages a lightweight, cross-platform agent to ensure high-fidelity data collection with minimal manual intervention.
Sources: README.md:15-18, IMPLEMENTATION_PLAN.md:16-19
The primary scope of this module includes hardware discovery, software tracking, relationship mapping, and lifecycle management. It serves as the foundational data layer for other system capabilities such as Network Flow Mapping, Vulnerability Management, and Business Impact Analysis (BIA).
Sources: README.md:44-55, IMPLEMENTATION_PLAN.md:280-285
Architecture and Data Flow
The architecture follows a three-tier model where the asset data originates from distributed agents or manual imports, is processed by a central API server, and is persisted in a PostgreSQL database with Redis for caching.
Sources: IMPLEMENTATION_PLAN.md:45-48, IMPLEMENTATION_PLAN.md:104-106
Data Collection Lifecycle
Asset data is collected through several primary mechanisms:
- Automated Agent Discovery: A Rust-based agent (<50MB memory) performs platform-specific scans for CPU, memory, storage, and network interfaces.
- Manual Entry/Import: Support for bulk data ingestion via CSV, Excel, JSON, and XML formats.
- API Integration: RESTful endpoints allow external systems to register or update asset metadata.
Sources: README.md:46-51, IMPLEMENTATION_PLAN.md:112-114, IMPLEMENTATION_PLAN.md:470-475
The diagram illustrates the flow of asset metadata from various collection points through the validation and differencing engine to final persistence.
Sources: IMPLEMENTATION_PLAN.md:45-50, IMPLEMENTATION_PLAN.md:435-440, IMPLEMENTATION_PLAN.md:535-540
Data Model and Schema
The asset inventory is structured around several key entities defined in the database schema. The system distinguishes between "Asset Types" (templates) and "Assets" (instances).
Core Entities
| Table | Description | Key Fields |
|---|---|---|
asset_types | Defines categories of assets and their metadata requirements. | name, slug, metadata_schema, icon |
assets | The primary record for a hardware or logical asset. | inventory_number, serial_number, status, last_seen_at |
asset_relationships | Maps dependencies and connections between assets. | source_asset_id, target_asset_id, relationship_type |
asset_history | Maintains a full audit trail of every change to an asset. | field_name, old_value, new_value, actor_id |
Sources: IMPLEMENTATION_PLAN.md:375-410
Relationship Mapping
Assets are not isolated; the system tracks relationships using a directed graph model. This includes identifying the "strength" of a relationship (Strong, Medium, Weak, Unknown).
Sources: IMPLEMENTATION_PLAN.md:400-405
ER diagram showing the core relationships between assets, their types, history, and software installations.
Sources: IMPLEMENTATION_PLAN.md:375-405, IMPLEMENTATION_PLAN.md:505-510
Agent-Based Discovery
The Horizon Agent is the primary driver for automated inventory. It performs platform-specific detection for Linux, Windows, and macOS.
Collection Modules
- Hardware Inventory: Enumerates CPU (cores, frequency), Memory (total, slots), Storage (disks, SMART status), and Peripherals.
- Network Inventory: Captures MAC addresses, interface speeds, and IP address assignments.
- Software Inventory: Collects installed packages via system managers (
dpkg,rpm,brew,chocolatey,winget) and enumerates running services.
Sources: README.md:46-48, IMPLEMENTATION_PLAN.md:455-485
Secure Communication
Communication between the agent and the server is secured using mTLS with server-issued certificates. Data is transmitted using compressed Protocol Buffers (Protobuf).
Sources: IMPLEMENTATION_PLAN.md:112-114, IMPLEMENTATION_PLAN.md:490-495
API and Search Interface
The system provides a RESTful API for asset management, supporting standard CRUD operations and advanced search.
Key API Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/assets | List assets with filtering, pagination, and sorting. |
POST | /api/v1/assets | Manually create a new asset record. |
GET | /api/v1/assets/{id}/history | Retrieve the audit trail for a specific asset. |
POST | /api/v1/assets/search | Full-text search across metadata using PostgreSQL FTS. |
Sources: IMPLEMENTATION_PLAN.md:390-395, IMPLEMENTATION_PLAN.md:415-420
Full-Text Search
Horizon implements a powerful search engine indexed on name, description, serial_number, manufacturer, and model. It supports search result highlighting and autocomplete suggestions.
Sources: README.md:52-53, IMPLEMENTATION_PLAN.md:415-420
Audit and History Tracking
Integrity is a strategic goal of the project. Every modification to an asset, whether via agent update or manual edit, is recorded in the asset_history table.
History Metadata
- Actor Types: Identifies if the change was made by a
user,agent,system,import, orapi. - Diffing: Stores both
old_valueandnew_valuefor the specificfield_namethat was changed. - Reasoning: Includes an optional
change_reasonfor manual modifications.
Sources: IMPLEMENTATION_PLAN.md:20, IMPLEMENTATION_PLAN.md:405-412
Conclusion
Asset Inventory Management in Horizon provides the essential visibility required for modern IT governance. By combining automated agent discovery with rigorous history tracking and relationship mapping, the system ensures that the CMDB remains a "single source of truth" for hardware, software, and infrastructure dependencies. This data serves as the critical input for security compliance, vulnerability correlation, and business continuity planning.
Sources: README.md:23-28, IMPLEMENTATION_PLAN.md:16-20