Create a schema

Overview

You can create user defined schema and add these to Gateway samplers. There are two ways to create a user defined schema in Geneos, you can create a schema manually or you can use the in-built Geneos command Propose Schema to help you generate schema definitions for your samplers.

When connected to a running Gateway you should use the Propose Schema command to create schemas. When creating and editing XML configuration files without being connected to a Gateway, you should create schemas manually.

If you are not familiar with schemas, see Schema overview.

How to define a schema manually

To define a schema manually, perform the following:

  1. Open your Gateway Setup Editor.
  2. Navigate to the Publishing tab of the sampler you want to make a schema for.
  3. In Schema > Dataviews, click Add new.
    You must provide an entry for each dataview in the sampler that requires a schema definition.
  4. In the Dataview field, enter the name of the dataview.
  5. In the Schema field, choose data.
  6. Click Data.
  7. Add as many new Headlines and Columns entries as you require.
  8. In the Name field, add the name of the headline or column in the dataview.
  9. Under options, choose the type of data represented by the headline or column.
    If you choose Int32, Int64, Float32 or Float64, select the appropriate Unit of measure.
  10. (Optional) If the dataview is pivoted, tick the box by Pivot.
  11. Close the tab.
  12. Click Validate current document to review any errors.
  13. Click Save current document .

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

The Propose Schema command

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.

You can run the Propose Schemacommand from the Active Console or the GSE, it will act differently depending on which component you are using.

When using the Gateway Setup Editor:

  • The schema is automatically applied to the sampler.
  • The command runs against all the samplers with using the same plugin on the Gateway. This process can take some time if you have many samplers using the same plugin.
  • 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.

When using the Active Console:

  • When used in the Active Console, 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.

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

When using the Gateway Setup Editor running the Propose Schema command will query the Gateway and all its running instances of the sampler in order to build the schema.

Caution: Proposing a schema is computationally intensive and may impact the performance of a Gateway.

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

In Active Console you can use the Propose Schema command to build schema for specific dataviews. This will not effect any connected Gateways.

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

  1. Make sure Gateway Hub is enabled in the GSE.
  2. Right-click 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 the window with the generated XML in the Active Console 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 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 and select Copy All.
  2. Navigate to the GSE.
  3. Right-click 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.