Hitachi

JP1 Version 12 JP1/Base User's Guide


N.8 Auto-scaling linkage script

JP1/Base provides a batch-processing script (auto-scaling linkage script) that performs the setup and operations required for using JP1/Base linked with the auto-scaling functionality.

Organization of this subsection

(1) File configuration

The auto-scaling linkage script consists of the following files: script files to be executed on the manager or an agent, script definition files that define the variables needed to run the scripts, and internal files that are used internally by the scripts.

Note that the script file for Windows is a PowerShell script and the script file for Linux is a shell script.

Table N‒3: Script files

Script file name

Target host

Description

In Windows:

jbsas_setup_agent.ps1

jbsas_setup_agent.ps1.model

In Linux:

jbsas_setup_agent.sh

jbsas_setup_agent.sh.model

Agent

Script file that is run at the agent host during scaling out, and its model file. It performs the initial setup for the agent and sends a JP1 event to the manager to notify the manager of the scale out.

In Windows:

jbsas_add_agent.ps1

jbsas_add_agent.ps1.model

In Linux:

jbsas_add_agent.sh

jbsas_add_agent.sh.model

Manager

Script file that is run at the manager host during scaling out, and its model file. It adds the new hosts to the manager's monitoring targets.

In Windows:

jbsas_del_agent.ps1

jbsas_del_agent.ps1.model

In Linux:

jbsas_del_agent.sh

jbsas_del_agent.sh.model

Manager

Script file that is run at the manager host during scaling in, and its model file. It removes deleted hosts from the manager's monitoring targets.

Table N‒4: Script definition files

Definition file name

Target host

Description

jbsas_setup_agent.ini

jbsas_setup_agent.ini.model

Agent

File that defines the shell variables used by the script file (jbsas_setup_agent) that is run by agent hosts, and its model file.

jbsas_setup_manager.ini

jbsas_setup_manager.ini.model

Manager

File that defines the shell variables used by the script file (jbsas_add_agent or jbsas_del_agent) that is run by manager hosts, and its model file.

Table N‒5: Internal files

File name

Target host

Description

In Windows:

jbsas_util.ps1

jbsas_util.ps1.model

In Linux:

jbsas_util.sh

jbsas_util.sh.model

Common (manager and agent)

File containing all the functions that are used internally by the script files, and its model file.

jbsas_hosts

Manager

This file is used to manage information about monitored agent hosts.

(2) Storage directory

The files for auto-scaling linkage scripts are all stored in the following directory:

In Windows:

installation-folder\tools\cloud\

In Linux:

/opt/jp1base/tools/cloud/

(3) Script files

For details about the processing performed by the script files, see N.3 Adding hosts to the monitoring target during scale out and N.4 Terminating monitoring during scale in.

You do not need to edit the script files. You can customize them, but note that our support services do not cover parts of scripts that have been added or changed.

If you performed overwrite installation from JP1/Base 11-00, the script files (such as jbsas_add_agent.ps1) are not overwritten. Copy the model files (such as jbsas_add_agent.ps1.model) and assign the correct script file names to use them.

(4) Script definition files

Format
variable-name-1=variable-value-1
[variable-name-2=variable-value-2]
:
Description
  • Do not use any spaces or tabs before or after a variable name, a variable value, or an equal sign (=).

  • In Linux, if the variable value contains a space, enclose the entire variable in double quotation marks (").

Definition application timing

The definition is loaded when the script file is executed.

Setting parameters

The following tables describe the parameters to be specified in the jbsas_setup_agent.ini file and the jbsas_setup_manager.ini file.

Table N‒6: Parameters to be specified in the jbsas_setup_agent.ini file

Variable name

Variable value (default value)

Specification

Description

ManagerHostName

Manager

Required

Specify a manager host name.

For details about the characters and the number of characters permitted for host names, see the documentation for the related products (JP1/IM or JP1/PFM).

JP1EventID

1011

Customizable

Specify the event ID of the JP1 event that is to be sent to the manager.

You can specify values in the range from 0 to 1FFF and from 7FFF8000 to 7FFFFFFF.

JP1EventMsg

In Windows:

Agent host ($AgentHostName) has scale-out.

In Linux:

"Agent host ($AgentHostName) has scale-out."

Customizable

Specify the message for the JP1 event that is to be sent to the manager.

Specify a character string of no more than 1,023 bytes.

In the default message, the agent host name is displayed for $AgentHostName.

Legend:

Required: The parameter must be specified.

Customizable: Customize the value of the parameter as needed.

Table N‒7: Parameters to be specified in the jbsas_setup_manager.ini file

Variable name

Variable value (default value)

Specification

Description

JbsrtDistribByScaleIn

NO

Customizable

Specify whether configuration definition information is to be updated during scale in.

If YES is specified:

The target host is deleted from the configuration definition file, and then the configuration definition is distributed. The target host is immediately deleted from lower-level hosts in the configuration definition information.

Do not specify YES unless it is necessary for operation, because this might result in a significant delay in monitoring due to a delay in communication. As a guideline, if you plan to specify YES, make sure that the number of hosts that are scaled in or out each hour does not exceed 20.

If NO is specified:

Specify NO to prioritize performance. The target host will not be deleted from the configuration definition file, and the configuration definition will not be distributed. The configuration definition information is updated during the next scale out.

JP1PFMAgentAlarmTableList_W

"PFM Windows Template Alarms [CPU] 09.00","PFM Windows Template Alarms [MEM] 09.00","PFM Windows Template Alarms [DSK] 09.00"

Customizable

Specify the name of the alarm table for Windows that is to be bound to agents.

To specify multiple names, delimit the names by using commas.

JP1PFMAgentAlarmTableList_L

"PFM UNIX Template Alarms [CPU] 09.00","PFM UNIX Template Alarms [MEM] 09.00","PFM UNIX Template Alarms [DSK] 09.00"

Customizable

Specify the name of the alarm table for Linux that is to be bound to agents.

To specify multiple names, delimit the names by using commas.

EC2_HOMEPath#

Not specified

Required

Specify the path where Amazon EC2 API Tools is to be installed.

JAVA_HOMEPath#

Not specified

Required

Specify the path of the Java (JRE) installation target.

EC2_URL#

Not specified

Required

Specify the URL of the AWS region.

AWS_ACCESS_KEY#

Not specified

Required

Specify the AWS access key character string.

AWS_SECRET_KEY#

Not specified

Required

Specify the AWS secret access key character string.

Legend:

Required: The parameter must be specified.

Customizable: Customize the value of the parameter as needed.

#: This environment variable is required to configure a tool execution environment for Amazon EC2 API Tools. For details about the values to be set, see the official Amazon Web Services site.