Moogsoft Docs

Example of CMDB data load


Below is a conceptual model for populating Moog's Entity Catalog:

The diagram above shows a Service associated to one Process, one Competency, and one Group.  A Host can be associated to zero or one Service, and to zero or one Group.  Many Hosts can be associated to one Service.  Many Services can be associated to one Process.  Groups may or may not be associated to a Competency, and a Competency can be associated to only one Group.  Moog's Entity Catalog schema could support variations on this model. This model is presented here as a typical example for illustrative purposes.

Assume the following sample data:


Competency
Id Name Description Group
1 Generic (pre-defined in Moog) All

Competency A Competency A Applications

Competency B Competency B Applications
Process
Name Description
Bar Process A Bar Process A
Bar Process B Bar Process B
Service
Name Description Process Group Competency
Foo Service A Foo Service A Bar Process A Applications Competency A
Foo Service B Foo Service B Bar Process B Applications Competency B
Host
Name Description Service Group Competency
Host 1 Host 1 Foo Service A Applications Generic
Host 2 Host 2 Foo Service A Compute Generic
Host 3 Host 3 Foo Service B Applications Generic
Host 4 Host 4 Foo Service B Compute Generic
Group
Id Name Description
2 All (pre-defined in Moog)
3 Compute (pre-defined in Moog)
5 Applications (pre-defined in Moog)


For the sample data above, the following SQL will populate the required tables (ENTITY_CATALOG, PROCESSES, SERVICES, and COMPETENCIES):


Load Entity Catalog


insert into moogdb.competencies values (0,5,'Competency A','Competency A');
insert into moogdb.competencies values (0,5,'Competency B','Competency B');
insert into moogdb.processes values (0,'Bar Process A','Bar Process A');
insert into moogdb.processes values (0,'Bar Process B','Bar Process B');
insert into moogdb.services values (0,'Foo Service A','Foo Service A');
call moogdb.add_named_to_catalog('Foo Service A','','',0,1,0,'','Foo Service A','','Bar Process A','Foo Service A',5,'Competency A');
insert into moogdb.services values (0,'Foo Service B','Foo Service B');
call moogdb.add_named_to_catalog('Foo Service B','','',0,1,0,'','Foo Service B','','Bar Process B','Foo Service B',5,'Competency B');
call moogdb.add_to_catalog('Host 1','', '',0,2,'Foo Service A','','Host 1','','','',5,1);
call moogdb.add_to_catalog('Host 2','', '',0,2,'Foo Service A','','Host 2','','','',3,1);
call moogdb.add_to_catalog('Host 3','', '',0,2,'Foo Service B','','Host 3','','','',5,1);
call moogdb.add_to_catalog('Host 4','', '',0,2,'Foo Service B','','Host 4','','','',3,1);