COSMOS DEMO i9

From Eclipsepedia

Jump to: navigation, search
Image:edit-clear.png This page has been marked for deletion by the administrators. If this request is rescinded, please explain in Discussion.
This page provides instructions on how to install and run the COSMOS demo for i9. For i10 instructions, see COSMOS DEMO i10.

Contents

Objective of the Demo

The COSMOS Demo illustrates the main features of COSMOS.

Installation

Download COSMOS Demo and Prerequisites

This section provides instructions for installing and running the demo program that is provided in the COSMOS i9 build.

  1. Install Tomcat 5.5.25. The directory where the Tomcat server is installed will be referred to as the <tomcat_install_dir> in this document.
  2. From the COSMOS download page, click on the link of the latest candidate build for i9. Download the zip file under the "COSMOS Demo" section.
  3. Unzip the demo zip file to a directory. You will see a directory called "cosmos-demo". This directory will be referred to as <cosmos-demo> in this document.
  4. Copy all directories under <cosmos-demo>\webapps to <tomcat_install_dir>\webapps.

Configurations

  • At a Windows command prompt, enter <cosmos-demo>\bin.
  • Run configDemo.bat to update some configuration files according to your system environment.
  • The configDemo program assumes:
    • You have copied the cosmos directory to the webapps directory in Tomcat by following the instructions in the previous section.
    • Your <cosmos-demo> directory and the tomcat installation are on the same host.
  • The program will prompt you for some input. You will see something like the following in a successful execution of the config program.
This program will configure some environment variables for the COSMOS demo to run. 
We assume that the Tomcat server and the directory where you unzipped the demo program are on the same computer.
Apache Tomcat install directory: D:\Program Files\apache-tomcat-5.5.25
Hostname of the Tomcat server (e.g. www.eclipse.org): mydomain.com
Tomcat port number: 8080
COSMOS Demo install directory: D:\cosmos\i9\cosmos-demo
Set management domain EPR for broker successfully.
Set management domain EPR for Example MDR successfully.
Set management domain EPR for SML MDR successfully.
Set management domain EPR for logging data manager successfully.
Set CBEData.dir for logging data manager successfully.
Set management domain EPR for stat data manager successfully.
Set derby.system.home for statistical data manager successfully.
Updated SML MDR config file successfully.

Starting the COSMOS components

After you have configured the program by following instructions in the previous section, start Tomcat by running <tomcat_install_dir>/bin/startup.bat. By starting the web server, the management domain, broker, data managers, reporting and user interface will be started. The broker and data managers will be registered with the management domain and the broker respectively automatically on start up. This activity may take a few seconds and you can monitor it by viewing the tomcat console.

Note: You need to set JRE_HOME or JAVA_HOME before running startup.bat.

After the COSMOS components have successfully started, you can use the COSMOS command line demo application and/or the COSMOS UI to interact with the COSMOS components.

Using the COSMOS command line demo application

Get Brokers registered at the Management Domain

  • Execute <cosmos-demo>\bin\domainEPR.bat. This program will ask you for your hostname and port number of the Tomcat server, and prints out the EPR (Endpoint Reference) of the management domain; this reference is expressed in XML format. Copy the EPR of the management domain to a scratch editor window, such as in Notepad. You will use it later.
  • If COSMOS command line client has not started, execute <cosmos-demo>\cosmos-client\cosmosClient.bat.
  • Get a list of brokers at the management domain with the "domain getBrokers" command:
COSMOS> domain getBrokers 
Management Domain EPR (terminate by an empty line): 
<?xml version="1.0" encoding="UTF-8"?> 
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> 
    <wsa:Address>http://localhost:8080/cosmos/services/domain</wsa:Address> 
</wsa:EndpointReference> 

EPR of brokers: 
Broker 1: 
<?xml version="1.0" encoding="UTF-8"?> 
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> 
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"/> 
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/cosmos/services/broker</wsa:Address> 
</wsa:EndpointReference> 

Get Data Managers Registered at the Broker

  • At the COSMOS prompt, type "broker getDataManagers". When prompted for the broker EPR, paste in the broker EPR that you got from the previous step. You will get a list of EPRs of data managers registered at the broker.
