Page tree

Use this command to list or update Indexer templates.

Note

BMC recommends that you do not update the templates unless you are instructed to by BMC Customer Support.

When an index is created a suitable template is automatically applied to that index. Based on the kind of data contained in the index, a matching template is applied. The template determine how the indexed data will be analyzed and interpreted by the product.

Data indexed based on a data pattern contains fields stored with particular field types. These field types are stored in the dynamic template.  Based on the field types, the product will determine if those fields need to be interpreted as aplhanumeric (STRING) or numeric (INTEGER, LONG, and so on). Similarly, other templates are applied on particular kinds of data and based on the template applied, that data is analyzed and interpreted.  

The following kinds of templates are available:

  • Dynamic template (named dynamic_template_1): Applied to both data index types and metrics index types.
  • Metadata template (named itda_metadata): Applied to the metadata index type.
  • Configuration template (named itda_config): Applied to an index containing status about the last ten polls for data collectors. 

These templates are located at %BMC_ITDA_HOME%\conf\server\indexertemplates\.

For more information about the index types, see indexlist CLI command.

To understand the syntax and examples, see:

Syntax

Note

Prefix this command with the following, as appropriate:

  • For Windows: itda.bat
  • For Linux: ./itda.sh

indexertemplates -d <hostname> -p <portNumber> -u <username> -w <password> -ops <operationName> -f <fileDetails> -tname <templateName> [-l <locale>] [-s] [-v]

  • Angle brackets (< >) indicate a variable value that needs to be user defined.
  • Square brackets ([ ]) indicate optional parameters.

The following table describes the parameters used in the syntax:

ParameterDescription
-ops

Name of the operation that you want to perform by using this command.

Depending on the kind of operation you want to perform, the value can be one of the following:

  • To list details of a template, specify list.
  • To update a template with new details, specify update.

Note: The update operation allows you to apply the updates made to the template file. To change a property in a template, you need to change the value of the property in the template file. If the property is not already present in the file, you need to add the property with the corresponding new value. After making the changes and saving the template, you need to run this command with the update operation to apply the new changes. Unless you run the command, manual changes made to the file are not registered.

-f

File details including the file name and complete path of the file.

This parameter is only applicable while running the list operation.

When you run the list operation, the template details are listed in the specified file.

-tname

Name of the template on which the specified operation needs to be performed.

You can choose to perform an operation on an individual template or on all the templates.

The value can be one of the following:

  • Dynamic template: dynamic_template_1 
  • Metadata template: itda_metadata
  • Configuration template: itda_config
  • All templates: all
-d
Host name of the Console Server
-p
Port number of the Console Server.
-u
User name to use to connect with the Console Server.
-v
(Optional) Version of the IT Data Analytics product.
-w
Password corresponding to the user name to use to connect with the Console Server.
-l

(Optional) Indicates the locale in which you want to display messages when the command is run.

You can set one of the following locales:

  • English
  • Simplified Chinese
  • German
  • French

By default, the messages are displayed in the locale of the system on which the CLI is run.

The value can be set to one of the following depending on the locale you choose:

  • English: en
  • Simplified Chinese: chs
  • German: de
  • French: fr

Example: If you want to set the locale as Simplified Chinese, you need to specify, l=chs.

-s
(Optional) Indicates an HTTPS connection.

Example inputs

The following example provides the input for listing details of all the templates on a Windows machine.

indexertemplates -u admin -w admin12345 -p 9797 -d localhost -ops list -f C:\template.json -tname all

The following example provides the input for updating the property, "index.codec": "best_compression" in the "dynamic_template_1" template.

Note: Before performing the update, you need to first add "index.codec": "best_compression" in the template and save the template.

indexertemplates -u admin -w admin12345 -p 9797 -d localhost -ops update -tname dynamic_template_1
  • No labels