Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager Administration Guide


8.1.2 Executing a command by using the Command button

There are two ways to execute a command previously registered for a Command button, depending on the type of host on which the command is executed.

To execute a command, you need JP1_Console_Admin permission or JP1_Console_Operator permission. When you move the cursor to the Command button, the information set for the Command button is displayed in the Execute Command window. Before executing a command, make sure that you check the information for the command.

To execute a command that inherits event information, select the JP1 event, and then execute the command.

For details about how to set the Command button, refer to the following:

Organization of this subsection

(1) Executing a command on an agent host or manager host

The following describes how to immediately execute a command on an agent host or manager host.

(a) Immediately executing a command

To immediately execute a command after the Command button is clicked, create the following settings.

Event information is not inherited when the command is executed:

Specify true for the qui parameter in the command button definition file. If you specify this parameter, when the Command button is clicked, a message asking whether the command is to be executed is not displayed, and the command is immediately executed on the agent host or manager host.

Event information is inherited when the command is executed:

Specify false for the preview parameter in the command button definition file. If you specify this parameter, when the Command button is clicked, the Preview Command Execution Content window does not open, and the command is immediately executed.

The following describes the procedure for immediately executing a command:

  1. In the Event Console window, select Option and then Execute Command. Alternatively, on the toolbar, click [Figure].

    The Execute Command window opens.

  2. Click the Command button to which the command you want to execute has been assigned.

    The command is executed.

(b) Executing a command after changing the information registered for the command

The following describes how to execute a command after changing the information registered for it.

When you execute a command that inherits event information, the Preview Command Execution Content window opens, and you can change the information for the command. The following operation is effective when you execute the command on a managed host that does not inherit events.

  1. In the Event Console window, choose Option and then Execute Command. Alternatively, on the toolbar, click [Figure].

    The Execute Command window opens.

  2. Right-click the Command button to which the command you want to execute has been assigned to display a popup menu.

  3. On the popup menu, click Custom Execution.

    The setting information for the Command button is displayed in Command type, Event information to inherit, Target host, Command, and Environment variable file of the Execute Command window. You can now edit the setting information.

    Edit Target host, Command, and Environment variable file as needed.

  4. Click the Execute button.

    The command is executed on the agent host or manager host.

(2) Executing a command defined on the source host of the selected event

The following applies to the source host of the event when the host is undergoing examination or when corrective action for an error is being performed for it. If you do not specify anything in Target host, but define a Command button, and then click the Command button, you can execute a command defined on the source host of the selected event. Note that even if the attribute of another JP1 event is mapped, the source host before the mapping is set in Target host.

The following describes the procedure for executing a command defined on the source host of the selected event.

  1. In the Event Details window, choose the Execute Command button.

    The Event Details window opens.

  2. Click the Command button to which the command you want to execute is assigned.

    Event information is not inherited when the command is executed:

    A message asking whether the command is to be executed is displayed. If there is no problem, you can click the OK button.

    The command defined on the source host of the selected event is executed. Note that when true is specified for the qui parameter in the command button definition file, the command is executed immediately without displaying any message. There is no need to perform the following steps.

    Event information is inherited when the command is executed:

    When false is specified for the preview parameter in the command button definition file, the command is executed immediately without displaying the Preview Command Execution Content window. There is no need to perform the following steps.

    When true is specified, the Preview Command Execution Content window opens. Go to the next step.

  3. Check the information in the Preview Command Execution Content window.

    Check the information for Target host, Command, and Environment variable file after the variables are replaced.

    An item for which [Figure] is displayed has a setting error. Review the settings.

    For details about the Preview Command Execution Content window, see 3.41 Preview Command Execution Content window in the manual JP1/Integrated Management 2 - Manager GUI Reference.

  4. Click the Execute button.

    If there is no problem in the information in the Preview Command Execution Content window, the command is executed, and the Preview Command Execution Content window closes. After the command is executed, Time, Host, and Message appear in Log in Execute Command window.