Skip to content

AWS EC2 Spot

AWS EC2 Spot, including request capacity pools, target capacity pools, abort capacity, etc.

Configuration

Install Func

It is recommended to activate the TrueWatch Integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed, please proceed with the script installation.

If deploying Func manually, refer to Manual Deployment of Func

Install Script

Note: Please prepare the required Amazon AK in advance (for simplicity, you can directly grant global read-only permissions ReadOnlyAccess)

Automata Activation Script

  1. Log in to the TrueWatch console.
  2. Click on the 【Integration】 menu and select 【Cloud Account Management】.
  3. Click on 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface. If the cloud account information has been configured before, skip this step.
  4. Click on 【Test】, and after a successful test, click on 【Save】. If the test fails, please check the relevant configuration information and retest.
  5. Click on 【Cloud Account Management】 to see the added cloud account in the list. Click on the corresponding cloud account to enter the details page.
  6. Click on the 【Integration】 button on the cloud account details page. Under the Not Installed list, find AWS EC2 Spot and click on the 【Install】 button. A pop-up installation interface will appear for installation.

Manual Activation Script

  1. Log in to the Func console, click on 【Script Market】, enter the TrueWatch script market, and search for integration_aws_ec2_spot_fleet_request.

  2. Click on 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.

  3. Click on 【Deploy Startup Script】, the system will automatically create a Startup script set and configure the corresponding startup script.

  4. After activation, you can see the corresponding automatic trigger configuration in 「Management / Automatic Trigger Configuration」. Click on 【Execute】 to immediately execute once without waiting for the scheduled time. Wait a moment, and you can view the execution task records and corresponding logs.

Verification

  1. In 「Management / Automatic Trigger Configuration」, confirm whether the corresponding task has the automatic trigger configuration, and you can also check the corresponding task records and logs for any anomalies.
  2. In TrueWatch, check whether asset information exists in 「Infrastructure / Custom」.
  3. In TrueWatch, check whether there is corresponding monitoring data in 「Metrics」.

Metrics

After configuring Amazon EC2 Spot, the default Measurement is as follows. You can collect more metrics through configuration. AWS CloudWatch Metrics Details

Metric Description
AvailableInstancePoolsCount Spot capacity pools specified in the Spot fleet request
BidsSubmittedForCapacity Capacity for which Amazon EC2 has submitted Spot fleet requests
EligibleInstancePoolCount Spot capacity pools specified in the Spot fleet request that Amazon EC2 can fulfill
FulfilledCapacity Capacity fulfilled by Amazon EC2
MaxPercentCapacityAllocation Maximum PercentCapacityAllocation among all Spot fleet pools specified in the Spot fleet request
PercentCapacityAllocation Capacity allocated to the specified dimension's Spot capacity pool
TargetCapacity Target capacity of the Spot fleet request
TerminatingCapacity Capacity terminated due to provisioned capacity exceeding target capacity