# 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](#attachments)
- [Mermaid Diagram](#mermaid-diagram)
- [How the Data Model Works](#how-the-data-model-works)
- [Example Data and Relationships](#example-data-and-relationships)
- [Relationship Example](#relationship-example)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
---
## Attachments
- For attachments use [netbox-attachments](https://github.com/Kani999/netbox-attachments)
---
## Mermaid Diagram
```mermaid
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
1. **Contractor**
- Represents an external company or individual providing services or assets.
- Associated with multiple contracts (`Contract`).
2. **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.
3. **Invoice**
- Linked to a contract, representing billing details.
- Contains details about invoicing periods and project-specific billing.
4. **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.
5. **ComponentService**
- Represents services provided for an asset, such as maintenance or subscriptions.
- Contains details about the service period, parameters, pricing, and service categories.
6. **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
1. **TechCorp** is linked to the **Network Infrastructure Supply** contract.
2. The contract includes:
- An **asset** (router) with serial number R12345.
- A **service** for annual maintenance of the router.
- An **invoice** for January 2025 billing.
3. The **asset** is associated with:
- A **site** (Data Center 1).
- A **location** (Rack A1).
- A **device** (RT-5000 Router).
4. 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:
1. Clone the repository:
```sh
git clone https://gitlab.cesnet.cz/701/done/inventory-monitor-plugin.git
cd inventory-monitor-plugin
```
1. Run the setup script:
```sh
python setup.py install
```
**OR** install directly from PyPI:
```sh
pip install inventory-monitor
```
1. To enable the plugin, add it to the `PLUGINS` list in your NetBox [`configuration.py`](https://docs.netbox.dev/en/stable/configuration/) file:
```python
PLUGINS = [
"inventory_monitor",
]
```
1. (Optional) Configure plugin settings in your NetBox [`configuration.py`](https://docs.netbox.dev/en/stable/configuration/) file:
```python
PLUGINS_CONFIG = {
"inventory_monitor": {
"probe_recent_days": 7, # Days to consider probe "recent"
}
}
```
See CONFIGURATION.md for detailed configuration options.
1. Run the database migrations:
```sh
python manage.py migrate
```
---
## Usage
To use the Inventory Monitor plugin, follow these steps:
1. Start the application:
```sh
python manage.py runserver
```
2. 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:
1. Fork the repository.
2. Create a new branch for your feature or bugfix.
3. Make your changes and commit them with clear and concise messages.
4. Push your changes to your fork.
5. Submit a pull request to the main repository.
---
## License
This project is licensed under the MIT License. See the LICENSE file for more details.
Raw data
{
"_id": null,
"home_page": "https://gitlab.cesnet.cz/701/done/inventory-monitor-plugin",
"name": "inventory-monitor",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "netbox, netbox-plugin",
"author": "Jan Krupa",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/3c/06/5912eb1baf6dd2a0cd475c6632877fba3fb477bed05636bc6168a7b4e12d/inventory-monitor-10.3.7.tar.gz",
"platform": null,
"description": "# Inventory Monitor\n\nThis project is designed to monitor and manage inventory assets, including their types, assignments, lifecycle statuses, and related contracts, services, invoices, and RMAs.\n\n---\n\n## Table of Contents\n\n- [Attachments](#attachments)\n- [Mermaid Diagram](#mermaid-diagram)\n- [How the Data Model Works](#how-the-data-model-works)\n- [Example Data and Relationships](#example-data-and-relationships)\n- [Relationship Example](#relationship-example)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Attachments\n\n- For attachments use [netbox-attachments](https://github.com/Kani999/netbox-attachments)\n\n---\n\n## Mermaid Diagram\n\n```mermaid\nclassDiagram\n class AssetType {\n CharField name\n SlugField slug\n CharField description\n ColorField color\n }\n\n class Asset {\n CharField serial\n CharField partnumber\n CharField asset_number\n CharField assignment_status\n CharField lifecycle_status\n ForeignKey assigned_object_type\n PositiveBigIntegerField assigned_object_id\n GenericForeignKey assigned_object\n ForeignKey inventory_item\n ForeignKey type\n ForeignKey order_contract\n CharField project\n CharField vendor\n PositiveIntegerField quantity\n DecimalField price\n DateField warranty_start\n DateField warranty_end\n TextField comments\n }\n\n class ComponentService {\n DateField service_start\n DateField service_end\n CharField service_param\n DecimalField service_price\n CharField service_category\n CharField service_category_vendor\n ForeignKey asset\n ForeignKey contract\n TextField comments\n }\n\n class Contract {\n CharField name\n CharField name_internal\n ForeignKey contractor\n CharField type\n DecimalField price\n DateField signed\n DateField accepted\n DateField invoicing_start\n DateField invoicing_end\n ForeignKey parent\n TextField comments\n }\n\n class Contractor {\n CharField name\n CharField company\n CharField address\n TextField comments\n ForeignKey tenant\n }\n\n class Invoice {\n CharField name\n CharField name_internal\n CharField project\n ForeignKey contract\n DecimalField price\n DateField invoicing_start\n DateField invoicing_end\n TextField comments\n }\n\n class Probe {\n DateTimeField time\n DateTimeField creation_time\n CharField device_descriptor\n CharField site_descriptor\n CharField location_descriptor\n CharField part\n CharField name\n CharField serial\n ForeignKey device\n ForeignKey site\n ForeignKey location\n TextField description\n TextField comments\n JSONField discovered_data\n CharField category\n }\n\n class RMA {\n CharField rma_number\n ForeignKey asset\n CharField original_serial\n CharField replacement_serial\n CharField status\n DateField date_issued\n DateField date_replaced\n TextField issue_description\n TextField vendor_response\n }\n\n AssetType --> Asset : type\n Asset --> ComponentService : asset\n Asset --> RMA : asset\n Asset --> Contract : order_contract\n ComponentService --> Contract : contract\n Contract --> Contractor : contractor\n Contract --> Invoice : contract\n Contractor --> Contract : contractor\n Invoice --> Contract : contract\n Probe --> Asset : asset\n```\n\n---\n\n## How the Data Model Works\n\n1. **Contractor**\n - Represents an external company or individual providing services or assets.\n - Associated with multiple contracts (`Contract`).\n\n2. **Contract**\n - Represents a business agreement, such as for purchasing assets or services.\n - Can have:\n - Multiple invoices (`Invoice`) for billing.\n - Subcontracts (`Contract`) for hierarchical contract management.\n - Assets (`Asset`) linked to the contract.\n - Services (`ComponentService`) provided as part of the contract.\n\n3. **Invoice**\n - Linked to a contract, representing billing details.\n - Contains details about invoicing periods and project-specific billing.\n\n4. **Asset**\n - Represents physical or logical assets involved in a project.\n - Includes details like serial number, price, vendor, warranty, and project association.\n - Linked to services (`ComponentService`) and devices, sites, locations, rack.\n - Can be linked with inventory items.\n\n5. **ComponentService**\n - Represents services provided for an asset, such as maintenance or subscriptions.\n - Contains details about the service period, parameters, pricing, and service categories.\n\n6. **Probe**\n - Represents measurements or data collection related to a device, site, or location.\n - Includes descriptors for identifying the context of the probe.\n\n---\n\n## Example Data and Relationships\n\n### Scenario\n\n- A contractor named **TechCorp** signs a contract for supplying assets and providing maintenance services for a project.\n- The project involves purchasing routers and switches from **TechCorp**, with maintenance services for these assets.\n- The contract also includes invoicing for specific periods.\n\n### Data Example\n\n#### Contractor\n\n- **Name**: TechCorp\n- **Company**: TechCorp Ltd.\n- **Address**: 123 Main St, TechCity\n- **Tenant**: Default Tenant\n\n#### Contract\n\n- **Name**: Network Infrastructure Supply\n- **Type**: Supply and Maintenance\n- **Price**: $100,000\n- **Signed**: 2025-01-01\n- **Invoicing Start**: 2025-01-15\n- **Invoicing End**: 2026-01-15\n\n#### Invoice\n\n- **Name**: Invoice #001\n- **Project**: Project Alpha\n- **Price**: $25,000\n- **Invoicing Start**: 2025-01-15\n- **Invoicing End**: 2025-02-15\n\n#### Asset\n\n- **Serial**: R12345\n- **Part Number**: RT-5000\n- **Vendor**: TechCorp\n- **Price**: $5,000\n- **Warranty Start**: 2025-01-15\n- **Warranty End**: 2028-01-15\n- **Project**: Project Alpha\n\n#### ComponentService\n\n- **Service Start**: 2025-01-15\n- **Service End**: 2026-01-15\n- **Service Param**: Annual Maintenance\n- **Service Price**: $1,000\n- **Service Category**: Maintenance\n- **Service Category Vendor**: TechCorp\n\n#### Probe\n\n- **Time**: 2025-02-01 10:00:00\n- **Device Descriptor**: RT-5000 Router\n- **Site Descriptor**: Data Center 1\n- **Location Descriptor**: Rack A1\n- **Part**: Router Module\n- **Name**: Temperature Check\n- **Serial**: R12345\n- **Description**: Router temperature measurement.\n\n---\n\n## Relationship Example\n\n1. **TechCorp** is linked to the **Network Infrastructure Supply** contract.\n2. The contract includes:\n - An **asset** (router) with serial number R12345.\n - A **service** for annual maintenance of the router.\n - An **invoice** for January 2025 billing.\n3. The **asset** is associated with:\n - A **site** (Data Center 1).\n - A **location** (Rack A1).\n - A **device** (RT-5000 Router).\n4. A **probe** captures performance data (temperature) for the router at a specific time.\n\nThis structure enables easy tracking of assets, contracts, invoices, and services within the NetBox plugin.\n\n---\n\n## Installation\n\nTo install the Inventory Monitor plugin, follow these steps:\n\n1. Clone the repository:\n ```sh\n git clone https://gitlab.cesnet.cz/701/done/inventory-monitor-plugin.git\n cd inventory-monitor-plugin\n ```\n\n1. Run the setup script:\n ```sh\n python setup.py install\n ```\n\n **OR** install directly from PyPI:\n ```sh\n pip install inventory-monitor \n ```\n\n1. To enable the plugin, add it to the `PLUGINS` list in your NetBox [`configuration.py`](https://docs.netbox.dev/en/stable/configuration/) file:\n ```python\n PLUGINS = [\n \"inventory_monitor\",\n ]\n ```\n\n1. (Optional) Configure plugin settings in your NetBox [`configuration.py`](https://docs.netbox.dev/en/stable/configuration/) file:\n ```python\n PLUGINS_CONFIG = {\n \"inventory_monitor\": {\n \"probe_recent_days\": 7, # Days to consider probe \"recent\"\n }\n }\n ```\n \n See CONFIGURATION.md for detailed configuration options.\n\n1. Run the database migrations:\n ```sh\n python manage.py migrate\n ```\n\n---\n\n## Usage\n\nTo use the Inventory Monitor plugin, follow these steps:\n\n1. Start the application:\n ```sh\n python manage.py runserver\n ```\n\n2. Access the application in your web browser at `http://localhost:8000`.\n\n---\n\n## Contributing\n\nWe welcome contributions to the Inventory Monitor project! To contribute, follow these steps:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bugfix.\n3. Make your changes and commit them with clear and concise messages.\n4. Push your changes to your fork.\n5. Submit a pull request to the main repository.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for more details.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Asset Management with semi-auto discovery processes",
"version": "10.3.7",
"project_urls": {
"Homepage": "https://gitlab.cesnet.cz/701/done/inventory-monitor-plugin"
},
"split_keywords": [
"netbox",
" netbox-plugin"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3c065912eb1baf6dd2a0cd475c6632877fba3fb477bed05636bc6168a7b4e12d",
"md5": "d97eaa11454a43b69078e69f63923482",
"sha256": "2efffe66c0223d380db0de4e8c432d32665401e7792004e93592d593092d18f1"
},
"downloads": -1,
"filename": "inventory-monitor-10.3.7.tar.gz",
"has_sig": false,
"md5_digest": "d97eaa11454a43b69078e69f63923482",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 60752,
"upload_time": "2025-07-24T09:27:19",
"upload_time_iso_8601": "2025-07-24T09:27:19.178637Z",
"url": "https://files.pythonhosted.org/packages/3c/06/5912eb1baf6dd2a0cd475c6632877fba3fb477bed05636bc6168a7b4e12d/inventory-monitor-10.3.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-24 09:27:19",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "inventory-monitor"
}