Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager Command, Definition File and API Reference


11.5.2 Introduction (Azure linkage tool (JP1/IM REST compatible version))

Organization of this subsection

(1) Preparation

(a) Azure Monitor Log-send

Log sending to Azure Monitor is the same as that of Azure linkage tool (JP1 event add command compatible version). See 11.4.2(1)(a) Azure Monitor Log-Send.

(b) Creating Alert Rule

Creating an alert rule is the same as that of Azure linkage tool (JP1 event add command compatible version). See 11.4.2(1)(b) Create Alert Rule.

(c) Create Function App

The creation of the function app is the same as that of Azure linkage tool (JP1 event add command compatible version). See 11.4.2(1)(c) Create Function App.

In this case, replace "sendevent" with "sendevent_im2".

(d) Create Azure Blob Storage

The creation of Azure Blob Storage is the same as that of Azure linkage tool (JP1 event add command compatible version).

See 11.4.2(1)(e) Create Azure Blob Storage.

(e) Create Service Bus Queue

Create Service Bus Queue to be used with Azure linkage tool (JP1/IM REST compatible version).

  1. Create a Service Bus Queue to store JP1 event information.

    For details, see Azure documentation.

    ■Using Azure portal to create Service Bus namespaces and queues

    <Required Tasks>

    - All

    Important

    In the above URL, the default Value is used for creation, but when creating namespace or queues with Azure linkage tool (JP1/IM REST compatible version), please setup the following values.

    • Setup at least "Standard" for the price-level when creating the namespace to create a queue that makes the session enable.

    • Do not enable "Set duplicate data detection to Enable", duplicate Message is needed to be set to Enable.

    • To maintain ordering, enable "Set Session to Enable".

(f) Create Key container

Creating key containers is the same as that of Azure linkage tool (JP1 event add command compatible version). See 11.4.2(1)(g) Create Key container.

(g) Add the secret to the key container

Add the confidential data use in Azure linkage tool (JP1/IM REST compatible version) to the key container created in 11.5.2(1)(f) Create Key container.

