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¶
- Log in to the TrueWatch console.
- Click on the 【Integration】 menu and select 【Cloud Account Management】.
- 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.
- Click on 【Test】, and after a successful test, click on 【Save】. If the test fails, please check the relevant configuration information and retest.
- 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.
- Click on the 【Integration】 button on the cloud account details page. Under the
Not Installed
list, findAWS EC2 Spot
and click on the 【Install】 button. A pop-up installation interface will appear for installation.
Manual Activation Script¶
-
Log in to the Func console, click on 【Script Market】, enter the TrueWatch script market, and search for
integration_aws_ec2_spot_fleet_request
. -
Click on 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click on 【Deploy Startup Script】, the system will automatically create a
Startup
script set and configure the corresponding startup script. -
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¶
- 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.
- In TrueWatch, check whether asset information exists in 「Infrastructure / Custom」.
- 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 |