Propose a schema

Overview

For an explanation of what a schema is, see Schema overview.

You can use the in-built Geneos command Propose Schema to help you generate schema definitions for your samplers. The command proposes a schema definition for headlines and columns in every dataview in the sampler that are not described in a built-in schema.

The Propose Schema command is useful for adding the schema for:

  • Samplers with dataviews with additional columns and/or rows added using the Compute Engine.
  • Plug-ins where the content is user controlled. For example, the SQL-TOOLKIT, JMX, and TOOLKIT plug-ins.

The Propose Schema command is available:

  • As a button in the Publishing tab of a sampler in the GSE.
  • By right-clicking on a sampler or dataview in the Active Console 2.

    Note: Running the command on a dataview gives the same result as running on the parent sampler.

Propose Schema command

There are differences when using the Propose Schema command on the Active Console 2 and GSE:

  • When used in the GSE, the schema is automatically applied to the sampler.
  • When used in the Active Console 2, the schema appears as XML in a new window. You must then copy and paste this XML to your sampler.
    • You can also use this to create schema definitions as static variables.

Before using the Propose Schema command, please note the following:

  • The command attempts to deduce the data types of columns and headlines from each dataview. The deduced data types may be incorrect.
  • You must always supply any units of measure post-generation.
  • Any types or units of measure already defined by you in the Publishing tab of a sampler take precedence over those inferred from dataviews by the command.
  • Tables with only two columns are pivoted in the generated XML schema. A comment is included in the XML highlighting this.

Additionally, please note the following using the Propose Schema command in the GSE:

  • The command runs against all the samplers with same name on the Gateway. This process can take some time if you have many identically-named samplers.
  • The command times out after 30 seconds.
  • You can cancel waiting for the command result, but this does not stop the command running on the Gateway.

Examples

The following are examples of the output of Propose Schema:

  • If you have added two columns to the CPU sampler, this command generates only the schema definition for those additional columns.
  • A toolkit-like sampler does not have a built-in schema, and therefore the command generates a complete schema definition for the sampler.

How to propose a schema in the GSE

To generate a schema definition using the Propose Schema command in the GSE, follow these steps:

  1. Select the desired sampler in the GSE.
  2. Navigate to the Publishing tab of the sampler.
  3. Select Propose Schema.

    Note: If user-defined schema is already present for the sampler, a dialog opens asking you to if you wish to overwrite the schema information.

The generated schema is directly added to the Publishing section. Any existing schema definitions are overwritten.

After using the command, perform the following:

  1. Select Schema > Dataviews > Data.
  2. Review the schema for errors because the data types and pivoting inferred by the Propose Schema command may be incorrect.

    Note: If the value for Pivot is incorrect you must create the schema manually.

  3. Add any units of measure to the headlines and/or columns.

For more information about types, units of measure, and pivoting, see Gateway integration technical reference.

How to propose a schema in Active Console 2

To generate a schema definition using the Propose Schema command in Active Console 2, follow these steps:

  1. Make sure Gateway Hub is enabled in the GSE.
  2. Right-click on a sampler or dataview.
  3. Navigate to Sampler Schema.
  4. Select Propose Schema. The generated XML schema definition for the sampler appears in a new window.
  5. Right-click on the window with the generated XML in the Active Console 2 and select Copy All.
  6. Navigate to the GSE, right-click the correct sampler and select Paste Schema.
  7. Warning: No checks are performed when using Paste Schema on a sampler. Any existing schema is overwritten, and any copied schema can be pasted on to any sampler.

After using Paste Schema, perform the following:

  1. Navigate to the Publishing tab of the sampler to view the schema definition.
  2. Select Schema > Dataviews > Data.
  3. Review the schema for errors because the data types inferred by the Propose Schema command may be incorrect.
  4. Add any units of measure to the headlines and/or columns.
  5. (Optional) Specify pivoting.

For more information about types, units of measure, and pivoting, see Gateway integration technical reference.

Note: Paste Schema is only available when valid XML has been copied to the clipboard.

How to use Paste Schema to create static variables

The generated XML output of the Propose Schema command in the Active Console 2 can also be used to create sampler schemas as static variables. Schemas saved as static variables can be selected in the Publishing tab of a sampler.

To use the output of the Propose Schema command to produce schemas as static variables, follow these steps:

  1. Right-click on the window with the generated XML in the Active Console 2 and select Copy All.
  2. Navigate to the GSE.
  3. Right-click on Static variables > Sampler-schemas and select Paste Schema.
  4. A static variable containing a schema definition for each dataview in the copied sampler is created. The name used for the static variable is the name of the dataview.

After using Paste Schema, perform the following for each static variable:

  1. Review the schema for errors because the data types inferred by the Propose Schema command may be incorrect.
  2. Add any units of measure to the headlines and/or columns.
  3. (Optional) Specify pivoting.

For more information about types, units of measure, and pivoting, see Gateway integration technical reference.

Note: Paste Schema is only available when valid XML has been copied to the clipboard.