11.4.3 Command Execution (Azure linkage tool (JP1 event register command supported version)
- Organization of this subsection
(1) Execution for sending JP1 event information
(a) Manual execution (for Windows)
The following is a sample procedure for execution sending JP1 event information for Azure linkage tool (JP1 event Add command supported version) manually in a Windows environment.
-
Login execution server for sending JP1 events information of Azure linkage tool (JP1 event register command supported version).
-
Start Command Prompt.
-
At the command prompt, move to the "sendevent_azure" directory copied in 11.4.2(2)(c) JP1 Event-Information Send Allocation of Azure linkage tool (JP1 event registered command supported version)
C:\XXX> cd ~\sendevent
-
At the command prompt, execute "sendevent_azure.py" using Python described in Table 11-37 Prerequisite Software of 11.4.1(2) JP1 Event Info Send (Python script).
C:\XXX> python sendevent_azure.py C:\XXX> echo %ERRORLEVEL% 0#
- #
-
0: Normal termination
1: Warning termination (sending one or more JP1 events failed, ServiceBusQueue is locked by another process.)
255: Abnormal termination (Error that cannot be continued occurs)
-
Check the log file setup in 11.4.2(4)(b) Log configuration file (logging.conf), and confirm that no Error was output.
-
Verify that JP1 events are sent to, for example, JP1/IM normally.
(b) Manual Execution (for Linux)
The following is a sample procedure for execution sending JP1 event information for Azure linkage tool (JP1 event Add command supported version) manually in a Linux.
-
Login server to execute JP1 event linkage (JP1 event information sending) tool.
-
Move to "sendevent_azure" directory copied in 11.4.2(2)(c) JP1 Event-Information Send Allocation of Azure linkage tool (JP1 event Add command compatible version).
$ cd ~/ sendevent
-
At the command prompt, execute "sendevent_azure.py" using Python described in Table 11-37 Prerequisite Software of 11.4.1(2) JP1 Event Info Send (Python script).
$ python sendevent_azure.py $ echo $? 0#
- #
-
0: Normal Termination
1: Warning termination (sending one or more JP1 events failed, Service Bus Queue is locked by another process.)
255:Abnormal termination (Error that cannot be continued occurs)
-
Check the log file setup in 11.4.2(4)(b) Log configuration file (logging.conf), and confirm that no Error was output.
-
Verify that JP1 events are sent to, for example, JP1/IM normally.
(c) Periodic execution (for Windows)
The following is a sample procedure for execution sending JP1 event information of Azure linkage tool (JP1 event register command supported version) periodically in a Windows.
-
Start the Task Scheduler and setup the "sendevent_azure.py" to execute periodically.
-
Click "Create Basic Task".
-
Under "Operation", select "Start Programming", and then setup the following values:
-
Program/Script: Specify Python path described in 11.4.1(2) JP1 Event Info Send (Python script).
-
Addition of arguments(optional): Specify "sendevent_azure.py".
-
Start (optional): Specify the "sendevent_azure" path copied in 11.4.2(2)(c) JP1 Event-Information Send Allocation of Azure linkage tool (JP1 event register command version).
-
(d) Periodic execution (for Linux)
The following is a sample procedure for execution sending JP1 event information of Azure linkage tool (JP1 event register command supported version) periodically in a Linux.
-
Login the server to execute JP1 event linkage (JP1 event information sending) tool.
-
Open CRON's Setup window.
$ crontab -e
-
Setup CRON and save it.
In this example, setup is set to execute every 5 minutes.
*/5 * * * * #1/usr/bin/python#2 ~/sendevent/sendevent_azure.py#3
- #1
-
Specifies execution scheduling for CRON.
- #2
-
Specify Python path described in Table 11-37 Prerequisite Software of 11.4.1(2) JP1 Event Info Send (Python script).
- #3
-
Specify the "sendevent_azure.py" path under the "sendevent_azure" copied in 11.4.2(2)(c) JP1 Event-Information Send Allocation of Azure linkage tool (JP1 event register command supported version),