Setup Field
  • Addition of Azure Blob Storage connect string to the secret

  • Addition of Service Bus Queue connect string to the secret

  • Addition of authentication Info of JP1/IM to the secret

  1. Login Azure Portal from your browser.

  2. Select "Key Container" from Azure service.

  3. Select the container created in 11.4.2(1)(g) Create Key container.

  4. Select "Secret" in the "Setup" field.

  5. Click "+ Generate/Import". To add Azure Blob Storage connect string, enter the following: Click "Create".

    Table 11‒67: Setup value of Azure Blob Storage connect string to the secret

    No.

    Field#1

    Setup value

    Remarks

    1

    Upload Options

    Manual

    Defaults setup value

    2

    NAME

    Specify an arbitrary secret name.

    Only alphanumeric characters and hyphens (-) can be specified.

    3

    Value

    Specifies connecting string of BLOB Storage#2 that was created in 11.4.2(1)(e) Create Azure Blob Storage.

    4

    Content type (optional)

    Arbitrary

    5

    Do you want to setup the date of activation?

    Configure value as needed.

    6

    Do you want to setup expiration date?

    Configure value as needed.

    7

    Is it enable?

    Yes

    #1

    For details, see Azure documentation.

    ■Use Azure portal to setup and obtain secrets to and from Azure Key Vault

    <Required Tasks>

    - Add a Secret to a Key Vault

    #2

    For details on how to view Service Bus Queue connect strings, see Azure documentation.

    ■Using Azure portal to create Service Bus namespaces and queues

    <Required Tasks>

    - Get the connection string

  6. Confirm that the specified secret name is displayed on the "Secret" screen.

  7. Click "+ Generate/Import". To add Service Bus Queue connect string, enter the following: Click "Create".

    Table 11‒68: Setup value of Service Bus Queue connect string to the secret

    No.

    Field#1

    Setup value

    Remarks

    1

    Upload options

    Manual

    Defaults setup value

    2

    NAME

    Specify an arbitrary secret name.

    Only alphanumeric characters and hyphens (-) can be specified.

    3

    Value

    Specify the connect strings of Service Bus created in 11.5.2(1)(e) Create Service Bus Queue. #2

    4

    Content type (optional)

    Arbitrary

    5

    Do you want to setup the date of activation?

    No check

    Defaults setup value

    6

    Do you want to Setup expiration date?

    No check

    Defaults setup value

    7

    Is it enable?

    Yes

    Defaults setup value

    #1

    For details, see Azure documentation.

    ■Use Azure portal to setup and obtain secrets from and to Azure Key Vault.

    <Required Tasks>

    - Add a secret to a Key Vault

    #2

    For details on how to view Service Bus Queue connect strings, see Azure documentation.

    ■Use Azure portal to create Service Bus namespaces and queues.

    <Required Tasks>

    - Get the connection string

  8. Confirm that the specified secret name is displayed on the "Secret" screen.

  9. Click "+ Generate/Import". To add authentication information (Password) for JP1/IM, enter the following information. Click "Create".

    Table 11‒69: Setup value of authentication info (User name) to secrets in JP1/IM

    No.

    Field#1

    Setup value

    Remarks

    1

    Upload options

    Manual

    Default setup value

    2

    NAME

    Specify an arbitrary secret name.

    Only alphanumeric characters and hyphens (-) can be specified.

    3

    Value

    Specify user name.

    4

    Content type (optional)

    Arbitrary

    5

    Do you want to setup the date of activation?

    No check

    Defaults setup value

    6

    Do you want to Setup expiration date?

    No check

    Defaults setup value

    7

    Is it enable?

    Yes

    Defaults setup value

    #1

    For details, see Azure documentation.

    ■Quick start: Use Azure portal to Setup and obtain secrets from and to Azure Key Vault.

    <Required Tasks>

    - Add a secret to a Key Vault

  10. Confirm that the specified secret name is displayed on the "Secret" screen.

  11. Click "+ Generate/Import". To add Service Bus Queue connect string, enter the following. Click "Create".

    Table 11‒70: Setup value of authentication Info (Password) to Secret in JP1/IM

    No.

    Field#1

    Setup Value

    Remarks

    1

    Upload options

    Manual

    Defaults setup value

    2

    NAME

    Specify an arbitrary secret name.

    Only alphanumeric characters and hyphens (-) can be specified.

    3

    Value

    Specifies password for the above user name.

    4

    Content type (optional)

    Arbitrary

    5

    Do you want to setup the date of activation?

    No check

    Defaults setup value

    6

    Do you want to Setup expiration date?

    No check

    Defaults setup value

    7

    Is it enable?

    Yes

    Defaults setup value

    #1

    For details, see Azure documentation.

    ■Quick start: Use Azure portal to Setup and obtain secrets from and to Azure Key Vault

    <Required Tasks>

    - add a secret to a Key Vault

  12. Confirm that the specified secret name is displayed on the "Secret" screen.

(h) Setup the access policy to the key container

Setup the access policy to get info from the secret.

Setup Field
  • Access Policy Addition (Managed ID)

  • Add the access policy (Service Principal)

  1. Login Azure Portal from your browser.

  2. Select "Key Container" from Azure service.

  3. Select the container created in 11.4.2(1)(g) Create Key container.

  4. Under setup option, click Access Policy.

  5. Click for the + access policy addition link. Enter the following information to grant access privileges to JP1 event information generation for Azure linkage tool (JP1/IM REST support version) created in 11.4.2(1)(c) Create Function App. Select the "Add".

    Table 11‒71: Azure linkage (JP1/IM REST compatible version) Access Policy Addition Setup Value

    No.

    Item

    Setup value

    Remarks

    1

    Configuration from template (Optional)

    -

    Defaults setup value

    2

    Key access permissions

    0 items selected

    Defaults setup value

    3

    Secret access permissions

    Select "Acquire" and "List".

    After that, it becomes "2 items selected".

    4

    Permission to access certificates

    0 items selected

    Defaults setup value

    5

    Select a principal

    Specify the function name "sendevent-sbq-im2" created in 11.4.2(1)(c) Create Function App.

    6

    Approved applications

    -

    Defaults setup value

  6. In the "Access Policy" window, make sure that "sendevent-sbq-im2" you added is displayed. Click "Save".

