Command button definition file (cmdbtn.conf)
- Organization of this page
Format
DESC_VERSION=file-version #comment-line def [usr target-user-name target-user-name ...] btn command-button-name [cmt comment-about-command-button] [cmdtype {agent|client}] [inev {true|false}] [hst target-host] cmd command-line [var environment-variable-file-name] [qui {true|false}] [preview {true|false}] end-btn : : end-def : :
File
cmdbtn.conf
Storage directory
- In Windows
-
- For a physical host:
-
Console-path\conf\console\rmtcmd\
- For a logical host:
-
shared-folder\jp1cons\conf\console\rmtcmd\
- In UNIX
-
- For a physical host:
-
/etc/opt/jp1cons/conf/console/rmtcmd/
- For a logical host:
-
shared-directory/jp1cons/conf/console/rmtcmd/
Execution permission
- In Windows
-
Administrators group and SYSTEM users
- In UNIX
-
Users with the root permissions
Description
This file defines the command buttons to be displayed in the Execute Command window. The maximum size of the command button definition file is 10 megabytes. If there are multiple command button definitions that can be used, the definition listed first in the command button definition file is displayed.
When the definitions are applied
If the jcoimdef command has been executed to enable the command button, the command button definitions are applied when the Execute Command window opens.
Note that if you change the definition of the command button while JP1/IM - View is running, you must restart JP1/IM - View.
Information that is specified
- DESC_VERSION=file-version
-
Specifies the version of the format of the command button definition file. The specifiable values are 1 and 2. To use the functionality that inherits the client application or event information, specify 2. When 2 is specified, the following parameters can be specified:
-
cmdtype
-
inev
-
preview
When the file version is omitted or a numeric value other than 1 or 2 is specified, 1 is assumed.
-
- #comment-line
-
A line beginning with a hash mark (#) is treated as a comment.
- def to end-def (definition block)
-
These are the start and end parameters of the command button definition. You can specify a maximum of 64 parameters.
- [usr target-user-name target-user-name ...]
-
Specifies the names of JP1 users who use the command button. The number of characters you can specify for each target user name is from 1 to 31 bytes. Only one-byte alphanumeric characters can be used. Alphabets are not case sensitive. To specify multiple names, separate the names by one or more consecutive spaces or tabs. You can specify a maximum of 100 target user names. Target user names from the 101st are ignored. If this parameter is omitted, all JP1 users become target users. One target user name can be specified between def and end-def. No target user names can be specified between btn and end-btn.
- btn command-button-name to end-btn
-
Specify the start and the end of a command button. command-button-name is displayed as the name of a command button in the Execute Command window. You can specify a maximum of eight characters for command-button-name. Specifiable characters are characters other than control characters (0x00 to 0x1F, 0x7F to 0x9F). The command button name is case sensitive. A maximum of 16 command buttons can be specified in a definition block. The same command button name cannot be specified twice. If command-button-name exceeds the limit for number of characters or the same command button name is specified twice, the command button name cannot be loaded.
- [cmt comment-about-command-button]
-
Provides a description of the command button. The comment is displayed as a tool tip. This parameter can be omitted. You can specify a maximum of 40 characters for the comment. Characters from the 41st are ignored. You can specify any characters.
- [cmdtype {agent|client}]
-
Specifies the type of command executed by a command button. Select whether the button will be used for managed-host commands or by client applications. Client applications are executed by the client application execution functionality. If you specify this parameter, specify 2 for DESC_VERSION.
For command execution on an agent or a manager host, specify the agent parameter. For command execution by a client application, specify the client parameter.
If you specify client for cmdtype, you cannot specify the hst and var parameters.
agent and client are not case sensitive.
- [inev {true|false}]
-
Specifies whether to inherit event information by using the command button. If you specify this parameter, specify 2 for DESC_VERSION.
Specify true to execute the command by inheriting event information specified when you click the command button, or specify false not to execute the command. If this parameter is omitted, false is assumed.
true and false are not case sensitive.
- [hst target-host]
-
Specifies the name of the host on which the command is executed. For target-host, you can specify a host name, host group name, business group name, or monitoring group name.
For a host name or a host group name, you can specify a character string with a maximum of 255 bytes. For a business group name or a monitoring group name, you can specify a character string with a maximum of 2,048 bytes. This parameter can be omitted.
If the integrated monitoring database and the IM Configuration Management database are enabled, the business group name can be specified in a path format.
If the integrated monitoring database and the IM Configuration Management database are disabled, and you specify the business group name in a path format, the name is treated as a host name or a host group name.
Specify a variable to hold the inherited event information. For details about the inherited event information that can be specified, see 4.19.5(1) Specifiable event inheritance information in the JP1/Integrated Management 2 - Manager Overview and System Design Guide. To specify inheritance of event information, specify true for the inev parameter. If you make this specification, make sure that the length of the character string following replacement of the variable with JP1 event information is equal to or less than the maximum number of bytes permitted for target-host. If the length of the character string exceeds the limit, a truncated character string is specified as the target host name in the environment variable file.
- cmd command-line
-
Specifies the command to be executed. You can specify a maximum of 4,096 bytes for the command line. This parameter cannot be omitted.
Specify a variable to hold the inherited event information. To specify inheritance of event information, specify true for the inev parameter. If you make this specification, make sure that the length of the character string following replacement of the variable with JP1 event information is equal to or less than the maximum number of bytes permitted for target-host. If the length of the character string exceeds the limit, a truncated character string is specified as the target host name in the environment variable file.
- [var environment-variable-file-name]
-
Specifies the name of the environment variable file in which the environment variable of the command to be executed is specified. This parameter can be omitted. For details about the environment variable file format, see the JP1/Base User's Guide. You can specify a character string with a maximum of 255 bytes for the environment variable file name. If the environment variable file name exceeds the limit, the command button is not loaded.
Specify a variable for the inherited event information. To specify inherited event information, specify true for the inev parameter. When you specify inherited event information, make sure that the length of a character string following replacement of the variable with JP1 event information is equal to or less than the maximum number of bytes permitted for the environment variable file. If the length of the character string exceeds the limit, a truncated character string is specified as the target host name in the environment variable file.
- [qui {true|false}]
-
Specifies whether to display a message confirming that the command can be executed before executing a command with a command button. If the confirmation message is not displayed, the command is executed at the same time the command button is clicked.
Specify true if you want the confirmation message to be displayed. Specify false if you do want the message to be displayed. If this parameter is omitted, false is assumed. However, if true is specified for the preview parameter, the Preview Command Execution Content window opens.
true and false are not case sensitive.
- [preview {true|false}]
-
If you inherit event information by using a command button, this parameter specifies whether to check the action definition of the command with the preview function after event information is inherited. To specify this parameter, specify 2 for DESC_VERSION.
Specify true to display the preview window. Specify false if you do not want to display the preview window. If this parameter is omitted, true is assumed.
true and false are not case sensitive.
This parameter is ignored if false is specified for the inev parameter.
If false is specified for the preview parameter and true is specified for the qui parameter, the command is executed at the same time the command button is clicked. The Preview Command Execution Content window and a message to confirm command execution are not displayed.
Example definition
DESC_VERSION=2 def # Execute the command on the viewer host. # Specify inherited event information for the command to be executed. # Before executing the command, display the preview window. btn App1 cmt Execute App1. cmdtype client inev true cmd C:\kansi\app1.exe $EVIDBASE $EVSEQNO "$EVMSG" end-btn # Execute the command on the viewer host. # Specify inherited event information for the command to be executed. # Before executing the command, display the confirmation dialog box. The preview window is not displayed. btn App2 cmt Execute App2. cmdtype client inev true cmd C:\kansi\app2.exe $EVIDBASE $EVSEQNO "$EVMSG" preview false end-btn # Execute the command on the viewer host. # Specify inherited event information for the command to be executed. # Do not display the dialog box and the preview window before executing the command. btn App3 cmt Execute App3. cmdtype client inev true cmd C:\kansi\app3.exe $EVIDBASE $EVSEQNO "$EVMSG" qui true preview false end-btn # Execute the command on the agent or the manager host. # Specify inherited event information for the command to be executed. # Display the preview window before executing the command. btn Cmd1 cmt Execute cmd1. cmdtype agent inev true hst $EVHOST cmd /kansi/cmd1 $EVIDBASE $EVSEQNO '$EVMSG' end-btn # Execute the command on the agent or the manager host. # Do not specify inherited event information for the command to be executed. # Display the confirmation dialog box before executing the command. btn Cmd2 cmt Execute cmd2. hst agent2 cmd /kansi/cmd2 end-btn end-def