Asset Management with semi-auto discovery processes
Project description
Inventory Monitor
This project is designed to monitor and manage inventory assets, including their types, assignments, lifecycle statuses, and related contracts, services, invoices, and RMAs.
Table of Contents
- Attachments
- Mermaid Diagram
- How the Data Model Works
- Example Data and Relationships
- Relationship Example
- Installation
- Usage
- Contributing
- License
Attachments
- For attachments use netbox-attachments
Mermaid Diagram
classDiagram
class AssetType {
CharField name
SlugField slug
CharField description
ColorField color
}
class Asset {
CharField serial
CharField partnumber
CharField asset_number
CharField assignment_status
CharField lifecycle_status
ForeignKey assigned_object_type
PositiveBigIntegerField assigned_object_id
GenericForeignKey assigned_object
ForeignKey inventory_item
ForeignKey type
ForeignKey order_contract
CharField project
CharField vendor
PositiveIntegerField quantity
DecimalField price
DateField warranty_start
DateField warranty_end
TextField comments
}
class ComponentService {
DateField service_start
DateField service_end
CharField service_param
DecimalField service_price
CharField service_category
CharField service_category_vendor
ForeignKey asset
ForeignKey contract
TextField comments
}
class Contract {
CharField name
CharField name_internal
ForeignKey contractor
CharField type
DecimalField price
DateField signed
DateField accepted
DateField invoicing_start
DateField invoicing_end
ForeignKey parent
TextField comments
}
class Contractor {
CharField name
CharField company
CharField address
TextField comments
ForeignKey tenant
}
class Invoice {
CharField name
CharField name_internal
CharField project
ForeignKey contract
DecimalField price
DateField invoicing_start
DateField invoicing_end
TextField comments
}
class Probe {
DateTimeField time
DateTimeField creation_time
CharField device_descriptor
CharField site_descriptor
CharField location_descriptor
CharField part
CharField name
CharField serial
ForeignKey device
ForeignKey site
ForeignKey location
TextField description
TextField comments
JSONField discovered_data
CharField category
}
class RMA {
CharField rma_number
ForeignKey asset
CharField original_serial
CharField replacement_serial
CharField status
DateField date_issued
DateField date_replaced
TextField issue_description
TextField vendor_response
}
AssetType --> Asset : type
Asset --> ComponentService : asset
Asset --> RMA : asset
Asset --> Contract : order_contract
ComponentService --> Contract : contract
Contract --> Contractor : contractor
Contract --> Invoice : contract
Contractor --> Contract : contractor
Invoice --> Contract : contract
Probe --> Asset : asset
How the Data Model Works
-
Contractor
- Represents an external company or individual providing services or assets.
- Associated with multiple contracts (
Contract).
-
Contract
- Represents a business agreement, such as for purchasing assets or services.
- Can have:
- Multiple invoices (
Invoice) for billing. - Subcontracts (
Contract) for hierarchical contract management. - Assets (
Asset) linked to the contract. - Services (
ComponentService) provided as part of the contract.
- Multiple invoices (
-
Invoice
- Linked to a contract, representing billing details.
- Contains details about invoicing periods and project-specific billing.
-
Asset
- Represents physical or logical assets involved in a project.
- Includes details like serial number, price, vendor, warranty, and project association.
- Linked to services (
ComponentService) and devices, sites, locations, rack. - Can be linked with inventory items.
-
ComponentService
- Represents services provided for an asset, such as maintenance or subscriptions.
- Contains details about the service period, parameters, pricing, and service categories.
-
Probe
- Represents measurements or data collection related to a device, site, or location.
- Includes descriptors for identifying the context of the probe.
Example Data and Relationships
Scenario
- A contractor named TechCorp signs a contract for supplying assets and providing maintenance services for a project.
- The project involves purchasing routers and switches from TechCorp, with maintenance services for these assets.
- The contract also includes invoicing for specific periods.
Data Example
Contractor
- Name: TechCorp
- Company: TechCorp Ltd.
- Address: 123 Main St, TechCity
- Tenant: Default Tenant
Contract
- Name: Network Infrastructure Supply
- Type: Supply and Maintenance
- Price: $100,000
- Signed: 2025-01-01
- Invoicing Start: 2025-01-15
- Invoicing End: 2026-01-15
Invoice
- Name: Invoice #001
- Project: Project Alpha
- Price: $25,000
- Invoicing Start: 2025-01-15
- Invoicing End: 2025-02-15
Asset
- Serial: R12345
- Part Number: RT-5000
- Vendor: TechCorp
- Price: $5,000
- Warranty Start: 2025-01-15
- Warranty End: 2028-01-15
- Project: Project Alpha
ComponentService
- Service Start: 2025-01-15
- Service End: 2026-01-15
- Service Param: Annual Maintenance
- Service Price: $1,000
- Service Category: Maintenance
- Service Category Vendor: TechCorp
Probe
- Time: 2025-02-01 10:00:00
- Device Descriptor: RT-5000 Router
- Site Descriptor: Data Center 1
- Location Descriptor: Rack A1
- Part: Router Module
- Name: Temperature Check
- Serial: R12345
- Description: Router temperature measurement.
Relationship Example
- TechCorp is linked to the Network Infrastructure Supply contract.
- The contract includes:
- An asset (router) with serial number R12345.
- A service for annual maintenance of the router.
- An invoice for January 2025 billing.
- The asset is associated with:
- A site (Data Center 1).
- A location (Rack A1).
- A device (RT-5000 Router).
- A probe captures performance data (temperature) for the router at a specific time.
This structure enables easy tracking of assets, contracts, invoices, and services within the NetBox plugin.
Installation
To install the Inventory Monitor plugin, follow these steps:
-
Clone the repository:
git clone https://gitlab.cesnet.cz/701/done/inventory-monitor-plugin.git cd inventory-monitor-plugin
-
Run the setup script:
python setup.py install
OR install directly from PyPI:
pip install inventory-monitor
-
To enable the plugin, add it to the
PLUGINSlist in your NetBoxconfiguration.pyfile:PLUGINS = [ "inventory_monitor", ]
-
(Optional) Configure plugin settings in your NetBox
configuration.pyfile:PLUGINS_CONFIG = { "inventory_monitor": { "probe_recent_days": 7, # Days to consider probe "recent" } }
See CONFIGURATION.md for detailed configuration options.
-
Run the database migrations:
python manage.py migrate
Usage
To use the Inventory Monitor plugin, follow these steps:
-
Start the application:
python manage.py runserver
-
Access the application in your web browser at
http://localhost:8000.
Contributing
We welcome contributions to the Inventory Monitor project! To contribute, follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and commit them with clear and concise messages.
- Push your changes to your fork.
- Submit a pull request to the main repository.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file inventory_monitor-11.0.0b1.tar.gz.
File metadata
- Download URL: inventory_monitor-11.0.0b1.tar.gz
- Upload date:
- Size: 71.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2761e662630ddbc0668632ad621fbf9ec4ab77c1eac4ff77c1a6b022491e39e5
|
|
| MD5 |
be2ebdae575fb8db8fc841fd34d80267
|
|
| BLAKE2b-256 |
ffed4e5c784d58088d07a0b5b9d18243be79dc9043228e6132a9d36a9d26ebb3
|