(i) Create deploy environment

Creating a deployment environment is the same as that of Azure linkage tool (for JP1 event Add commands).

See 11.4.2(1)(j) Create deploy environment.

(j) Installing JP1/IM

Install JP1/IM on the server where JP1 is to be deployed in order to send JP1 events from JP1 event information sending of Azure linkage tool (JP1/IM REST compatible version).

In Azure linkage tool (JP1/IM REST compatible version), Intelligent Integrated Management Base must be set to enable in order to use Intelligent Integrated Management Base functions.

For information about installing JP1/IM, see "1. Installation and Setup (for Windows)" and "2. Installation and Setup (for UNIX)" in the manual JP1/Integrated Management 3 - Manager Configuration Guide.

(2) Installation

(a) Configuration of the Provided Files

The following table shows the configuration of files provided by Azure linkage tool (JP1/IM REST compatible version).

Table 11‒72: Configuration of files of Azure linkage tool (JP1/IM REST compatible version)

No.

Directory structure

Description

Remarks

1

sendevent_im2

Azure linkage (JP1/IM REST compatible version) directory

2

app

Function app directory

3

sendevent-sbq

Function application for generating JP1 event information for Azure linkage tool (JP1/IM REST compatible version)

JP1 event-information generation for Azure linkage tool (JP1/IM REST compatible version)

4

__init__.py

Scripts of generating JP1 event information for Azure linkage tool (JP1/IM REST compatible version)

5

function.json

function.json file

6

sendevent-im2

Function application for sending JP1 event information for Azure linkage tool (JP1/IM REST compatible version)

Send JP1 event information of Azure linkage tool (JP1/IM REST compatible version)

7

__init__.py

Scripts of JP1 generating event information for Azure linkage tool (JP1/IM REST compatible version)

8

function.json

function.json file

9

host.json

host.json file

10

requirements.txt

requirements.txt file

11

conf

Configuration file directories

12

eventconf.json

Event-definition file

13

eventignore.json

Event-exclusion file

14

eventexattrs.json

Definition file for extended event attributes

(b) Deploy

The following describes how to deploy Azure linkage tool (for JP1/IM REST compatible version).

  • Deploy the provided file in your deployment

  • Log-level setup of Azure linkage tool (JP1/IM REST compatible version)

  • Updating function.json of JP1 event sending function app of Azure linkage tool (JP1/IM REST compatible version)

  • Deploying Azure linkage tool (JP1/IM REST compatible version)

  1. Copy the provided file (sendevent_im2) to the appropriate location in your deployment.

  2. Conduct "Step 1." in 11.4.2(3)(e) Setup log-level (host.json).

  3. Open function.json of Azure linkage tool (JP1/IM REST version) JP1 event information sending function application (sendevent_im2/app/sendevent_im2) in a text editor, and setup the queuename created in 11.5.2(1)(e) Create Service Bus Queue in the fifth line.

    1: {
    2:   "scriptFile": "__init__.py",
    3:   "bindings": [
    4:     {
    5:       "queueName": "Created queue name",
    6:       "connection": "SERVICE_BUS_CONNECTION_STRING",
    7:       "name": "msg",
    8:       "type": "serviceBusTrigger",
    9:       "direction": "in",
    10:      "isSessionsEnabled": "true"
    11:    }
    12:  ]
    13:}
  4. Deploy Azure linkage tool (JP1/IM REST compatible version)# to the function app created in 11.4.2(1)(c) Create Function App from VM created in 11.4.2(1)(j) Create deploy environment.

    #: The "sendevent_im2/app" of the provided file.

    For detail of deployment instructions, see Azure documentation.

    ■Quick start: Create a Python functions from the command line to Azure.

    <Required Tasks>

    - Deploy a project of functions to Azure.

    Important
    • You will need to sign in to Azure with the command. If you are not signed in, refer to item 1 in "Creating related Azure Resources for functions" in URL above to execute the command.

    • When you execute the command in the console, move the current directory to the "Provided file storage directory/sendevent_im2/app" directory, and then execute the deployment.

    • Specify "sendevent-sbq-im2" for <APP_NAME> described in the above URL.

    • If the output shows "Deployment successful." or "Remote build succeeded!", it is the deployment completed.

  5. After deployment, make sure that the following functions are registered under "Function Apps" - "sendevent-sbq-im2" - "Functions".

    Table 11‒73: List of Functions

    No.

    Function Name

    Function Description

    Remarks

    1

    sendevent-sbq

    JP1 event information generator function

    It is not a trigger firing at the time of deployment. You will need action grouping setup. For details, see 11.4.2(3)(f) Setup of Action group.

    2

    sendevent-im2

    JP1 event information sending function

    Launched when Message is registered to Service Bus Queue at the time of deployment.

