Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

COSMOS CBE RDB

Revision as of 11:41, 3 June 2007 by Hkyleung.ca.ibm.com (Talk | contribs) (Running the CBE data collection and query sample)

Cbe2rdb.jpg

Problems encountered

  1. database mapping:
    • There are fields in the TPTP database model that not part of the CBE spec, but required for the TPTP log analyzer to work. If we ignore these fields, the DB populated by this usecase can't be used by TPTP.
    • Timestamp is String in data object but is double in database
    • ID generation: TPTP DB schema does not use auto ID generation function of derby. The ID field is not part of the data model. iBatis requires a one-to-one mapping between object member variable with database column. I have now changed the TPTP schema to use auto key generation function. Another solution is to wrap the objects with a subclasses that contains the id field, but it's a more heavy weight solution.


Ideally, we want:

  • The datasource be able to monitor live data and reading in static log files.
  • The data collected using the COSMOS datacollection be able to be used by COSMOS web front end via the query interface and by TPTP workbench.

Running the CBE data collection and query sample

  • Follow instruction at COSMOSDataCollectorEnvironment to set up development environment.
  • Set up CBE database (use derby 10.1.2.1)
    • script: org.eclipse.cosmos.dc.sample.components/src/org/eclipse/cosmos/dc/sample/components/sink/cbe/CreateDatabaseAndTablesCloudscape_cosmos.sql
    • update database URL in database.properties file at org.eclipse.cosmos.dc.sample.components/src/org/eclipse/cosmos/dc/sample/components/sink/cbe/database.properties
  • Update CBEPersistor.xml to point to a apache log.
<pu:Property propertyName="directory" propertyValue="C:\demo\cosmos\logs"/>
<pu:Property propertyName="fileName" propertyValue="net_access_log.log"/>
  • At osgi prompt, load CBE assembly and query configurations:
dc load CBEPersistor.xml
dc load CBEQuery.xml
dc load CBECount.xml
  • Activate data collection:
dc activate CBEPersistor
  • List all CBE in database:
spec query cbe
  • List CBE count by severity, grouped by component
spec query cbeCount

Back to the top