Hitachi

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


11.6.3 Execute the command. (AWS CloudWatch linkage tool)

Organization of this subsection

(1) Run manually (for Windows)

The following shows how to run AWS CloudWatch linkage tool manually in a Windows environment.

  1. Log in to the server running AWS CloudWatch linkage.

  2. Start Command Prompt.

  3. Navigate to the "sendevent_aws" copied in "11.6.2(2)(a) Layout of AWS CloudWatch linkage".

    C:\XXX> cd ...\sendevent_aws
  4. Execute "sendevent_aws.py" in Python of "11.6.1 Prerequisites (AWS CloudWatch linkage)".

    • To execute the alarm after the previous execution

    C:\XXX> python sendevent_aws.py
    • When executing an alarm after Current date and time

    C:\XXX> python sendevent_aws.py -now
  5. Confirm the outcome of executing "sendevent_aws.py".

    C:\XXX> echo %ERRORLEVEL%
    0#

#: "0" means normal termination, except "0" means abnormal termination.

(2) Run manually (for Linux)

The following shows how to run AWS CloudWatch linkage tool manually in a Linux environment.

  1. Log in to the server running AWS CloudWatch linkage.

  2. Navigate to the "sendevent_aws" copied in "11.6.2(2)(a) Layout of AWS CloudWatch linkage".

    $ cd .../sendevent_aws
  3. Execute "sendevent_aws.py" in Python of "11.6.1 Prerequisites (AWS CloudWatch linkage)".

    • To execute the alarm after the previous execution

    $ python sendevent.py
    • When executing an alarm after Current date and time

    $ python sendevent.py -now
  4. Confirm the outcome of executing "sendevent_aws.py".

    $ echo $?
    0#

#: "0" means normal termination, except "0" means abnormal termination.

(3) Regular run (for Windows)

The following is an example of regularly executing AWS CloudWatch linkage in a Windows environment.

  1. Start the task scheduler and configure it to run sendevent_aws.py regularly.

  2. Click Create Basic Task.

  3. Under Operation, select Start Program and set the following values:

(4) Regular run (for Linux)

The following is an example of regularly executing AWS CloudWatch linkage in a Linux environment.

  1. Log in to AWS CloudWatch linkage tool execution server.

  2. Opens CRON settings window.

    $ crontab -e
  3. Configure and save CRON settings.

    Here, as an example, it is set to run every 5 minutes.

    */5 * * * * #1/usr/bin/python#2 .../sendevent_aws/sendevent_aws.py#3
    #1

    Specifies that CRON is scheduled to run.

    #2

    Specify python in Python of " 11.6.1 Prerequisites (AWS CloudWatch linkage) ".

    #3

    Specify the path of "sendevent_aws.py" under "sendevent_aws" copied in "11.6.2(2)(a) Layout of AWS CloudWatch linkage".