Inventory

Top  Previous  Next

The Inventory module in Enterprise Server is, not surprisingly, the most complex of all the modules and can contain the possibility to store a  vast amount of information. The following explains the essentials that you will need to know if you want to write reports for the inventory module.

 

You will, no doubt, run into a number of constants here that are not human readable. We include a number of RAP functions that you can access for use in Variables or from the Calc workspace in your report designs. You can see examples of how to do this in the various inventory reports that are included in the standard report packs that are installed with ENT Report Forge. If you want to search by these values however, you will need to know what the actual constant values.

 

Table Summary

 

Table

Description

 

mfNetworks

Stores each of the various networks that you manage.

mfNetworkExcludes

Stores lists of addresses that should be excluded from network scans for particular networks

mfAssets

Stores financial information common to all of the "Assets" that are stored in the inventory, which includes all items based on the mfPNPDevices, mfAbstractMachines and mfSoftwareAssets tables

mfAbstractMachines

Stores information common to all of the various machine types that you find in the Machines area of ENT Server (mfMachines, mfNetworkEquipment, mfDocumentDevices, mfHandhelds and mfGenericMachines)

mfMachines

Records base information for each of the machines that you have recorded in your inventory.

mfSlots

Keeps information about the motherboard slot configuration for each of the machines in your inventory.

mfAlerts

Any active alerts.

mfSoftware

Stores the details of any software products that you own or use.

mfSoftwareAssets

Records information about any software licenses and/or media for the software products that you own or use.

mfSoftwareContracts

Records information about maintenance contracts that you have for software products that you own

mfPNPDevices

Contains base information about any hardware devices (parts) in your inventory, including spare parts as well as those which are installed in machines.

mfNetworkAdapters

Records device specific information for any PNPDevices which are network adapters.

mfDisks

Records device specific information for any PNPDevices which are disk drives.

mfVideoControllers

Records device specific information for any PNPDevices which are video controllers.

mfProcessors

Records device specific information for any PNPDevices which are processors.

mfNetworkEquipment

Stores properties specific to machines of the Network Equipment type

mfDocumentDevices

Stores properties specific to machines of the Document Device type

mfHandhelds

Stores properties specific to machines of the Handheld Device type

mfGenericMachines

Stores properties specific to machines of the Generic Machine type... which is to say, not too much actually... but for consistency with the other machine types we did it this way

mfMiscellany

Stores any categories of miscellany that you have defined in your inventory.

mfMiscellanyLoans

Records information about any miscellany which is currently on loan.

mfNetworkMachines

Records network connections (which machines are connected to which networks).

mfMachinesSoftware

Records software installations (which software products are installed on which machines).

 

 

Relationship Summary

 

The following diagrams show the various relationships for each of the tables that are used for the Inventory module.

 

Networks

 

DB_Networks

 

Among other things, Networks are logical collections of machines. Each network can have any number of machines connected to it, however machines can, in turn, be connected to any number of networks. As such, a simple NetworkId field for a machine is insufficient, and the mfNetworkMachines table is used to record network connections. A record in this table indicates that the machine with the Id corresponding to MachineId is installed on the network whose Id correspondes to the NetworkId field.

 

The type of network is indicated by the NetType field, and can be one of the following.

 

NetType

Meaning

 

0

Domain

1

TCP/IP

 

 

Additionally, you can create tasks for networks or raise helpcalls relating to a Network. Since all of these can be related to multiple items again, we can't use a simple lookup Id, so we use the mfReferences table as a conduit. As already described in the Calendar and Helpdesk architecture, the mfReferences table contains an ItemId and ItemType (which uniquely identifies the network) and then a RefId and RefType (which uniquely identifies the referenced item). The ItemType will be mfNetworks and the RefType will be either mfTasks or mfHelpcalls (depending on whether it is a reference to a task or a helpcall).

 

The AlertLevel fields can contain one of a number of Alert Level constants, as follows.

 

AlertLevel

Meaning

 

0

Notify

1

Alert

2

Ignore

 

 

Similarly, the Status field in the mfNetworkMachines table indicates the status of the machine's connection to the network. A complete list of possible values for this field would be far too lenthy to document here, but the following table documents the most common values that you may encounter. Anything else will most likely be a WMI error number, for which you could find more complete documentation on the Microsoft web site.

 

Status

Meaning

 

0

OK

1

Error inspecting MAC Address

2

Error inspecting Machine Name

3

Error inspecting Motherboard information

4

Error inspecting bios information

5

Error inspecting system information

6

Error inspecting operating system details

7

Error inspecting PNP devices

8

Error inspecting CPU information

9

NError inspecting network adapters

10

Error inspecting video controllers

11

Error inspecting slot configuration

12

Error inspecting disk information

13

Error inspecting devices

98

Audit Error

99

Unknown Error

$80041008

Invalid credentials

$800706BA

RPC Server Unavailable

$80070005

Access Denied

 

 

