How to create tables to store monitoring information Learn how to create tables to store monitoring information

In this tutorial, you will create a new MySQL database for the monitoring data.

The tLogCatcher, tStatCatcher, tFlowMeterCatcher need a table each to store the data. In this exercise, you will use the tCreateTable component to create the needed tables.

Download it!

Do you want to practice?

Download tutorialProject.zip includes all the jobs needed to carry out this tutorial. Please, download it!

You can also:
Send it!

Share it!
Next Step: [Working with global context variables]

 


In the Repository:

Right-click on Job Designs.

In the menu, click Create Job to open the New Job wizard.

In the wizard, name the Job: Exercise15.

Next

Create a new MySQL database called amc:

The easiest way to do so is to drag and drop an existing MySQL connection metadata and click tMysqlRow on the [Components] dialog box.

Click OK to drop the component in the Job Designer.

Next

In the Job Designer:

Double-click the tMysqlRow to display the Component view.

In the Query field, type in the following MySQL code: "create database amc" to create the new database.

Press F6 to execute the Job.

Once your database is created, righ-click the tMysqlRow and click Deactivate as it is not useful anymore.

Next

In the Repository:

Create a new database connection called monitoring.

To do so, expand the Metadata node.

Right-click Db Connections and click Create connection in the menu to open the Database Connection wizard.

Next

In the Database Connection wizard:

Fill in the Name field with the name of the connection: monitoring.

Click Next.

Next

In the Database Settings area:

In the DB Type list, select the type of database you want to connect to.

In the Login and Password fields, fill in the login and password used to connect to the database.

In the Server field, fill in the name ou IP address of the server on which the database is stored.

In the Port field, fill in the listening port number of the database server.

In the Database field, fill in the name of the database you want to connect to.

Click Check to verify the database connection.

Click Finish.

Next

Step 1: Retrieve the schema of the tLogCatcher


In the Palette:

Click the Logs & Errors folder.

Click the tLogCatcher and drop it on the Job Designer.

Next

In the Palette:

Click the Logs & Errors folder.

Click the tStatCatcher and drop it on the Job Designer.

Next

In the Palette:

Click the Logs & Errors folder.

Click the tFlowMeterCatcher and drop it on the Job Designer.

Next

In the Job Designer:

Double-click the tLogCatcher to display its Component view.

Click [...] next to the Edit schema field to open the Schema wizard.

In the Schema wizard, click the Save as generic schema button.

Next

In the Save as generic schema wizard:

Fill in the Name field: logcatcher.

Click Finish.

Next

In the Repository:

The logcatcher metadata is dispayed in the Metadata > Generic schemas node.

Next

Step 2: Retrieve the schema of the tStatCatcher


In the Job Designer:

Double-click the tStatCatcher to display its Component view.

Click [...] next to the Edit schema field to open the Schema wizard.

In tne Schema wizard, click the Save as generic schema button.

Next

In the Save as generic schema wizard:

Fill in the Name field: statcatcher.

Click Finish.

Next

Step 3: Retrieve the schema of the tFlowMeterCatcher


In the Job Designer:

Double-click the tFlowMeterCatcher to display its Component view.

Click [...] next to the Edit schema field to open the Schema wizard.

In the Schema wizard, click the Save as generic schema button.

Next

In the Save as generic schema wizard:

Fill in the Name field: flowmetercatcher.

Click Finish.

Next

The three schemas corresponding to the three components are now stored in the Repository under the Generic schemas node.

Next

Rigt-click on each tLogCatcher, tStatCatcher and tFlowMeterCatcher components and Deactivate it.

In the Palette:

Click the Databases folder.

Click the tCreateTable component and drop it on the Job Designer. This way, drop three tCreateTable on the Job Designer.

Link the three components with OnSubjobOK links. Right-click on the first component and select Trigger > OnSubjobOK in the menu, then click the next component and do it again.

Next

Step 4: Add the tCreateTable component to create the 3 tables


In the Job Designer:

Create the logcatcher table in the amc database.

Double-click the first tCreateTable to display its Component view.

In the Property Type list, select Repository and click [...] to select the monitoring database connection metadata. The following fields are automatically filled in.

In the Table Name field, type in "logcatcher".

In the Schema Type list, select Repository and click [...] to select the logcatcher generic schema metadata.

Next

The same way, create the statcatcher table using the monitoring database connection metadata and the statcatcher generic schema metadata.
Next

The same way, create the flowmetercatcher table using the monitoring database connection metadata and the flowmetercatcher generic schema metadata.

Next

In the Repository:

Right-click the monitoring database connection metadata, select Retrieve Schema in the menu and follow the steps to retrieve the schemas of the logcatcher, statcatcher and flowmeter table.

Click the Project Settings button to open the Project settings wizard.

Next

In the Project settings wizard:

Expand the Job Settings node and click Stats & Logs to configure the stats and logs catching.

Check the Use statistics, Use logs and Use volumetrics boxes.

Check the On Databases box and configure the following fields.

In the Property Type list, select Repository and click [...] to select the monitoring database connection metadata.

In the Stats Table, Logs Table and Meter Table fields, type in the names of the stats and logs tables.

Check the Catch components statistics box.

Next

Press Ctrl+S to save the Job.

Press F6 to run it.

Next
The tables are now created and the monitoring management is defined.



 

    Download it!     Send it!     Share it!

Do you want to practice?

Download tutorialProject.zip includes all the jobs needed to carry out this tutorial. Please, download it!

Friends / colleagues may be interested in this tutorial? Send it to them!

You liked this tutorial ? Support it!

[ top ]