Hitachi

JP1 Version 12 JP1/Performance Management User's Guide


6.4.5 Setting the actions

Set the actions to be performed by the system when the status of the alarm changes. The possible actions are as follows:

Notes:
  • You cannot select Warning if you select Monitor whether the value exists in the General Setting area of the New Alarm > Main Information window.

  • You cannot select Normal if you select Always notify in the Advanced settings area of the New Alarm > Main Information window.

  • You can combine multiple actions. However, you cannot combine the actions of executing commands with issuing JP1 events.

Organization of this subsection

(1) Sending emails

  1. In the New Alarm > Action window, select Email.

  2. Select a trigger for sending an email among Abnormal, Warning, or Normal.

  3. Click the Next > button.

  4. In the Email settings area, enter the email address, email body, and other information.

    For example, suppose you want to send the email under the following conditions:

    • Email address: Send the email to T.Hitachi@Dept01.Hitachi.com

    • Action handler: Send the email through the Action Handler service with the host name WebAP

    • Email body: Send an email that says "date/time, host name, product name"

    In this case, specify the following settings:

    Email address: T.Hitachi@Dept01.Hitachi.com

    Action handler: PH1WebAP

    Email body: Date:%SCT Host:%HNS Product:%PTS

    Tip

    You can search for an action handler by entering a search string in the text box and clicking Filter.

    Reference note:

    You can use variables such as %SCT and %MTS for the Email body setting. For details on variables, see the description of the New Alarm > Action Definition or Edit > Action Definition window in the manual JP1/Performance Management Reference.

    If you want to specify multiple email addresses for Email address, use a comma to separate them. You can enter a maximum of 127 characters for this setting.

  5. Click the Finish button.

    The settings are applied.

(2) Executing commands

  1. In the New Alarm > Action window, select Command.

  2. Select a trigger for executing the command among Abnormal, Warning, or Normal.

  3. Click the Next > button.

    The Command Definition area appears.

    Set the command name, command arguments, and so on.

    For example, suppose you want to execute the command under the following conditions:

    • To execute the /usr/bin/LogOutput command that outputs log data

    • To execute the command through the Action Handler of the WebAP host

    • To pass in the date/time, host name, and message text as the command parameters

    In this case, specify the following settings:

    Command name: /usr/bin/LogOutput

    Action handler: PH1WebAP

    Command arguments: Date:%SCT Host:%HNS %MTS

    The following figure shows an example of these settings.

    Figure 6‒3: Example of settings in the New Alarm > Action Definition window

    [Figure]

    Notes:

    • You cannot use the following symbols in a character string that is passed to a command as a parameter:

      < >

      When these symbols are included in a character string, characters that appear before or after these symbols are sometimes truncated.

    • You cannot redirect the standard output of a command to a file or other destination.

    Reference note:

    You can use some variables such as %SCT and %MTS in the setting of Command arguments. For further details on the variables, see the description of the New Alarm > Action Definition or Edit > Action Definition window in the manual JP1/Performance Management Reference.

    In addition, the setting of Command name can contain an argument. However, if the command path or command name contains a single-byte space character, enclose the command path or command name with double quotations ("").

  4. Click the Finish button.

    The settings are applied.

(3) Issuing a JP1 event

For details on how to issue a JP1 event when an alarm event occurs, see 12.3.2(3) Associating alarms with JP1 events and reports.

(4) Sending an SNMP trap when an alarm occurs

  1. In the New Alarm > Action window, select SNMP.

  2. Select a trigger for sending the SNMP trap among Abnormal, Warning, or Normal.

  3. Click the Finish button.

    The settings are applied.

(5) Notes on executing actions

(a) Program required to send emails

A mail server that conforms to SMTP is required for sending emails. However, you cannot send emails if the SMTP server requires authentication or only accepts Extended SMTP requests.