(3) Setup

(a) Event definition file (eventconf.json)

Setup procedure for JP1 event that is registered when JP1 event information is generated in Azure linkage tool (JP1/IM REST compatible version) is the same as that of Azure linkage tool (JP1 event register command supported version). See 11.4.2(3)(a) Event definition file (eventconf.json).

In this case, replace "sendevent/conf" with "sendevent_im2/conf". When selecting a container, select the container created in 11.5.2(1)(d) Create Azure Blob Storage.

(b) Event exclusion file (eventignore.json)

Setup procedure of JP1 event excluded by generation of JP1 event information of Azure linkage tool (JP1/IM REST compatible version) is the same as that of JP1 linkage tool (for register command version). See 11.4.2(3)(a) Event definition file (eventconf.json).

In this case, replace "sendevent/conf" with "sendevent_im2/conf". When selecting a container, select the container created in 11.5.2(1)(d) Create Azure Blob Storage.

(c) Event extended attributes definition file (eventexattrs.json)

Setup procedure of mutual extended event attributes defined in generation of JP1 event information in Azure linkage tool (JP1/IM REST supported version) is the same as that of JP1 linkage tool (for register command version). See 11.4.2(3)(a) Event definition file (eventconf.json).

In this case, replace "sendevent/conf" with "sendevent_im2/conf". When selecting a container, select the container created in 11.5.2(1)(d) Create Azure Blob Storage.

(d) Setup of Application environment-variables

This section describes setup procedure of the application environment variable use in Azure linkage tool (JP1/IM REST compatible version).

