netbox
netbox copied to clipboard
New functionality: Business Systems
NetBox version
v3.4.0
Feature type
New functionality
Proposed functionality
Business Systems (or Business applications) are a type of application that are used to improve the operations of a business. For example, SAP ERP, Oracle EBS ERP, MES (Manufacturing Execution System), Material balance system, etc.
In general, a Вusiness system from the point of view of IT infrastructure operates on a certain number of VMs (database servers, application servers, WEB servers, integration servers, etc.). Every business system has production environment, test environment, development environment. Each environment is a collection of different VMs (bera metal servers).
Very often we or our bosses would like to know how many resources (VMs or bare metal servers) one business system or enother. Often we would like to know how much resources (VMs or bare metal servers) one system or another is using.
Use case
A possible attributes for describing a business system:
-
Application Name
-
Application Description
-
Application Type
- Commercial off-the-shelf (COTS)
- COTS with Customization
- Custom
- ...
-
Tenant or Business Application Owner (for example, this field can refer to the Tenant entity of NetBox) This is the application owner from the business, for example, various departments or organizations, etc.
-
Contact (this field can refer to the contacts entity of NetBox) These are IT employees, for example, application administrator, devops engineer, etc.
-
Criticality
- Mission-critical
- Unit-critical
- High
- Medium
- Low
- Very Low
- ...
-
Is internet accessible
Database changes
A possible database schema could be something like this:
CREATE TABLE criticality (
id int8 NOT NULL,
"name" varchar(64) NOT NULL,
last_updated timestamptz NULL,
created timestamptz NULL,
description text NULL,
CONSTRAINT criticality_pkey PRIMARY KEY (id)
);
CREATE TABLE app_type (
id int8 NOT NULL,
"name" varchar(64) NOT NULL,
last_updated timestamptz NULL,
created timestamptz NULL,
description text NULL,
CONSTRAINT app_type_pkey PRIMARY KEY (id)
);
CREATE TABLE businessapplication (
id int8 NOT NULL,
"name" varchar(256) NOT NULL,
last_updated timestamptz NULL,
created timestamptz NULL,
description text NULL,
tenant_id int8 NULL,
criticality_id int4 NULL,
notes text NULL,
app_type_id int4 NOT NULL,
is_internet_access BOOLEAN NOT NULL,
CONSTRAINT businessapplication_pkey PRIMARY KEY (id)
);
ALTER TABLE businessapplication ADD CONSTRAINT fk_businessapplication_app_type FOREIGN KEY (app_type_id) REFERENCES app_type(id);
ALTER TABLE businessapplication ADD CONSTRAINT fk_businessapplication_criticality FOREIGN KEY (criticality_id) REFERENCES criticality(id);
ALTER TABLE businessapplication ADD CONSTRAINT fk_businessapplication_tenancy_tenant FOREIGN KEY (tenant_id) REFERENCES tenancy_tenant(id) DEFERRABLE INITIALLY DEFERRED;
--
CREATE TABLE businessapplication_assignment (
id int8 NOT NULL,
last_updated timestamptz NULL,
created timestamptz NULL,
businessapplication_id int4 NULL,
object_id int8 NOT NULL, -- id from the table of devices or virtual machines here
content_type_id int4 NOT NULL,
CONSTRAINT businessapplication_assignment_pkey PRIMARY KEY (id),
CONSTRAINT businessapplication_assignment_object_id_check CHECK ((object_id >= 0)),
);
-- public.businessapplicationelement foreign keys
ALTER TABLE businessapplication_assignment ADD CONSTRAINT fk_businessapplication_assignment_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE businessapplication_assignment ADD CONSTRAINT fk_businessapplication_assignment_businessapplication FOREIGN KEY (businessapplication_id) REFERENCES businessapplication(id);
External dependencies
No new dependencies.
You can achieve this with services, tags, contacts and custom fields already today.
But you are getting close to the CMDB realm, and should maybe consider integrate netbox with a real CMDB. for example iTop. A real CMDB handles relations to external parties as well, like integrations, that really dont fit to be modelled in netbox.
CMDB is not infrastructure-level logic. It's a (company) management logic. So, I'd prefer not have any of it in our "source of truth" service.
We have CMDBuild for this kind of stuff. All that matter for business projected there from Netbox. There you can limit some stuff by state, tenant etc., without continuously telling someone (without deep infrastructure knowledge), why they have "limited access".
P.S. Also, business apps operate close with financial responsibility and other relations. Integrating all that external contacts/schematics, that have not any relations to infrastructure outside of business logic...
It's a good idea, also you could create relation with services and so you have the set of ports exposed by a business application. Furthemore, we could create relation between them to collect network flows that are existing on your datacenter in high level mode.
Yes, it would be nice to have some information about business applications in the Netbox. Of course, we can use tags, but it's not comfortable for us. Integrating Netbox with CMDB for such a simple task is too complicated.
For all those thumbing up, if you are doing it because you want this, make sure you thumb up the main FR. 😄
For managing our infrastructure, I came across the same problem. For our needs, most of the tenancy feature is sufficient, i.e. resources are assigned to an application tenant instead of an organizational unit tenant. You may be able to add some custom fields to tenants to cover additional characteristics such as criticality.
I'd like to contribute to this as I see great value in this information for managing applications in our infrastructure, e.g. to automatically add resource spaces in monitoring or virtualization systems. If there's interest, I can provide a PR for one of the following milestones.
A key question that came up in the discussion of https://github.com/Alef-Burzmali/netbox-data-flows/issues/25 is, whether or not a resource can belong to a Tenant and an Application at the same time. If not, I think most of the tenancy logic could be reused to implement this feature. Another question would be whether this FR should only implement resource allocation, or also how they relate to each other (i.e. Application A uses API of Application B).