Assets

 

DB_Assets

 

The Assets table is a base table storing information which is common to all items based on the mfAbstractMachines, mfPNPDevicess and mfSoftwareAssets tables. This table includes VendorId and WarrantyVendorId fields that can be used to associate assets with organizations in the mfOrganizations table that are flagged as vendors (i.e. which have IsVendor = 1). Primarily the mfAssets table stored financial information. Among the fields in the mfAssets table you'll find a PaymentType as well as a DepreciationMethod field, both of which contain constant values, as defined below:

 

PaymentType

Meaning

 

0

Flat (a Purchase basically)

1

Weekly

2

Monthly

3

Quarterly

4

Six Monthly

5

Annually

 

 

DepreciationMethod

Meaning

 

0

Fixed Rate

1

Diminishing Value

 

 

Abstract Machines

 

DB_AbstractMachines

 

The mfAbstractMachines table is a base table storing information which is common to all of the Machine types. All abstract machines are also assets, so for every record in the mfAbstractMachines table you will find a corresponding record in the mfAssets table - linked by their Id fields.

 

The MachineType field will tell you exactly what kind of machine this is (and the table where machine specific information can be found about the asset):

 

MachineType

Meaning

 

mfMachines

Computer

mfNetworkEquipment

Network Equipment

mfDocumentDevices

Document Device

mfHandhelds

Handheld Device

mfGenericMachines

Generic Machine

 

 

You will also note the AuditMethod, AlertLevel and AlertStatus fields, whose values are described below:

 

PaymentType

Meaning

 

0

Flat (a Purchase basically)

1

Weekly

2

Monthly

3

Quarterly

4

Six Monthly

5

Annually

 

 

AlertLevel

Meaning

 

0

Notify

1

Alert

2

Ignore

 

 

AlertStatus

Meaning

 

0

OK

1

Alert

 

 

The LocationId field associates machines with managed sites (which are organizations that have the IsManagedSite field flagged).

 

Finally the CustomerId and CustomerType fields can be used to associate the machine with an individual or organizational customer (the CustomerType field indicating which).

 

Machines

 

DB_Machines

 

Machines, not surprisingly, have a number of relationships to the other tables in the Enterprise Server databases. Firstly, all machines are also abstract machines - so every record in the mfMachines table will have a corresponding record in the mfAbstractMachines table with the same Id.

 

The next thing you will notice in the diagram is the two fields in the mfMachines table that contain constant values: DomainRole and SuiteMask. For display purposes, you can use the RAP functions that we provide (such as AlertStatusToString), but if you want to add these columns to as search fields or autosearch fields then you will need to know the various constant values that these fields can hold and what each represents. These are described in the various tables below.

 

DomainRole

Meaning

 

0

Standalone Workstation

1

Member Workstation

2

Standalone Server

3

Member Server

4

Backup Domain Controller

5

Primary Domain Controller

 

 

SuiteMask

Meaning

 

1

Small Business

2

Enterprise

4

Back Office

8

Communications

16

Terminal

32

Small Business Restricted

64

Embedded NT

128

Data Center

256

Single User

512

Personal

1024

Blade

 

 

Next, you can see the network connections for the machine are stored in the mfNetworkMachines table, which is already covered above. A similar mechanism is used to record software which is installed on the machine, and the mfMachinesSoftware table is used to relate machines to software products by storing the Id of each in the MachineId and SoftwareId fields, respectively.

 

The various Slots on the machine's motherboard and their configuration/status is stored in the mfSlots table. Each slot record in this table records the existence and state of a slot on the machine with the Id corresponding to MachineId field in the mfSlots table. The CurrentUsage field indicates the current status of the slot as follows.

 

CurrentUsage

Meaning

 

1

Other

2

Unknown

3

Available

4

In Use

 

 