COSMOS> broker getDataManagers
Broker EPR (terminate by an empty line):
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"/>
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://___:8080/cosmos/services/broker</wsa:Address>
</wsa:EndpointReference>

EPR of data mangers:
Data Manager 1:
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://____:8080/stat/services/org.eclipse.cosmos.dc.stat.datamgr.StatisticalDataManager</wsa:Address>
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">StatDataManager</muse-wsa:ResourceId>
    </wsa:ReferenceParameters>
</wsa:EndpointReference>
Data Manager 2:
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://____:8080/smlmdr/services/org.eclipse.cosmos.rm.sml.mdr.impl.SmlRepositoryMdr</wsa:Address>
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">SML_REPO_ID</muse-wsa:ResourceId>
    </wsa:ReferenceParameters>
</wsa:EndpointReference>
Data Manager 3:
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://____:8080/examplemdr/services/org.eclipse.cosmos.example.mdr.ExampleMdr</wsa:Address>
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">Example</muse-wsa:ResourceId>
    </wsa:ReferenceParameters>
</wsa:EndpointReference>
Data Manager 4:
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://____:8080/logging/services/org.eclipse.cosmos.dc.logging.datamgr.LoggingDataManager</wsa:Address>
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">LoggingDataManager</muse-wsa:ResourceId>
    </wsa:ReferenceParameters>
</wsa:EndpointReference>

Executing CMDBf Queries

Using a command line client

  • We can execute CMDBf queries using the command line client.
  • At the COSMOS prompt, type "smlmdr query" followed by the path to the query file to run a query against the SML MDR. If you are querying the Example MDR, the command is instead "examplemdr".
  • The query files for the SML MDR are located in <cosmos-demo>\cosmos-client\cmdbf-queries\SMLMDR.
  • The query files for the Example MDR are located in <cosmos-demo>\cosmos-client\cmdbf-queries\ExampleMDR.
  • When prompted for the EPR for the SML MDR or the Example MDR, you can copy the EPR from the output of the "broker getDataManagers" command you did in the previous section.
COSMOS> smlmdr query _______\cosmos-demo\cosmos-client\cmdbf-queries\SMLMDR\testInstanceIdQuery.txt
EPR of SML Repository MDR (terminate by an empty line):
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address>http://____:8080/cosmos/services/org.eclipse.cosmos.rm.sml.mdr.impl.SmlRepositoryMdr</wsa:Address>
    <wsa:ReferenceParameters>
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">SML_REPO_ID</muse-wsa:ResourceId>
    </wsa:ReferenceParameters>
</wsa:EndpointReference>

Query response:
<?xml version="1.0" encoding="UTF-8"?><dyn:queryResponseType xmlns:dyn="http://www.eclipse.org/cosmos/mdrquery">
        <dyn:queryResponseType xmlns="http://cmdbf.org/schema/1-0-0/datamodel">
                <nodes templateId="cableTemplate">
........ Content omitted .........
                </nodes>
            </dyn:queryResponseType>
        </dyn:queryResponseType>
  • You can invoke queries on the Example MDR using the command line client.
COSMOS> examplemdr query _______\cosmos-demo\cosmos-client\cmdbf-queries\ExampleMDR\all-students.txt
EPR of SML Repository MDR (terminate by an empty line):
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address>http://_____:8080/examplemdr/services/org.eclipse.cosmos.example.mdr.ExampleMdr</wsa:Address>
    <wsa:ReferenceParameters>
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">Example</muse-wsa:ResourceId>
    </wsa:ReferenceParameters>
</wsa:EndpointReference>

Query response:
<?xml version="1.0" encoding="UTF-8"?><dyn:queryResponseType xmlns:dyn="http://www.eclipse.org/cosmos/mdrquery">
            <dyn:queryResponseType xmlns="http://cmdbf.org/schema/1-0-0/datamodel">
                <nodes templateId="items">
........ Content omitted .........
                </nodes>
            </dyn:queryResponseType>
        </dyn:queryResponseType>

Invoking Services of Data Managers

Collect Log Events from the Logging Data Manager

There are two types of log event information available from the logging data manager:

  • the actual event information
  • a summary of the types of events (e.g. Severe/Warning/Info) for each subcomponent

