11.4.2 Introduction (Azure linkage tool (JP1 event register command support version)
- Organization of this subsection
(1) Preparation
(a) Azure Monitor Log-Send
■ Azure VM
-
Install and set up Azure Log Analytics agent on the target Azure VM to forward application logs that you want to register as JP1 events to Azure Monitor.
For information about detail, see Azure documentation.
■Using Azure Monitor to monitor Virtual Machines
- <Required Tasks>
-
- Sign in to Azure Portal
- Creating a workspace
- Turn enable Log Analytics VM extension
-
Defines the log to be collected.
For information about detail, see Azure documentation.
■Collecting text logs with Log Analytics agent on Azure Monitor
- <Required Tasks>
-
- Defining custom logs (Steps 1 to 5)
- Important
-
In step 2 "Uploading and Analyzing sample logs" on the above URL, sample logs are uploaded and analyzed, but the actual logs to be collected should be read before performing the procedure.
■ Azure Activity Log
-
Connect logging in the workspace configuration to collect Activity Log in Log Analytics workspace.
For information about detail, see Azure documentation.
■Azure Monitor activity log
- <Required Tasks>
-
- Log Analytics workspace
■ Servicing such as Azure Web Apps/Azure Functions
-
To collect logging, set setting of Application Insights to enable.
For information about detail, see Azure documentation.
■Application Insights of Web page
- <Required Tasks>
-
- Set Application Insights to enable
(b) Create Alert Rule
Configure event information generation for Azure linkage tool (JP1 event register command support version) to act as triggers for alerts.
Perform step 1 if you are using log alerts and step 2 if you are using metric alerts.
-
Create a log alert rule.
For information about detail, see Azure documentation.
■Create a new alert rule
- <Required Tasks>
-
- Create a Log Alert Rule in Azure portal
- Create Log Analytics and Application Insights log alerts from alert management
- Note
-
Action's setting is implemented in Action grouping Setup in JP1 events setup tool. For details, see 11.4.2(3)(f) Setup of Action group.
- Important
-
In order to use Azure linkage tool (JP1 event register command support version), the resource type must be Log Analytics workspace or Application Insights.
-
Create a metric alert rule.
For information about detail, see Azure documentation.
■Create a new alert rule
- <Required Tasks>
-
- Creating in Azure Portal
- Note
-
Action's setting is implemented in Action grouping Setup in JP1 events setup tool. (11.4.2(3)(f) Setup of Action group)
(c) Create Function App
Create an Azure Functions of Azure linkage tool (JP1 event register command support version).
- Setup fields
-
-
Creating functions
-
Enable managed ID
-
-
Login Azure Portal from your browser.
-
From Azure service. Choose Function App.
-
Click + Add and enter the following: Click "Confirm and Create"-"Create".
Table 11‒38: Setup when creating a function app No.
Setup category
Fields#1
Setup values
1
The Basics
Subscription
Subscription in which the function is created
2
Resource group
Resource group name for creating functions
3
Function App Name
sendevent
4
Disclosure
Code
5
Runtime stack
Python
6
Version
3.7 or later
7
Region
Select the appropriate region
8
Hosting
Storage account
(New) or select if you already have storage to place the function
9
Operating System
Linux
10
Type of plan
Consumption (serverless) or Preminum or App Service plan
11
Linux plan
(New) or select if there is already a predetermined plan
12
SKU and Sizing
Selected size
13
Monitoring
Set Application Insights to Enable
Yes
14
Application Insights
If you want to use (new) or an existing Application Insights, select the one.
15
Tag
Select a setup if applicable
- #1
-
For information about detail, see Azure documentation.
■Creating your first function in Azure Portal
<Required Tasks>
- Create a Function App
-
From Azure service. Choose Function App.
-
Select the created sendevent and select ID for setting entry.
-
Switch the System-Assigned Status from Off to On.
-
Click Save. The confirm message is displayed. Click Yes.
(d) Create Service Principal
Create a service principal to access Service Bus Queue, KeyVault from Azure linkage tool (JP1 event register command support version) to send JP1 event info.
-
Create a service principal to execute Azure linkage tool (JP1 event register command support version).
For information about detail, see Azure documentation.
■Methods: Create Azure AD applications and service principals in your portal that can access resources
- <Required Tasks>
-
- Register an application to Azure AD and create a service principal
- Assign roles to applications
- Important
-
Value that you setup in the above URL is sample. Select "Azure Service Bus recipients".
-
After registration, Overview window displays the Application (Client) ID and Directory (Tenant) ID properties. Record values because it is used in 11.4.2(4)(a) Constant-definition (const.py).
-
Setup password to the service principal that you registered.
As in step 2, password is used in "11.4.2(4)(a) Constant-definition (const.py) and must be recorded.
Note that password cannot be retrieved later. Be sure to record it after creating it.
For information about detail, see Azure documentation.
■Methods: Create Azure AD applications and service principals in your portal that can access resources
- <Required Tasks>
-
- Option 2: Create a New Application Secret
(e) Create Azure Blob Storage
Create a Blob Storage to store configuration file of Azure linkage tool (JP1 event register command support version).
For information about detail when no storage account has been created, see Azure documentation.
■Create a storage account
- <Required Tasks>
-
-
Creating a storage account
- Important
-
Value that you setup in the above URL is sample. Be sure to setup value according to your requirements.
-
-
Create a container for Blob Storage that stores configuration file of Azure linkage tool (JP1 event register command support version).
For information about detail, see Azure documentation.
■QuickStart: Upload, Download, and List BLOB using Azure portal
- <Required Tasks>
-
- Create a container
The container created here will be the upload destination prepared for definition file in 11.4.2(3)(a) Event definition file (eventconf.json), 11.4.2(3)(b) Event exclusion file (eventignore.json) , and 11.4.2(3)(c) Event extended attributes definition file (eventexattrs.json).
(f) Create Service Bus Queue
Create Service Bus Queue to be used with Azure linkage tool (JP1 event register command support version).
-
Create a Service Bus Queue to store JP1 event-information.
For information about detail, see Azure documentation.
■Using Azure portal to create Service Bus name spaces and queues
- <Required Tasks>
-
- All
- Important
-
In the above URL, the default value is used for creation. However, when creating a name space queue with Azure linkage tool (JP1 event register command support version), please setup the following values.
-
Setup at least "Standard" for the price-level when creating the name space to create a queue that makes the session enable.
-
Do not check "Set duplicate data detection to enable" because duplicate message is set to enable.
-
To maintain ordering, select "Set Session to Enable".
-
-
Assign the role to Service Bus created in step 1.
For information about detail, see Azure documentation.
■Authentication and approve applications using Azure Active Directory for accessing Azure Service Bus entities.
- <Required Tasks>
-
- Use Azure portal to assign Azure roles.
The following tables describe setup values when assigning roles.
Table 11‒39: Role assignment setup values No.
Item
Setup values
Remarks
1
Role
Data owner of Azure Service Bus
2
Access assigned to
Azure AD users, groups, and service principals
Defaults setup value
3
Select
The service principal name created in 11.4.2(1)(d) Create Service Principal
(g) Create Key container
Create a key container to store sensitive information for use with Azure linkage tool (JP1 event register command support version).
-
Login Azure Portal from your browser.
-
Select Key Container from Azure service.
-
Click + Add and enter (basic fields only) the following: Click "Confirm and Create" - "Create".
Table 11‒40: Setup information when creating key containers No.
Setup category
Field#1
Setup values
Remarks
1
The Basics
Subscription
Subscription in which the function is created
2
Resource group
Resource group name for creating functions
3
Key Vault
Any key container name
4
Region
Select the appropriate region
5
Price level
Select Standard or Premium.
6
Logical Delete
Enable
Cannot be changed
7
Number of days to keep delete containers
Enter the number of days to retain
Default value: 90
8
Erase protection
Disable erase protection (allow erasure of key containers and objects during the retention period)
- #1
-
Setup of the secret and access policy is done in 11.4.2(1)(h) Add the secret to the key container, and 11.4.2(1)(i) Setup the access policy to the key container. You should only create containers here.
(h) Add the secret to the key container
Add Azure Blob Storage and Service Bus Queue connecting string using in the Azure linkage tool (JP1 event register command support version) to the key container created in 11.4.2(1)(g) Create Key container.
- Setup fields
-
-
Addition of Azure Blob Storage connect-string to the secret
-
Addition of Service Bus Queue connect-string to the secret
-
-
Login Azure Portal from your browser.
-
Select Key Container from Azure service.
-
Select the container created in 11.4.2(1)(g) Create Key container.
-
Select "Secret" in the "Setup" field.
-
Click + Generate/Import. To add Azure Blob Storage connect string, enter the following: Click Create.
Table 11‒41: Setup values of Azure Blob Storage connect-string to the secret No.
Field#1
Setup values
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 connection string of the BLOB Storage#2 that was created in 11.4.2(1)(e) Create Azure Blob Storage.
4
Content type (optional)
Optional
5
Do you want to setup the date of activation?
Configure values as needed.
6
Do you want to setup Enable deadline?
Configure values as needed.
7
Is it enable?
Yes
- #1
-
For information about detail, see Azure documentation.
■QuickStart: Use Azure portal to setup and retrieve secrets to and from Azure Key Vault
<Required Tasks>
- Add a secret to a Key Vault
- #2
-
For detail on how to view Azure Blob Storage connect strings, see Azure documentation.
■Configure Azure Storage connect string
<Required Tasks>
- Configuring Azure Storage accounting connectivity strings-Tips
-
Confirm that the specified secret name is displayed on the "Secret" screen.
-
Click + Generate/Import. To add Service Bus Queue connect string, enter the following: Click Create.
Table 11‒42: Setup values of Service Bus Queue connect-string to the secret No.
Field#1
Setup values
Remarks
1
Upload options
Manual
Defaults setup values
2
NAME
Specify an arbitrary secret name.
Only alphanumeric characters and hyphens (-) can be specified.
3
Values
Specifies connection string of the Service Bus#2 that was created in 11.4.2(1)(f) Create Service Bus Queue.
4
Content type (optional)
Optional
5
Do you want to setup the date of activation?
No check
Defaults setup value
6
Do you want to setup Enable deadline?
No check
Defaults setup value
7
Is it enable?
Yes
Defaults setup value
- #1
-
For information about detail, see Azure documentation.
■Quick start: Use Azure portal to setup and retrieve secrets from and to Azure Key Vault.
<Required Tasks>
- Add a secret to a Key Vault
- #2
-
For detail on how to view Service Bus Queue connect strings, see Azure documentation.
■Using Azure portal to create Service Bus name spaces and queues
<Required Tasks>
- Get the connection string
-
Confirm that the specified secret name is displayed on the "Secret" screen.
(i) Setup the access policy to the key container
Setup the access policy to get info from the secret.
- Setup fields
-
-
Access Policy addition (managed ID)
-
Access Policy addition (Service Principal)
-
-
Login Azure Portal from your browser.
-
Select Key Container from Azure service.
-
Select the container created in 11.4.2(1)(g) Create Key container.
-
Under setup option, click Access Policy.
-
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 event register command support version) created in 11.4.2(1)(c) Create Function App. Select the "Add".
Table 11‒43: Access policy additional setup values for event linkage (JP1 event information generation) No.
Item
Setup values
Remarks
1
Configuration from template (Optional)
--
Defaults setup value
2
Key access permissions
0 Item selected
Defaults setup value
3
Secret access permissions
Select "Get" and "List".
After selecting, the message "2 items selected" is displayed.
4
Permission to access certificates
0 Item selected
Defaults setup value
5
Select a Principal
Specify the function name "sendevent" created in 11.4.2(1)(c) Create Function App.
6
Approved applications
--
Defaults setup value
-
In the Access Policy window, make sure that sendevent you added is displayed.
-
Click for the + access policy addition link.again. To grant access to the service principal that you created in 11.4.2(1)(d) Create Service Principal, enter the following and click Add:
Table 11‒44: Service Principal Access Policy additional setup values No.
Item
Setup values
Remarks
1
Configuration from template (Optional)
--
Defaults setup value
2
Key access permissions
0 Item selected
Defaults setup value
3
Secret access permissions
Select "Acquire" and "List".
"2 items are selected" after selection.
4
Permission to access certificates
0 Item selected
Defaults setup value
5
Select a principal
Specify the service principal that you created in 11.4.2(1)(d) Create Service Principal.
6
Approved applications
--
Defaults setup value
-
In the Access Policy window, verify that the service principal name that you added is displayed. Click Save.
(j) Create deploy environment
Create an environment (VM) for deploying Azure linkage tool (JP1 event register command support version) in the function app.
- Important
-
If you already have an environment where you can deploy your function app, you don't need to do anything here.
-
Create a virtual machine (Azure VM) on Azure.
For information about detail, see Azure documentation.
■Quick-Start: Create a Windows virtual machine in Azure Portal
- <Required Tasks>
-
- Creating virtual machines
- Connecting to virtual machines
-
In the quick start, we created a VM with a default of setup except Basic information. Setup the respective items as required.
-
If the environment immediately after the virtual machine was created is not a Japanese environment, change it to a Japanese environment.
-
Deploy the tools and modules required to deploy the virtual machine that you created.
For information about detail, see Azure documentation.
■Quick start: Create a Python from the command-line to Azure
- <Required Tasks>
-
- Configure the local environment
- Checking prerequisites
(k) Installing JP1/Base
To send a JP1 event from the JP1 event information submission for Azure linkage tool (JP1 event register command support version), install JP1/Base on the running server that sends JP1 event information for Azure linkage tool (JP1 event register command support version).
For information about installing JP1/Base, see JP1/Base Operation manual.
(l) Installing Python
To perform JP1 event information transmission for Azure linkage tool (JP1 event register command support version), install the Python package for Python and Azure on the run server for sending JP1 event information for Azure linkage tool (JP1 event register command support version).
-
Install Python.
Install Python that is the prerequisite for sending Azure event information for additional linkage tool (JP1 event register command support version) in 11.4.1(2) JP1 Event Info Send (Python script).
- For Windows
-
For information about detail, see Python documentation.
■Installing Python for Windows
<Required Tasks>
- Downloading packages
- Installing packages
- For Linux
-
For information about detail, see Python documentation.
■CentOS environmental Python
<Required Tasks>
- Installing the build tool library
- Downloading source code
- Build
-
Install Python package of Azure.
Install Python package that is the prerequisite for sending Azure event information for additional linkage tool (JP1 event register command support version) in 11.4.1(2) JP1 Event Info Send (Python script).
- For Windows
-
For information about detail, see Python documentation.
■pip
- For Linux
-
For information about detail, see Python documentation.
■pip
- Important
-
The working directory in URL above is sample. Work in the appropriate directory for your environment. Specify Python of the prerequisite specified in 11.4.1(2) JP1 Event Info Send (Python script).
(2) Installation
(a) Configuring the Provided file
The following tables show the configuration of file provided by Azure linkage utility (JP1 event register command support version).
|
No. |
Description |
Remarks |
||||
|---|---|---|---|---|---|---|
|
1 |
sendevent |
JP1 event tool (JP1 event information generation) directory |
Generation of Azure linkage JP1 event information (for JP1 event register command) |
|||
|
2 |
app |
Function App Directory |
||||
|
3 |
sendevent-sbq |
JP1 event tool (JP1 event information generation) functional apps |
||||
|
4 |
__init__.py |
JP1 event tool (JP1 event Info generation) script |
||||
|
5 |
function.json |
function.json file |
||||
|
6 |
host.json |
host.json file |
||||
|
7 |
requirements.txt |
requirements.txt file |
||||
|
8 |
conf |
Configuration file directories |
||||
|
9 |
eventconf.json |
Event-definition file |
||||
|
10 |
eventignore.json |
Event-exclude file |
||||
|
11 |
eventexattrs.json |
Definition file for extended event attributes |
||||
|
12 |
sendevent_azure |
JP1 event tool (JP1 event Info send) directory |
Send Azure linkage (JP1 event register command support version) JP1 event info |
|||
|
13 |
logging.conf |
Logging configuration file |
||||
|
14 |
const.py |
JP1 event tool (Send JP1 event Info) parameter definition script |
||||
|
15 |
sendevent_azure.py |
JP1 event tool (JP1 event Info send) script |
||||
(b) Deploy JP1 Event-Generation
The following describes how to deploy Azure linkage tool (JP1 event register command support version).
-
Deploy the provided file in your deployment
-
Log-level setup of Azure linkage tool (JP1 event register command support version)
-
Deploying Azure linkage tool (JP1 event register command support version)
-
Copy the provided file to the appropriate location in your deployment.
-
Execute "Step 1." in 11.4.2(3)(e) Setup log-level (host.json).
-
Deploy Azure linkage tool (JP1 event register command support 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.
#: sendevent/app of the provided file.
For detail deployment instructions, see Azure documentation.
■Quick start: Create a Python from the command-line to Azure
- <Required Tasks>
-
- Deploying functional projects 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 a command in the console, move the current directory to file Storage Directory /sendevent/app provided, and then execute the deployment.
-
Specify "sendevent" for <APP_NAME> described in the above URL.
-
If the output shows "Deployment successful." and "Remote build succeeded!", it is the deployment completed.
-
-
After deployment, make sure that the following functions are registered under Function Apps-sendevent-Functions.
Table 11‒46: List of functions No.
Function name
Function description
Remarks
1
sendevent-sbq
JP1 event-generator
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.
(c) JP1 Event-Information Send Allocation
The following describes how to allocate Azure linkage tool (JP1 event register command support version) for sending JP1 event information.
-
Login Azure linkage tool (JP1 event register command support version) to execute server for sending JP1 event information.
-
Copy the sendevent_azure directory of the provided file to a directory of your choice.
-
Grant the required permissions to the directories and file that you Copy in step 2.
Table 11‒47: Directory structure for sending JP1 event information for Azure linkage tool (JP1 event register command support version) No.
Directory structure
Description
Required permissions #
1
sendevent_azure
Azure linkage tool. (JP1 event register command support version) directory
Write permission
2
sendevent_azure.py
Send JP1 event info command
Execute permission
3
const.py
Constant-defined file
Read permission
4
logging.conf
Logging configuration file
Read permission
- #
-
Write permission: Grant permission to write to the user who executes the JP1 event information sending of the Azure linkage tool (JP1 event register command support version).
Execute permission: Grant the permission that the user who executes the JP1 event information sending of the Azure linkage tool (JP1 event register command support version) can execute it.
Read permission: Grant permission to read the user who executes the JP1 event information sending of the Azure linkage tool (JP1 event register command support version).
(3) Setup
(a) Event definition file (eventconf.json)
This section explains how to setup a JP1 event to be registered by using Azure linkage tool (JP1 event register command support version).
- Setup fields
-
-
JP1 events registration requirements
-
JP1 event-information
-
-
Login Azure Portal from your browser.
-
From Azure services, select Storage Accounts.
-
Select the container created in 11.4.2(1)(e) Create Azure Blob Storage.
-
Select "..." in "eventconf.json" from the container selected in step 3. Click Download to download to the appropriate directory on your workstation.
If you select "View or Edit", you can edit or save directly without downloading.
If file does not exist in the container, please copy "eventconf.json" under "sendevent/conf" in the provided file to the appropriate directory.
-
Open eventconf.json that you downloaded or copy in step 4 in a text editor and setup the event-definition.
-
Write in JSON format.
-
JP1 event definition is searched from the top, and JP1 event with the condition that matches the condition is fired first.
JSON items are as follows:
Table 11‒48: Event definition items No.
Item
Item
Description
Data type
Required
Scope of value
1
eventConf
Event definitions for log alerts
Specify event definitions for log alerts. Evaluate in the order you define.
Array
(hash)
Not required
--
2
conditions
Event conditions
Specifies the criteria for identifying the log information to be JP1 events.
If more than one parameter is specified, AND condition is assumed.
Hash
Required
--
3
Key
Column name
Specify the column name. #1
String
Not required
It conforms to Azure spec.
4
Value
Conditions
Specify value criteria for column-name in Item 3. (Regular expression for full match)
String
Not required
According to the regular expression specification.
5
eventId
Event ID
Specify the event ID of JP1 to be registered when the conditions are met.
String
Not required
It conforms to the scope supported by jevsend command-argument-i.
6
message
Message
Specify the message text of JP1 event to be registered when conditions are met.#2#6
String
Required
It conforms to the scope supported by jevsend command-argument-m.
7
dest
Destination event server name
Specify JP1 event destination to be registered when conditions are met.
String
Not required
It conforms to the scope supported by jevsend command-argument-d.
8
src
Source event server name
Specify the JP1 event sender to be registered when the conditions are met.
String
Not required
It conforms to the scope supported by jevsend command-argument-s.
9
attrs
Extended attribute
Specify the definition for specifying extended attributes of JP1 event to be registered.
Hash
Not required
--
10
Key
Extended attribute key
Specify the key of the extended attribute of JP1 event to be registered when the condition is met.
String
Not required
It conforms to the scope supported by jevsend command-argument-e.
11
Value
Extended attribute value
Specify extended attribute value for the extended attribute key of item number 10. #6
String
Not required
--
12
eventConfForMetricAlert
Event definitions for metric alerts
Specify event definitions for metric alerts.
Evaluate in the order you define.
Array
(hash)
Not required
--
13
conditions
Event conditions
Specifies the criteria that identifies metric to be JP1 eventified.
If more than one parameter is specified, AND condition is assumed.
Hash
Required
--
14
context
Context requirements
Specify the criteria for context.
Hash
Not required
--
15
Key
Key name
Specifies the key name under context. #3
String
Not required
It conforms to Azure spec.
16
Value
Conditions
Specify value criteria for the key name in item 15. (Regular expression for full match)
String
Not required
According to the regular expression specification.
17
condition
Condtion requirements
Specify the criteria for condition.
Hash
Not required
--
18
Key
Key name
Specifies the key name under condition. #4
String
Not required
It conforms to Azure spec.
19
Value
Conditions
Specify Value criteria for the key name in Item 18. (Regular expression for full match)
String
Not required
According to the regular expression specification.
20
dimensions
Dimensions requirements
Specify the criteria for dimensions.
Hash
Not required
--
21
Key
Value of name properties
Specifies value of name subordinate to dimensions. #5
String
Not required
It conforms to Azure spec.
22
Value
Conditions
Specify value condition of value attribute corresponding to item 21. (Regular expression for full match)
String
Not required
According to the regular expression specification.
23
eventId
Event ID
Same as item 5
24
message
Message
Same as item 6
25
dest
Destination event server name
Same as item 7
26
src
Source event server name
Same as item 8
27
attrs
Extended attribute
Same as items 9 to 11
- #1
-
Specifies value of "$. data.SearchResult.tables[*].columns[*].name" included in the alert information (schema ID: Microsoft.Insights/LogAlert) received by JP1 event information generation of Azure linkage tool (JP1 event register command support version).
- #2
-
For messages exceeding 1023 bytes, the range is up to 1023 bytes. Also, if message contains a carriage return, the carriage return code is converted to a single-byte space.
- #3
-
Specifies the key name of "$. data.context" included in the alert information (schema ID: AzureMonitorMetricAlert) received by JP1 event information generation of Azure linkage tool (JP1 event register command support version). "condition" cannot be specified.
Table 11‒49: Sample Key names for context No.
Key name
Description
1
timestamp
Time stamp when the alert occurred
2
id
Resource ID for alerting
3
name
Alert name
4
description
Alert description
5
severity
Event level for alerts
6
subscriptionId
Subscription ID of the resource from which the alert originated
7
resourceGroupName
Resource group name of the resource from which the alert originated
8
resourceName
Resource name of the resource from which the alert originated
9
resourceType
Resource type of the resource from which the alert originated
10
resourceId
Resource ID of the resource from which the alert originated
- #4
-
Specifies the key name of "$. data.context.condition.allOf [*]" included in the alert information (schema ID: AzureMonitorMetricAlert) received by JP1 event information generation of Azure linkage tool (JP1 event register command support version). "dimensions" cannot be specified.
Table 11‒50: Sample key names for condition No.
Key name
Description
Remarks
1
metricName
Metric to be alerted
2
metricNamespace
Metric namespace to alert on
3
operator
Alert condition operators
Equals,GreaterThan,GreaterThanOrEqual,LessThan,LessThanOrEqual,NotEquals, etc.
4
threshold
Alert condition thresholds
5
timeAggregation
Type of aggregation for metric being alerted
Minimum,Maximum,Average,Total,Count, etc.
6
metricValue
Metric value to be alerted
- #5
-
Included in the alert information (schema ID: AzureMonitorMetricAlert) received by JP1 event information generation of Azure linkage tool (JP1 event register command support version). Specify value for $. data.context.condition.allOf[*].dimensions.name.
- #6
-
Variables can be embedded in strings.
Variables are specified in the format "$ namespace: variable name $". To treat "$" as a character, escape it with "\".
Following are descriptions of namespaces and variables.
Table 11‒51: Namespaces and variables No.
Type
Namespace
Description
1
Event definitions for log alerts
columns
The namespace in which to expand the column information.
The variable name specifies the column name # of the column that you want to expand.
#: Value of $. data.SearchResult.tables[*].columns[*].name
- Example: Expanding a column "Computer" as a variable
-
$columns:Computer$
2
data
The namespace in which to expand basic information.
The variable name specifies the key name # of Basic Information that you want to expand. However, "SearchResult" cannot be specified.
#: Key name of the $. data
- Example: When AlertRuleName is expanded as a variable
-
$data:AlertRuleName$
3
Event definitions for metric alerts
context
The namespace in which you want to expand context.
For variable name, specify the key name # of context you want to expand. However, "condition" cannot be specified.
#: Key name of the $. data.context
- Example: When resourceName is expanded as a variable
-
$context:resourceName$
4
condition
The namespace in which you want to expand condition.
For variable name, specify the key name # of condition you want to expand. However, "dimensions" cannot be specified.
#: Key name for $. data.context.condition.allOf [*]
- Example: When metricName is expanded as a variable
-
$condition:metricName$
5
dimensions
The namespace in which you want to expand dimensions.
The variable name specifies the dimension name # of dimensions you want to expand.
#: Value of $. data.context.condition.allOf[*].dimensions[*].name
- Example: When expanding the dimension name "microsoft.resourceId" as a variable
-
$dimensions:microsoft.resourceId$
The following is an example of the alert information to be received:
-
Log Alerts (Schema ID: Microsoft.Insights/LogAlert)
- #1
-
Information under data can be expanded as a variable in the namespace "data".
In the example above, specifying "$data: AlertRuleName$" expands "testalert".
- #2
-
In columns.name, value is the column name, and value under rows is value of the column corresponding to the column name. You can also use the column name as the key name for "conditions" and value of the column as the condition.
Columnar info can be expanded as a variable in the namespace "columns".
In the above example, specifying "$columns:id$" expands "9999999999999999" under the corresponding "rows".
- #3
-
Information under data can be expanded as a variable in the namespace "data".
-
Metric Alerts (Schema ID: AzureMonitorMetricAlert)
- #1
-
Information under context can be expanded as a variable in the namespace "context". It can also be specified as a conditions.context criterion.
In the example above, specifying "$context:name$" expands "TestMetricAlert".
- #2
-
Information under condition.allOf can be expanded as a variable in the namespace "condition". It can also be specified as a conditions.condition criterion.
In the example above, specifying "$condition:metricName$" expands "Percentage CPU".
- #3
-
Information under dimensions can be expanded as a variable in the namespace "dimensions". It can also be specified as a conditions.dimensions criterion. (Key name: name attribute, value: value attribute)
In the example above, specifying "$dimensions:microsoft.resourceType $" expands "Microsoft.Compute/virtualMachines".
- #4
-
Information under context can be expanded as a variable in the namespace "context". It can also be specified as a conditions.context criterion.
The following shows a sample Setup:
-
-
After changing setup in step 5, save it with the following character code/end-of-line code.
Table 11‒52: Event-definition file (eventconf.json) character code/end-of-line code No
Item
Value
1
Character code
UTF-8 (without BOM)
2
Line feed code
LF (\n) or CRLF (\r\n)
-
Re-select the container in step 3 and upload setup modified "eventconf.json" directly under the container.
(b) Event exclusion file (eventignore.json)
This section describes how to setup a JP1 event that is excluded by Azure linkage tool (JP1 event register command support version).
- Setup fields
-
-
JP1 events exclusion conditions
-
-
Login Azure Portal from your browser.
-
From Azure services, select Storage Accounts.
-
Select the container created in 11.4.2(1)(e) Create Azure Blob Storage.
-
Select eventignore.json from the container you selected in step 3 and download it to the appropriate directory on your workstation.
If you select "View or Edit", you can edit or save directly without downloading.
If file does not exist in the container, please copy "eventignore.json" under "sendevent/conf" in the provided file to the appropriate directory.
-
Open eventignore.json that you downloaded or copy in step 4 in a text editor and setup the event-exclude defnition.
-
Write in JSON format.
-
Event exclusion definitions are evaluated in order from the top.
The items in JSON are as follows:
Table 11‒53: Event exclusion definition items No.
Item
Item name
Description
Data type
Required
Scope of value
1
eventIgnore
Event exclusion definitions for log alerts
Specify event exclusion definitions for log alerts.
Evaluate in the order you define.
Array
(hash)
Not required
-
2
conditions
Events exclusion conditions
Specify criteria to exclude JP1 eventification.
If more than one parameter is specified, AND condition is assumed.
Hash
Not required
3
Key
Column name
Specify the column name. #1
String
Not required
It conforms to Azure spec.
4
Value
Conditions
Specify value criteria for column-name in item 3. (Regular expression for full match)
String
Not required
According to the regular expression specification.
5
eventIgnoreForMetricAlert
Event exclusion definitions for metric alerts
Specify event exclusion definitions for metric alerts.
Evaluate in the order you define.
Array
(hash)
Not required
-
6
conditions
Events exclusion conditions
Specify criteria to exclude JP1 eventification.
If more than one parameter is specified, AND condition is assumed.
Hash
Not required
-
7
context
Context requirements
Specifies exclusion conditions for context.
Hash
Not required
8
Key
Key name
Specifies the key name under context. #2
String
Not required
It conforms to Azure spec.
9
Value
Conditions
Specifies exclusion conditions of Value for the key name in item 8. (Regular expression for full match)
String
Not required
According to the regular expression specification.
10
condition
Condition requirements
Specifies exclusion conditions for condition.
Hash
Not required
11
Key
Key name
Specifies the key name under condition. #3
String
Not required
It conforms to Azure spec.
12
Value
Conditions
Specify exclusion conditions of Value for the key name in item 11. (Regular expression for full match)
String
Not required
According to the regular expression specification.
13
demensions
Dimensions requirements
Specifies exclusion conditions for dimensions.
Hash
Not required
14
Key
Value of name properties
Specifies value of name subordinate to dimensions. #4
String
Not required
It conforms to Azure spec.
15
Value
Conditions
Specify exclusion conditions of value for value property corresponding to item 14. (Regular expression for full match)
String
Not required
According to the regular expression specification.
- #1
-
Specifies value of "$. data.SearchResult.tables[*].columns[*].name" included in the alert information (schema ID: Microsoft.Insights/LogAlert) received by JP1 event information generation of Azure linkage tool (JP1 event register command support version).
- #2
-
Specifies the key name of "$. data.context" included in the alert information (schema ID: AzureMonitorMetricAlert) received by JP1 event information generation of Azure linkage tool (JP1 event register command support version). "condition" cannot be specified.
Table 11‒54: Sample key names for a context No.
Key name
Description
1
timestamp
Time stamp when the alert occurred
2
id
Resource ID for alerting
3
name
Alert name
4
description
Alert description
5
severity
Event level for alerts
6
subscriptionId
Subscription ID of the resource from which the alert originated
7
resourceGroupName
Resource group name of the resource from which the alert originated
8
resourceName
Resource name of the resource from which the alert originated
9
resourceType
Resource type of the resource from which the alert originated
10
resourceId
Resource ID of the resource from which the alert originated
- #3
-
Specifies the key name of "$. data.context.condition.allOf [*]" included in the alert information (schema ID: AzureMonitorMetricAlert) received by JP1 event information generation of Azure linkage tool (JP1 event register command support version). "dimensions" cannot be specified.
Table 11‒55: Sample key names for a condition No.
Key name
Description
Remarks
1
metricName
Metric to be alerted
2
metricNamespace
Metric namespace to alert on
3
operator
Alert condition operators
Equals,GreaterThan,GreaterThanOrEqual,LessThan,LessThanOrEqual,NotEquals, etc.
4
threshold
Alert condition thresholds
5
timeAggregation
Type of aggregation for metric being alerted
Minimum,Maximum,Average,Total,Count, etc.
6
metricValue
Metric value to be alerted
- #4
-
Specifies value of "$. data.context.condition.allOf[*].dimensions.name" included in the alert information (schema ID: AzureMonitorMetricAlert) received by JP1 event information generation of Azure linkage tool (JP1 event register command support version).
The following shows an example of specifying:
-
-
After changing settings in step 2, save it with the following character code/line feed code.
Table 11‒56: Event excluding file (eventignore.json) character code/line feed code No.
Item
Value
1
Character code
UTF-8 (without BOM)
2
Line feed code
LF (\n) or CRLF (\r\n)
-
Re-select the container in step 3 and upload "eventconf.json" modified in settings directly under the container.
(c) Event extended attributes definition file (eventexattrs.json)
This section explains setup procedure of the common event extension attributes defined in JP1 event information generation for Azure linkage tool (JP1 event register command supported version).
- Setup Field
-
-
JP1 Event extended attributes (Common)
-
-
Login Azure Portal from your browser.
-
From Azure Services, select "Storage Accounts".
-
Select the container created in 11.4.2(1)(e) Create Azure Blob Storage.
-
Download "eventexattrs.json" from the container selected in step 3 to the appropriate directory on your workstation.
If you select "View or Edit", you can edit or save directly without downloading.
If there are no files in the container, copy "eventexattrs.json" under "sendevent/conf" in the provided file to the appropriate directory on your working terminal.
-
Open "eventexattrs.json" that you downloaded or copied in step 4 in a text editor and setup the event excluding definition.
-
Write in JSON format.
-
If the extended attribute name overlaps with the event definition file, the extended attribute defined in the event definition file is enabled.
The items in JSON are listed in the following tables.
Table 11‒57: Items in event extended attribute definitions No.
Item
Item name
Description
Data Type
Required
Scope of Value
1
eventExattrs
Event extended attribute definitions for log alerts
-
Hash
Not required
-
2
Key
Extended attribute key
Specifies the key of JP1 event's extended attributes to be added.
String
Not required
Corresponds to the scope supported by the parameter "attrs" in JP1/IM "Event Publishing" API.
Note that you do not need to specify " " " even if the extended attribute value contains a space. " " " is also recognized as an extended attribute value.
3
Value
Extended attribute value
Specifies the extended attribute value for the extended attribute key in NO.2. #1
String
Not required
4
eventExAttrsForMetricAlert
Event extended attribute definitions for metric alerts
Same as items 1 to 3
- #1
-
See #6 of "Table 11-48 Event definition items" in 11.4.2(3)(a) Event definition file (eventconf.json).
-
-
After changing settings in step 2, save it with the following character code/line feed code.
Table 11‒58: Event excluding file (eventignore.csv) character code/line feed code No.
Item
Value
1
Character code
UTF-8 (without BOM)
2
Line feed code
LF (\n) or CRLF (\r\n)
-
Re-select the container in step 3 and upload "eventexattrs.json" modified in settings directly under the container.
(d) Setup of Application environment-variables
This section describes Setup of the application environment variable use in Azure linkage tool (JP1 event register command supported version).
- Setup Field
-
-
BLOB Storage connecting string
-
BLOB Storage container name
-
Service Bus connecting string
-
Service Bus queue name
-
-
Login Azure Portal from your browser.
-
Select "Functional Apps" - " sendevent" from service.
-
Click "Configure" in "Settings".
-
Click "+ New Application Settings" and setup the following:
Table 11‒59: Environment variables for generating JP1 event information for Azure linkage tool (JP1 event register command supported version) No.
Name
Value
1
BLOB_STORAGE_CONNECTION_STRING
Specify in Key Vault lookup format. #1
To specify a secret identifier, specify the secret identifier of Blob Storage connecting string that was added in 11.4.2(1)(h) Add the secret to the key container.
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 Key Vault lookup format.#1
To specify a secret identifier, specify the secret identifier of Service Bus connecting string that was added in 11.4.2(1)(h) Add the secret to the key container.
4
SERVICE_BUS_QUEUE_NAME
Specify the queue name setup in 11.4.2(1)(f) Create Service Bus Queue.
- #1: Specify 1 Key Vault 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" in settings.
5. Select the appropriate secret.
6. If you select the present version, the secret identifier is displayed.
-
Click "OK" in "Add / Edit application settings" window.
-
Click "Save".
-
Click "Continue" in "Save Changes",.
After that, the application will restart.
(e) Setup log-level (host.json)
Setup the log level of Azure linkage tool (JP1 event register command supported version).
- Important
-
This step is not necessary when it is just after the installation because the setting of log level is performed in install procedure. Perform this procedure if you want to change the log level.
-
Open "host.json" under "sendevent/app" in the provided file in a text editor, modify the sixth line and save it.
5: "logLevel": { 6: "default": "Information" # 7: }- #
-
Specifies the log level. You can specify Trace, Debug, Information, Warning, Error, Critical, or None.
-
Because redistribution (deployment) is required, perform step 3 and step 4 of 11.4.2(2)(b) Deploy JP1 Event-Generation in Azure linkage tool (JP1 event register command supported version).
(f) Setup of Action group
To start as alert trigger of the generation of event information for Azure linkage tool (JP1 event register command supported version), you must setup action group to alert rules.
- Setup Field
-
-
Creating action groups
-
Setup action groups to the alert rule
-
-
Login Azure Portal from your browser.
-
From Azure Services, select "Monitor" - "Alerts" - "Manage Action".
-
Select "+ Add action groups". Setup the following, and then select "OK".
Table 11‒60: Setting contents for addition of action groups No.
Setup category
Setup Field
Value
Remarks
1
The Basics
Subscription
Subscription in which the group is stored
2
Resource group
Resource group to which the group is associated
3
Action group name
Group name
4
Display name
Display name
5
Notification
Type of Notice
-
No setup
6
Action
Action Type
Select "Azure Function"
7
Functions
Subscription
Same as that of No.1
8
Resource group
Same as that of No.2
9
Functional apps
sendevent
Functions created in 11.4.2(1)(c) Create Function App
10
Azure Function
sendevent-sbq
sendevent-sbq deployed in 11.4.2(2)(b) Deploy JP1 Event-Generation of Azure linkage tool (JP1 event register command supported version)
11
Make common warning schema enable.
No
Default value
12
NAME
Enter a name for action
13
Tag
Select a setup if applicable
-
From Azure service Select "Monitor" - "Alerts" - "Manage alert rules".
-
Select the alert created in 11.4.2(1)(b) Create Alert Rule.
-
Click "Select action group in "Action". And select action group that you created in step 3, and then click "Select".
-
Click "Save".
(4) JP1 event linkage (sending JP1 event information)
(a) Constant-definition (const.py)
This section explains how to setup parameters for sending JP1 event information for Azure linkage tool (JP1 event register command supported version).
- Setup Field
-
-
JP1/Base install directory
-
Client ID
-
Client secret
-
Tenant ID
-
Container URL
-
Secret identifier of Service Bus connecting string
-
Service Bus Queue
-
Proxy settings
-
-
Login the execution server for sending JP1 event data of Azure linkage tool (JP1 event register command supported version).
-
Open "const.py" under JP1 event information sending directory of Azure linkage tool (JP1 event register command supported version) in a text editor, and setup the user variable in the 4th to 12th lines.
Table 11‒61: JP1 event linkage (JP1 event information sending) constant definition (const.py) user variable values No.
Parameters
Required/Optional
Description
1
BASE_DIR
Required
Specify where JP1/BASE will be installed.
2
CLIENT_ID
Required
Specify the value of appID output when the service principal in 11.4.2(1)(d) Create Service Principal is created.
3
CLIENT_SECRET
Required
Specify the value of password output when the service principal in 11.4.2(1)(d) Create Service Principal is created.
4
TENANT_ID
Required
Specify the value of tenant output when the service principal in 11.4.2(1)(d) Create Service Principal is created.
5
VAULT_URL
Required
Specifies the URL of the container created in 11.4.2(1)(g) Create Key container. #1
6
SERVICE_BUS_CONNECTION_STRING_SECRET_NAME
Required
Specifies the secret name of Service Bus connecting string added in 11.4.2(1)(h) Add the secret to the key container.
7
SERVICE_BUS_QUEUE_NAME
Required
Specify the queue name setup in 11.4.2(1)(f) Create Service Bus Queue.
8
HTTP_PROXY
Optional
Specifies that the proxy server is Setup. #2
9
HTTPS_PROXY
Optional
- #1
-
You can find the URL of the key container in the following steps:
1. Login Azure Portal from your browser.
2. Select "Key Container" from Azure service..
3. On the "Key Container" window, select the container created in 11.4.2(1)(g) Create Key container.
4. Value in "Container URI" in overview is equal to URL.
- #2
-
Specify setup of the proxy with the following content:
Protocol:// User name : password @ Host name or IP address on proxy server : Port number /
Protocol: "http" (when using SSL communication, "https")
User name : User name for proxy authentication
Password : Password for proxy authentication
Host name or IP address of the proxy server: IP address of the proxy server or the host name the IP address is setup
Port number: Port number used by the proxy server
<ex> http://user001:password1@192.168.0.1:80/
The following shows a sample Setup:
1:###############################################################################
2:# User-variable (Note: Value must be enclosed in double quotes)
3:###############################################################################
4: BASE_DIR = r "C:\Program Files (x86)\Hitachi\JP1Base" # specifies install destination directory of JP1/BASE
5: CLIENT_ID = r"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # APP_ID of the service principal
6: CLIENT_SECRET = r"xxxxxxxxxxx-xxx~xxxxxxxxxx~xxxxxxx" # client secret of the service principal
7: TENANT_ID = r"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # Login destination tenant ID
8: VAULT_URL = r"https://sample.vault.azure.net/" # Specify the URL for key container
9: SERVICE_BUS_CONNECTION_STRING_SECRET_NAME = r "SERVICE-BUS-CONNECTION-STRING" # specifies the secretname of the key container that setup Service Bus connecting string
10: SERVICE_BUS_QUEUE_NAME = r "service-bus-queue" Specifies the queue name of Service Bus
11: HTTP_PROXY = r "" # Specified if PROXY setup is required. Do nothing if empty.
12: HTTPS_PROXY = r"" # Specified if PROXY setup is required. Do nothing if empty.
13: ###############################################################################
-
Setup the user defined variable value in step 2, and then save it with the following character code/line feed code.
Table 11‒62: Character code/line feed code for JP1 event linkage (JP1 event information sending) constant definition (const.py) No.
Item
Value
1
Character code
UTF-8 (without BOM)
2
Line feed code
LF (\n) or CRLF (\r\n)
(b) Log configuration file (logging.conf)
This section describes how to setup the parameters related to JP1 event linkage (JP1 event information sending) tool log.
- Setup Field
-
-
Log level
-
Log files
-
Log rotation size
-
Number of log generations
-
-
Login to execution server of JP1 event linkage (JP1 event information sending) tool.
-
Open "logging.conf" under JP1 event linkage (JP1 event information sending) tool directory in a text editor, and change the 11th line.
11: level=INFO #1 17th line 17: args=('sendevent_azure.log #2', 'a', 2097152 #3, 3 #4, 'utf-8')- #1
-
Specifies the log level. You can specify DEBUG, INFO, WARNING, ERROR, or CRITICAL.
- #2
-
Specify the log file path. You can specify an absolute or relative path.
- #3
-
Specifies the log rotation size in bytes.
- #4
-
Specifies the number of log generations.
For details, see Python documentation.
■logging.config---Environmental setup for logging
-
After changing Setup in step 2, save it with the following character code/line feed code.
Table 11‒63: JP1 Log configuration file (logging.conf) Character/Line feed Codes No.
Item
Value
1
Character code
UTF-8 (without BOM)
2
Line feed code
LF (\n) or CRLF (\r\n)
(5) Uninstallation
(a) Uninstalling JP1 Event-Information Generation
This section describes how to uninstall JP1 event information generation of Azure linkage tool (JP1 event register command supported version).
-
To delete alert rules
-
To delete action groups
-
To delete secrets
-
To delete access policies
-
To delete functional apps
-
To delete definition files
■ To delete alert rules
-
Login Azure Portal from your browser.
-
From Azure Services, select "Monitoring".
-
Under "Alerts", select "Manage Alert Rules".
-
Select the alerts you want, and then select "Delete".
■ To delete action group
-
Login Azure Portal from your browser.
-
From Azure Services, select "Monitoring".
-
Select "Manage Actions" under "Alerts", perform Action operation in 11.4.2(3)(f) Setup of Action group, and then select "Delete Action groups".
■ To delete secrets / access policies
-
Login Azure Portal from your browser.
-
Select "Key Container" from Azure service. Then, select the container created in 11.4.2(1)(g) Create Key container.
-
Select "Secret" in setup, and then click the secret name of Azure Blob Storage connect string that you added in 11.4.2(1)(h) Add the secret to the key container.
-
Click "Delete", and then click "Yes" in the confirmation window.
-
Click the secret name of Service Bus connect string that you added in 11.4.2(1)(h) Add the secret to the key container.
-
Click "Delete", and then click "Yes" in the confirmation window.
-
Following the deletion of the secret, select the "Access policy" in setup, click "Delete" in action column to delete access policy added in 11.4.2(1)(i) Setup the access policy to the key container. And then click "Save".
■ To delete functional apps
-
Login Azure Portal from your browser.
-
From Azure service. Choose "Function apps".
-
Select "sendevent" and click "Delete".
■ To delete definition files
-
From Azure Services, select "Storage Accounts".
-
Select the container created in 11.4.2(1)(e) Create Azure Blob Storage.
-
Select the following files and click "Delete".
-
eventconf.json
-
eventignore.json
-
eventexattrs.json
-
(b) Uninstalling JP1 event info sending
The following describes how to uninstall Azure linkage tool (JP1 event register command supported version).
-
Directory for sending JP1 event information of Azure linkage tool (JP1 event register command supported version)
-
Login Azure linkage tool (JP1 event register command supported version) to execution server for sending JP1 event data.
-
Delete "sendevent_azure" directory copied in 11.4.2(2)(c) JP1 Event-Information Send Allocation of Azure linkage tool (JP1 event register command supported version)