Setup Field
  • BLOB Storage connecting string

  • BLOB Storage container name

  • Service Bus connecting string

  • Service Bus queue name

  • JP1/IM's REST based URL

  • User name of JP1/IM's authentication

  • Password of JP1/IM's authentication

  1. Login Azure Portal from your browser.

  2. Select "Function App" - "sendevent-sbq-im2" from the service.

  3. Click "Configuration" in "settings".

  4. Click "+New Application Setup" and setup the following:

    Table 11‒74: Environment variables used to generate event information

    No.

    Name

    Value

    1

    BLOB_STORAGE_CONNECTION_STRING

    Specify in KeyVault lookup format.#1

    Specifies the secret identifier of the connect string for Blob Storage that was added in 11.5.2(1)(g) Add the secret to the key container for the secret identifier.

    2

    BLOB_STORAGE_CONTAINER

    Specify the container name of Blob Storage created in 11.4.2(1)(e) Create Azure Blob Storage.

    3

    SERVICE_BUS_CONNECTION_STRING

    Specify in KeyVault lookup format.#1

    Specify the secret identifier of the connect string for Service Bus that was added in 11.4.2(1)(h) Add the secret to the key container for the secret identifier.

    4

    SERVICE_BUS_QUEUE_NAME

    Specify the queue name created in 11.4.2(1)(e) Create Azure Blob Storage.

    5

    IM2_REST_BASE_URL

    Specifies the base URL of REST of JP1/IM#2 to which the event-information is sent.

    6

    IM2_REST_LOGIN_USER

    Specify in KeyVault lookup format.#1

    Specify the secret identifier of authentication information (user name) of JP1/IM added in 11.4.2(1)(h) Add the secret to the key container for the secret identifier.

    7

    IM2_REST_LOGIN_PASSWORD

    Specify in KeyVault lookup format.#1

    Specifies the secret identifier of authentication information (password) of JP1/IM added in 11.4.2(1)(h) Add the secret to the key container for the secret identifier.

    #1: Specify KeyVault lookup format with the following information:

    @Microsoft.KeyVault(SecretUri = <secret identifier>)

    You can check the secret identifier by the following procedure.

    1. Login Azure Portal from your browser.

    2. Select "Key Container" from Azure service.

    3. Select the container created in 11.4.2(1)(g) Create Key container.

    4. Select "Secret" for Setup.

    5. Select the appropriate secret.

    6. If you select the present version, the secret identifier is displayed.

    #2: Specify the base URL with the following information:

    Protocol://Host name or IP address:Port number/

    Protocol: http (when using SSL communication, https)

    Host name or IP address: IP address which accepts HTTP communication at JP1/IM's Intelligent Integrated Management Base service IP or hostname the IP address is setup

    Port number: Port number which accepts HTTP communication at JP1/IM's Intelligent Integrated Management Base (defaults: 20703)

    <Example> http://192.168.0.1:20703/

  5. Click "OK" in the "Application Setup's Add / Edit" window.

  6. Click "Save".

  7. Click "Continue" in "Save Changes".

    The application restarts after clicking "Continue".

(e) Setup log-level (host.json)

Azure linkage tool (JP1/IM REST compatible version) log-level setup is the same as that of JP1 linkage tool (register command supported version). See 11.4.2(3)(e) Setup log-level (host.json).

In this case, replace "sendevent/app" with "sendevent_im2/app".

(f) Setup of Action group

Azure linkage tool (JP1/IM REST compatible version) setting of action group is the same as that of JP1 linkage tool (register command supported version). See 11.4.2(3)(f) Setup of Action group.

(4) Uninstallation

This section describes how to uninstall JP1 event information generation of Azure linkage tool (JP1/IM REST compatible version).

(a) To delete alert rules

  1. Login Azure Portal from your browser.

  2. From Azure Services, select "Monitoring".

  3. Under "Alerts", select "Manage Alert Rules".

  4. Select the alerts you want, and then select "Delete".

(b) To delete action group

  1. Login Azure Portal from your browser.

  2. From Azure Services, select "Monitoring".

  3. Select "Manage Actions" under "Alerts", perform Action operation in 11.4.2(3)(f) Setup of Action group, and then select "Delete Action groups".

(c) To delete secrets / access policies

  1. Login Azure Portal from your browser.

  2. Select "Key Container" from Azure service. Then, select the container created in 11.5.2(1)(f) Create Key container.

  3. Select "Secret" in setup, and then click the secret name of Azure Blob Storage connect string that you added in 11.5.2(1)(g) Add the secret to the key container.

  4. Click "Delete", and then click "Yes" in the confirmation window.

  5. Click the secret name of Service Bus connect string that you added in 11.5.2(1)(g) Add the secret to the key container.

  6. Click "Delete", and then click "Yes" in the confirmation window.

  7. Following the deletion of the secret, select the "Access policy" in setup, click "Delete" in action column to delete access policy added in 11.5.2(1)(h) Setup the access policy to the key container. And then click "Save".

(d) To delete functional apps

  1. Login Azure Portal from your browser.

  2. From Azure service. Choose "Function apps".

  3. Select "sendevent" and click "Delete".

(e) To delete definition files

  1. From Azure Services, select "Storage Accounts".

  2. Select the container created in 11.5.2(1)(d) Create Azure Blob Storage.

  3. Select the following files and click "Delete".

    • eventconf.json

    • eventignore.json

    • eventexattrs.json