To obtain this information, use the CosmosClient.bat file mentioned in the above section. Note that when using 'logging' commands, you will be prompted for the EPR of the DataManager Enter it exactly as it is shown in the output of 'broker getDataManagers' for example

COSMOS> broker getDataManagers
Broker EPR (terminate by an empty line):
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost:8080/cosmos/services/broker</wsa:Address>
</wsa:EndpointReference>
EPR of data mangers:
Data Manager 1:
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8081/cosmos/services/org.eclipse.cosmos.dc.logging.datamgr.LoggingDataManager</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
<muse-wsa:ResourceId xmlns:muse- wsa="http://ws.apache.org/muse/addressing">LoggingDataManager</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>


So when the prompt says DataManager EPR (terminate by an empty line):

you enter

<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8081/cosmos/services/org.eclipse.cosmos.dc.logging.datamgr.LoggingDataManager</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
<muse-wsa:ResourceId xmlns:muse- wsa="http://ws.apache.org/muse/addressing">LoggingDataManager</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>

followed by a blank line.


First call logging getDatasets to get a list of available datasources like this:

COSMOS> logging getDatasets
DataManager EPR (terminate by an empty line):
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8081/cosmos/services/org.eclipse.cosmos.dc.logging.datamgr.LoggingDataManager</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
<muse-wsa:ResourceId xmlns:muse- wsa="http://ws.apache.org/muse/addressing">LoggingDataManager</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>

access_log.cbe.xml
windows_app_log.cbe.xml

Then, get the event info using logging getAllCBE <logfile> where 'logfile' is one of the data source files from the list obtained from logging getDatasets (e.g. access_log.cbe.xml).

COSMOS> logging getAllCBE access_log.cbe.xml
DataManager EPR (terminate by an empty line):
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8081/cosmos/services/org.eclipse.cosmos.dc.logging.datamgr.LoggingDataManager</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
<muse-wsa:ResourceId xmlns:muse- wsa="http://ws.apache.org/muse/addressing">LoggingDataManager</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>

This will print out a long list of CommonBaseEvent objects obtained from the logfile specified.

To get the event type summary, use logging getCBECountBySeverity <logfile> where 'logfile' is again a logfile from the list obtained by logging getDatasets. Using the same example:

COSMOS> logging getCBECountBySeverity access_log.cbe.xml
DataManager EPR (terminate by an empty line):
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8081/cosmos/services/org.eclipse.cosmos.dc.logging.datamgr.LoggingDataManager</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
<muse-wsa:ResourceId xmlns:muse- wsa="http://ws.apache.org/muse/addressing">LoggingDataManager</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>

Component Network Device
Severe 2
Warning 25
InfoCount 159

Component Apache HTTP Server
Severe 2
Warning 25
InfoCount 159

Collect webserver performance data from the statistical data manager

To get information from the statistical data manager, use the CosmosClient.bat mentioned in the above section. Similar to the 'logging' commands, when using 'stat' commands, you will be prompted for the EPR of the DataManager Enter it exactly as it is shown in the output of 'broker getDataManagers' for example

COSMOS> broker getDataManagers
Broker EPR (terminate by an empty line):
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost:8080/cosmos/services/broker</wsa:Address>
</wsa:EndpointReference>
EPR of data mangers:
Data Manager 1:
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8081/cosmos/services/org.eclipse.cosmos.dc.logging.datamgr.StatisticalDataManager</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
<muse-wsa:ResourceId xmlns:muse- wsa="http://ws.apache.org/muse/addressing">StatDataManager</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>


So when the prompt says DataManager EPR (terminate by an empty line):

you enter

<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8081/cosmos/services/org.eclipse.cosmos.dc.logging.datamgr.StatisticalDataManager</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
<muse-wsa:ResourceId xmlns:muse- wsa="http://ws.apache.org/muse/addressing">StatDataManager</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>

followed by a blank line.

First you have to call stat getDatasourceKeyset like this:

COSMOS> stat getDatasourceKeyset
DataManager EPR (terminate by an empty line):
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8081/cosmos/services/org.eclipse.cosmos.dc.logging.datamgr.StatisticalDataManager</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
<muse-wsa:ResourceId xmlns:muse- wsa="http://ws.apache.org/muse/addressing">StatDataManager</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>

