Using a mass template association
You use a mass template association to create or delete multiple event or history template associations in a group.
When using the mass association command, you specify:
- the type of template (event or history)
- an object type, such as ComMqsoftwareWebphereMQLocalQueue
- a template name, such as queueDepthChanged
- a topic instance path or regular expression to match multiple paths.
n
or -printOnly
parameter first to test the program for correct operation.Before you begin
Know the names and types of the objects you wish to associate.
To use the mass association command
- Open a command prompt in the InstallDir.
- Enter the following:
maketmpltassoc [-d] [-n] UserID [-p password] history | event template_object_type template_name [regex | instance name]* [-s|-v|-z]
where the parameters are as described in the table below.
The program validates the parameters and finds instances that match the topic path or regular expression. For each match, the tool checks for existing associations for that object. In the History Service an object can be associated with a template or a concrete rule, but not both. Restart the Monitor Console to see the changes.
Parameters and short and long switches
Description
-?
,--usage
Print out the program usage
-d
,--delete
Delete any templates matching the parameters.
-n
,--printOnly
Only display the matches; don't create the associations.
-p
,--password
apassword
The password for the user id. The default behavior is to read the password from the console. Cannot be used with -s.
-s
Read stdin for password. Cannot be used with -p.
-v
,--version
Print out the product version.
history | event
Enter the name of the template you want to associate. Use the word history or event or the letters h or e. This parameter is not case-sensitive. Any type that exists in the history template or event template tab of the Monitor Console is allowed in the maketmpltassoc tool.
regex
b |instance name
The full instance name of an object or a Perl-compatible regular expression matching multiple topic paths to associate with the template. The services on Windows require that you provide the hostname (first object in an instance name) as all uppercase letters. For services on UNIX, uppercase is not required. t
emplate_name
cThe name of the template used to create the rules. This can be a substring of the template name as long as it is unique when expanded. Case-sensitive.
template_object_type
cThe type of object the template should be applied to when creating rules. This can be a substring of the type name as long as it is unique when expanded. Case-sensitive.
userid
A valid, case-sensitive user ID.
- For the highest level of security, passwords are entered from the console by default. This can be time-consuming if you are processing a multiple line directive file because the password is requested for each command. This can be overridden with either '-p' or 'password' followed by the password on the command invocation line or '-s' which reads from stdin for the password, all of which are mutually exclusive.
- The regular expression is not bound to the beginning or end of the topic instance path name. Therefore, whatever is passed in as the regular expression acts as a regular expression sub-string match. If "e" is passed as the regular expression then every topic instance path that contains the letter 'e' is [dis]associated.
- template_name and template_object_type can be regular expression substrings of the actual values. If names contain spaces they must be quoted as illustrated in the examples in this section.
Note
When creating or deleting associations:
- If the object is already associated (creating) or not associated (deleting), the program notifies you and skips the object.
- Otherwise, the program creates or deletes the object and reports on the success or failure of the process.
Comments
Log in or register to comment.