Hardware devices are a topic unto themselves (which we cover next). Suffice to say, for the moment, that these are related to machines using the MachineId field in the mfPNPDevices table. If this MachineId is set to NULL then the device is not installed on any machine (i.e. it's a spare part).

 

Finally, any alerts related to the machine are stored in the mfAlerts table, and the Id of the machine that each alert relates to is recorded in the MachineId field of this table. The AlertType field can contain one of various constant values as follows.

 

AlertType

Meaning

 

0

OK

1

New Item Detected

2

Item is missing

4

Primary bus type differs

5

Bios type differs

6

Bios version changed

7

Operating System differs

8

Operating System build number changed

9

Operating System service pack

10

Domain role changed

11

Registered user changed

12

Operating System product code differs

13

Operating System suite mask changed

14

Operating System version changed

15

Domain name changed

16

Domain participation changed

17

Physical memory changed

 

Parts

 

DB_Parts

 

Not too disimilar to machines, Parts have a LocationId lookup field and use the mfReferences table to store relationships to any helpcalls or tasks that have been created for them. Since we've already covered these in the Machines section above, we won't go over this again. Some other things you will notice are the MachineId (which is also described in the Machines section above) and the OriginalMachineId. The later is a reference to the mfMachines table as well, and simply stores the original machine that the device was installed in. If you move parts from one machine to another or uninstall them, then this field will tell you where the part originally came from, for the purposes of warranties etc.

 

Otherwise, you'll notice a number fields that store constants values (ConfigManagerErrorCode, AlertLevel, AlertStatus and PaymentType). A full list of the possible values for ConfigManagerErrorCode would be rather lenghty... probably the only one you need to know is 0, which means OK. Anything else means there is an error with the configuration and you can see exactly what the error is from within ENT NetCenter. The possible values and signification of the other constant field values are as follows.

 

AlertLevel

Meaning

 

0

Same as machine

2

Ignore

 

 

AlertStatus

Meaning

 

0

OK

1

Alert

2

New

 

 

For parts which are network adapters, additional information relating specifically to the adapter (such as the MAC address) can be found in the mfNetworkAdapters table. Similarly, device specific information for Disks, Video Controllers and Processors can be found in the mfDisks, mfVideoControllers and mfProcessors tables, respectively, and the constant values that you will find in the Architecture and ProcessorType fields are described below.

 

Architecture

Meaning

 

0

x86

1

MIPS

2

Alpha

3

PowerPC

6

ia64

 

 

ProcessorType

Meaning

 

0

Other

1

Unknown

2

Central Processor

3

Math Processor

4

DSP Processor

5

Video Processor

 

 

Finally, as with machines, any alerts relating to hardware devices are maintined in the mfAlerts table. The ItemId for the alert, along with the ItemType (which contains the name of the table containing the item with Id = ItemId) can be used to find any alerts that are related to hardware devices. The AlertType field can contain one of various constant values as follows.

 

AlertType

Meaning

 

0

OK

1

New Item Detected

2

Item is missing

18

Disk interface type differs

19

Disk size differs

20

Video memory differs

21

Processor type differs

22

Processor clock speed differs

23

Processor revision number changed

24

Level 2 cache size changed

25

External clock speed changed

26

Processor architecture differs

27

Processor address width differs

28

Network adapter type differs

29

MAC address changed

127

A problem was found with the device configuration

 

 

Software

 

DB_Software

 

Software is where the products that you either use or own are recorded. Each software publisher is recorded in the mfOrganizations table as a an organization with the IsPublisher field is set to 1 (i.e. True). For any software product the Id of the associated publisher can be found in the PublisherId field of the record for the software product, in the mfSoftware table. If this is NULL then there is no publisher assigned for that Software.

 

As with Network, Machines and Parts, Software items can have Helpcalls and Tasks which are related to them. References to these tasks and helpcalls can be found in the mfReferences table and the mechanism that controls this relationship is as described previously, in the architecture for Networks.

 

The mfSoftwareAssets table is used to record any software assets (such as media and licenses) related to the software product and the mfSoftwareContracts table records any software maintenance contracts that you have for products. The SoftwareId field in these tables are used to relate software assets and contracts with Software products in the mfSoftware table. The LocationId and ContractorId fields relate to records in the mfOrganizations table that have the IsManagedSite and IsVendor fields set, respectively. The various values for the constant values that can be stored in the Type, LicenseType and PaymentType fields can be set to one of various constant values as follows.

 

Type

Meaning

 

0

License only

1

Media only

2

License and media

3

Maintenance contract

 

 

LicenseType

Meaning

 

0

User license

1

Site license

2

Proprietary

3

Freeware

 

 

PaymentType

Meaning

 

0

Flat (a Purchase basically)

1

Weekly

2

Monthly

3

Quarterly

4

Six Monthly

5

Annually

 

 

The mfMachinesSoftware table is used to relate machines to software products by storing the Id of each in the MachineId and SoftwareId fields, respectively. Each item in this table represents a software installation (an instance of the software installed on a machine). The Id of the machine that the software is installed on is, not surprisingly, stored in the MachineId field.

 

Alerts related to software installations are recorded in the mfAlerts table. The ItemId for the alert, along with the ItemType (which will be mfMachinesSoftware in this case) can be used to find any alerts that are related to each software installation. The AlertType field can contain one of various constant values as follows.

 

AlertType

Meaning

 

0

OK

1

New Item Detected

2

Item is missing

30

Publisher changed

31

Product code differs

32

Registered to a different owner

33

Registered to a different company

34

Product help link changed

35

New software version detected

 

 

Miscellany

 

DB_Miscellany

 

Miscellany is stored in the mfMiscellany table. The structure for this is fairly simple. SiteId is a lookup on Organizations (in the mfOrganizations table) which are managed sites (meaning IsManagedSite = 1/True). The details of any loans for miscellany items are recorded in the mfMiscellanyLoans table. Records in the mfMiscellanyLoans table that relate to a particular mfMiscellany record will have the Id of that record stored in the MiscellanyId field.