server 33 tomcat1181829221515 CBE
server 33 tomcat1181829221515 TomcatSet

This will return the available dataset/keyset combinations available

Then use this information to call stat getStatDataForSource <dataset> <keyset> where dataset and keyset come the list obtained from stat getDatasourceKeyset

In the above example, the first line indicates that the dataset is "server 33 tomcat1181829221515" and the keyset is CBE. It is important to use quotes around the dataset argument, so that the parser does not think you mean dataset = server and keyset = 33.

In that case, you would call the client like this:

COSMOS> stat getStatDataForSource "server 33 tomcat1181829221515" CBE
DataManager EPR (terminate by an empty line):
<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8081/cosmos/services/org.eclipse.cosmos.dc.logging.datamgr.StatisticalDataManager</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
<muse-wsa:ResourceId xmlns:muse- wsa="http://ws.apache.org/muse/addressing">StatDataManager</muse-wsa:ResourceId>
</wsa:ReferenceParameters>
</wsa:EndpointReference>

Thu Jun 14 09:54:41 EDT 2007 ( server 33 tomcat1181829221515 = 2 )
Thu Jun 14 09:54:43 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:54:45 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:54:47 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:54:50 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:54:52 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:54:54 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:54:56 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:54:58 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:55:00 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:55:02 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:55:04 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:55:06 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:55:08 EDT 2007 ( server 33 tomcat1181829221515 = 3 )
Thu Jun 14 09:55:10 EDT 2007 ( server 33 tomcat1181829221515 = 2 )
Thu Jun 14 09:55:12 EDT 2007 ( server 33 tomcat1181829221515 = 2 )
Thu Jun 14 09:55:14 EDT 2007 ( server 33 tomcat1181829221515 = 1 )
Thu Jun 14 09:55:16 EDT 2007 ( server 33 tomcat1181829221515 = 1 )
Thu Jun 14 09:55:18 EDT 2007 ( server 33 tomcat1181829221515 = 1 )

The above example illustrates the format of the output.


Retrieve the CMDBf service metadata from the WSDL of the Example MDR

To get the WSDL information from the Example MDR, use the CosmosClient.bat mentioned in the above section. You will be prompted for the EPR of the Example MDR. Enter it exactly as it is shown in the output of 'broker getDataManagers'.

At the CosmosClient prompt, enter the "exampleMDR getWSDL" command as shown:

COSMOS> examplemdr getWSDL
EPR of SML Repository MDR (terminate by an empty line):
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/examplemdr/services/org.eclipse.cosmos.example.mdr.ExampleMdr</wsa:Address>
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">Example</muse-wsa:ResourceId>
    </wsa:ReferenceParameters>
</wsa:EndpointReference>

WSDL result: C:\COSMOS\cosmos-demo\cosmos-client\examplemdr.wsdl
MdrId:       ExampleMDRId
Description: null
 RecordType: student
 RecordType: teacher
 RecordType: class
COSMOS>

This will show some of the CMDBf service metadata from the WSDL. The complete WSDL will also be saved in the local file.


Using the COSMOS Web User Interface

Once you have started the COSMOS components as described above, point your web browser to http://localhost:8080/COSMOSUI/?page=cosmos

Getting Started

The initial page of the COSMOS Web User Interface displays three main panes. The right pane shows a list of data managers that are registered with the broker. The top left pane shows a detail view that is initially blank. The bottom left pane shows a properties view that is initially blank. The initial state of the COSMOS Web User Interface is illustrated below.

Image:Demoi9_gettingstarted.jpg

  • There are initially five data managers that are registered with the broker.
    • A Statistical Data Manager
    • An Asset Repository that contains asset information that is modelled using the Service Modeling Language(SML)
    • An Example Federating CMDB
    • An Example MDR that contains information related to students and teachers
    • A Logging Data Manager that collects log file information in the form of Common Base Events(CBE)

The end user can select a particular data manager to display properties associated with the data manager. The properties are shown in the bottom right pane in the Properties view. This is illustrated below:

Image:Demoi9_prop.jpg

Using the Statistical Data Manager

The Statistical Data Manager contains statistical observation that have been previously collected and saved within a database. The user can use the COSMOS UI to query the Statistical data manager for a list of data collection sessions and generate reports on the recorded data.