(b) Executable files for executing commands

  • In Windows:

    To execute commands, you can run files with the following extensions:

    • EXE: Executable files

    • COM: Executable (command) files

    • BAT: Batch files

    If you want to execute internal commands such as DEL or DIR, you must make a batch file and execute such commands in the batch file.

    Note that you can only specify program files that are accessible from the system account when the commands are executed. You cannot run files that are located in a network folder.

  • In UNIX:

    To execute commands, you can run the files listed below. Note that these files must have the execute attributes added to them.

    • Executable files

    • Shell script files

    Note that you can only specify program files that are accessible by users with the root user permission when the commands are executed. To run files that are located in an NFS-mounted directory, those files must be made accessible by users with the root user permission on that host.

(c) Account for command execution

  • In Windows:

    You must use the system account for executing commands (for the Action Handler service, as well).

    Therefore, any resources that are viewed or updated from the program must be accessible from the system account.

  • In UNIX:

    You must use an account with the root user permission for executing commands (note that the account for the Action Handler service has the root user permission).

    Therefore, any resources that are viewed or updated from the program must be accessible from an account with the root user permission.

(d) The values of the environment variables available when a command is executed

  • In Windows:

    The environment variables used when a command is executed are the system environment variables that were in effect when the Performance Management program service started.

    The profile information is not loaded when a command is executed.

  • In UNIX:

    The environment variables used when a command is executed are the environment variables associated with the root user permission when the Performance Management program service started.

    The profile information is not loaded when a command is executed. For details on umask, see (f) umask for the files generated when a command is executed below.

(e) Current directory during the execution of commands

  • In Windows:

    The current folder during the execution of commands is the folder of the Action Handler service (installation-folder\bin\action\).

    For logical hosts, the current folder during executing of commands is environment-directory\jp1pc\bin\action\.

  • In UNIX:

    The current directory during the execution of commands is the directory of the Action Handler service (/opt/jp1pc/bin/action/).

    For logical hosts, the current directory during executing of commands is environment-directory/jp1pc/bin/action/.

(f) umask for the files generated when a command is executed

  • In Windows:

    umask is not applicable to the Windows environment.

  • In UNIX:

    When a command is executed, umask is set to 000 (the file permissions become 777). When you want to modify umask, you must reset umask in the script file you execute or in the program.

(g) Other notes on executing commands

  • In Windows:

    • You cannot run a Win16-bit application.

    • You cannot run an application that displays a window or a dialog box.

      However, you can execute the net send command to display a dialog box. This is because the dialog box is displayed by the Messenger service of Windows, and not by the net send command.

    • You cannot run an application that utilizes the Windows messaging mechanism, DDE.

    • You cannot run an application that requires interactive operations.

    • You cannot run a resident program that does not terminate.

    • You cannot run a file with an extension that is associated with an application.

    • You cannot run programs that are located in a network folder.

    • Do not set up a program on a removable disk that is not ready for use.

    • Do not allow services to interact with the desktop in the startup settings of the Windows services.

    • You cannot retrieve information from the standard output or standard error of the executed program.

    • If a command name or a path in a command line contains spaces, you must enclose it in double quotation marks (").

  • In UNIX:

    • You cannot run an application that requires interactive operations.

    • You cannot run a program that involves a stty, tty, tset, or script command and requires an interactive operation environment.

    • You cannot run a resident program, which does not terminate.

    • You cannot run a program that does not have the execute attributes added to it.

    • Do not set up a program on a removable disk that is not ready for use.

    • You cannot retrieve the information from the standard output or standard error of the executed program.

(h) Notes on Action Handler labels

If you set an action for an alarm and select something other than LOCAL for Action handler in the Command field on the New Alarm > Action Definitions window of the PFM - Web Console, the load on PFM - Manager increases. When an alarm triggers an action in a large system, select LOCAL for Action handler in the Command field on the New Alarm > Action Definitions window to prevent the load from centralizing on the PFM - Manager host.