To show statistical data sources

  • The user can expand the "Statistical" node in the left pane to show a list of recorded statistical data sessions. Note that two data collection sessions have been recorded and saved. This is illustrated below.

Image:Demoi9_statlist.jpg

  • Note that the properties view shows the properties of the data collection session and shows the datasource, epr and keyset information.

To run the statistical data report

  • The user can generate a report on the collected data by right-clicking the session they want to generate the report on. A menu option should be shown to generate a "Statistical Report". The is illustrated below.

Image:demoi9_statreport.jpg

  • When the user clicks on the "Statistical Report" menu option the following report will be generated in the "Details" pane in the top right pane.

Image:demoi9_statreport2.jpg

Using the CBE Data Manager

The CBE data manager collects a set of log files in the form of Common Base Events. A set of log files have been previously collected. The user can use the COSMOS UI to query the CBE data manager for a list of log files and generate reports on the log data.

To show CBE data sources

  • The user can expand the "CBE" node in the left pane to show a list of log files managed by the data manager. This is illustrated below.

Image:Demoi9_cbelist.jpg

  • Note that the properties view shows the properties of the log file.

To run the CBE data report

  • The user can generate a report on the collected data by right-clicking the log file they want to generate the report on. A menu option should be shown to generate a "Top 10 Log Report". The is illustrated below.

Image:demoi9_cbereport.jpg

  • When the user clicks on the "Top 10 Log Report" menu option the following report will be generated in the "Details" pane in the top right pane.

Image:demoi9_cbereport2.jpg


Using the SML MDR

The SML MDR manages a repository that contains asset data that is modeled using the Service Modeling Language. The current repository contains asset information about a rack unit that has a set of mounted CPUs connected by cables and switches. Users can construct a CMDBf query to acquire asset information on these resources.

To submit a query

  • To submit a query on the SML Repository right click the "SML MDR" from the "Data Manager" view. A pop-up menu should be shown with a "Submit Query..." option as illustrated below.

Image:demoi9_smlmenu.jpg

  • Click on the option. This will bring up a dialog box that will allow the user to enter a CMDBf query. Let us submit the following CMDBf query. This query will get information on a cable.
<?xml version="1.0" encoding="UTF-8"?>
<s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel">
	<s:itemTemplate id="cableTemplate">
		<s:instanceIdConstraint>
			<s:instanceId>
				<s:mdrId>http://cosmos.org/rm/sml/repository</s:mdrId>
				<s:localId>Cable1.xml</s:localId>
			</s:instanceId>
		</s:instanceIdConstraint>
	</s:itemTemplate>
</s:query>
  • Enter the above CMDBf query in the Dialog box and click "Submit" as shown below.

Image:demoi9_smlsubmit.jpg

  • The graph response viewer should be shown in the details pane in the top right pane as shown below.

Image:demoi9_smlviewer.jpg

  • Click on the "Source" cell in the "Nodes and Edges" section of the view. The Record section of the view should show the cable information. Note that the asset information is displayed as a SML structure as follows:
<s:cable name="0001" xmlns:conn="connection" xmlns:ft="facetModel"     xmlns:it="http://www.cosmos.rm/dataCenter/core"     
xmlns:pm="propertyModel" xmlns:s="cable"     xmlns:sml="http://schemas.serviceml.org/sml/2007/02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">   
 <it:facets>        <it:facet>            <it:properties>                <pm:connector format="RJ45"/>            </it:properties>        </it:facet>        
<it:facet>            <ft:location>                <it:properties>                    <ft:position coordinate="in use"/>                </it:properties>            
</ft:location>        </it:facet>        <it:facet>            <it:properties>                <conn:connection>                    
<conn:source sml:ref="true">                        <sml:uri>
/DataCenterSample/hardware/networking/Switch1.xml#xpointer(/switch[@name="switch1"]/facets/facet/ports[@input="true"]/port[@number="0"])
</sml:uri>                    </conn:source>                    <conn:target sml:ref="true">                        <sml:uri>	
/DataCenterSample/hardware/networking/Router1.xml#xpointer(/router[@name="router1"]/facets/facet/ports[@input="false"]/port[@number="1"]) 					                    
</sml:uri>                 </conn:target>                </conn:connection>            </it:properties>        </it:facet>    
</it:facets></s:cable>

Using the Example MDR

The Example MDR manages a repository containing information on a set of students and teachers. The repository contains information such as the student's name, teacher's name and which students are taught by a particular teacher. Users can construct a CMDBf query to acquire the student or teacher information.

To submit a query

  • To submit a query on the Example MDR right click the "Example MDR" from the "Data Manager" view. A pop-up menu should be shown with a "Submit Query..." option as illustrated below.

Image:demoi9_exammenu.jpg

  • Click on the menu option. This will bring up a query builder dialog box that will allow the user to construct a CMDBf query. Let us build the following CMDBf query using the query builder. This query will get a list of students.
<?xml version="1.0" encoding="UTF-8"?>
<s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel">
	<s:itemTemplate id="items">
		<s:recordConstraint>
			<s:recordType namespace="" localName="student"/>			
		</s:recordConstraint>
	</s:itemTemplate>
</s:query>
  • The query builder is composed of three panes. The top level pane allows the user to create itemTemplate and relationshipTemplate nodes. Right click the "query" node in the top pane and select 'Add Item' as shown below.

Image:demoi9_exambuilder.jpg

  • This will bring up a second dialog box that allows the user to enter the template id. Enter the word 'items' in the text box as shown below.

Image:demoi9_examadditem.jpg

  • Notice that we constructed the following 'itemTemplate' node in the CMDBf query as illustrated in the XML shown in the previous step.
<s:itemTemplate id="items">
  • Select the 'itemTemplate' node in the bottom left pane to view the properties on the element. If we look at the XML structure of the CMDBf query we can notice that the query contains a 'recordContraint' element under the itemTemplate. Therefore, we need to add a recordConstraint element under the 'itemTemplate' node by right clicking the 'itemTemplate' node and selecting the 'add recordConstraint' menu option as shown below.

Image:demoi9_examrecordConstraint.jpg

  • Next we need to add a 'recordType' element under the 'recordConstraint' node. This time we right click the 'recordConstraint' node in the bottom left pane and select the 'add recordType' menu option as shown below.

Image:demoi9_examrecordType.jpg

  • Now we need to set the localName on the recordType element to 'student'. Click on the cell next to the 'localName' cell in the bottom right table. This will allow you to edit the attribute value. Enter the word 'student' in the text box and click enter as shown below.

Image:demoi9_examedit.jpg

  • At this point we constructed the CMDBf query and we are ready to submit the query to the Example MDR. We can click the "Preview XML" button to look at the CMDBf query we constructed. This is illustrated below:

Image:demoi9_exampreview.jpg

  • Click the 'Submit' button.
  • The graph response viewer should be shown in the details pane in the top right pane as shown below. The view will show a list of three students

Image:demoi9_examview.jpg

  • Click on the "Source" cell in the "Nodes and Edges" section of the view. The Record section of the view should show the information on a particular student. Note that the student information is displayed as a XML structure as follows:
<student>
   <identity firstName="Mike" id="03" lastName="Lee"/>
</student>

Using the Registration Example CMDBf

To register configuration items with the test Federating CMDB

  • start the COSMOS UI
  • right-click on the "Registration Example" Data Manager
  • select "Register Configuration Items..." on the popup menu

Image:COSMOS_I9_Register1.JPG

  • In the "Register MDR Configuration Items" window, select the "Example MDR"

Image:COSMOS_I9_Register2.JPG

  • Press the "Register" button
  • A list of configuration items will be displayed showing status results

Image:COSMOS_I9_Register3.JPG


To Deregister configuration items from the test Federating CMDB

  • start the COSMOS UI
  • right-click on the "Registration Example" Data Manager
  • select "DeRegister Configuration Items..." on the popup menu

Image:COSMOS_I9_DeRegister1.JPG

  • In the "DeRegister MDR Configuration Items" window, select the "Example MDR"

Image:COSMOS_I9_DeRegister2.JPG

  • Press the "DeRegister" button
  • A list of configuration items will be displayed showing status results

Image:COSMOS_I9_DeRegister3.JPG

Copyright © 2009 The Eclipse Foundation. All Rights Reserved

Personal tools