AWS EC2 Spot¶
AWS EC2 Spot, including request capacity pools, target capacity pools, and aborted capacities.
Configuration¶
Install Func¶
It is recommended to enable Guance integration - extension - managed Func: all prerequisites are automatically installed. Please continue with the script installation.
If you deploy Func yourself, refer to Self-deployed Func
Installation Script¶
Note: Please prepare an Amazon AK that meets the requirements in advance (for simplicity, you can directly grant global read-only permission
ReadOnlyAccess
)
Managed Edition Activation Script¶
- Log in to the Guance console
- Click on the 【Integration】 menu, select 【Cloud Account Management】
- Click 【Add Cloud Account】, choose 【AWS】, fill in the required information on the interface. If cloud account information has been configured before, skip this step.
- Click 【Test】, after a successful test click 【Save】. If the test fails, please check if the relevant configuration information is correct and retest.
- In the 【Cloud Account Management】 list, you can see the added cloud accounts. Click on the corresponding cloud account to enter the details page.
- Click the 【Integration】 button on the cloud account details page. In the
Not Installed
list, findAWS EC2 Spot
, click the 【Install】 button. An installation interface will pop up for installation.
Manual Activation Script¶
-
Log in to the Func console, click 【Script Market】, enter the official script market, search for
guance_aws_ec2_spot_fleet_request
-
After clicking 【Install】, input the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】, the system will automatically create a
Startup
script set and configure the corresponding startup script. -
After enabling, you can see the corresponding automatic trigger configuration in 「Management / Automatic Trigger Configuration」. Click 【Execute】 to immediately execute once without waiting for the scheduled time. Wait a moment, then you can view the execution task records and corresponding logs.
We collect some configurations by default; for more details, see the Metrics section.
Verification¶
- In 「Management / Automatic Trigger Configuration」 confirm whether the corresponding tasks have the corresponding automatic trigger configurations, and check the corresponding task records and logs for any abnormalities.
- In Guance, 「Infrastructure / Custom」 check if there is asset information.
- In Guance, 「Metrics」 check if there are corresponding monitoring data.
Metrics¶
After configuring Amazon EC2 Spot, the default metric sets are as follows. You can collect more metrics through configuration AWS Cloud Monitoring Metric Details
Metric | Description |
---|---|
AvailableInstancePoolsCount |
Spot fleet request specified Spot capacity pools |
BidsSubmittedForCapacity |
Amazon EC2 submitted Spot fleet request capacity |
EligibleInstancePoolCount |
Spot capacity pools specified in the Spot fleet request that Amazon EC2 can fulfill. |
FulfilledCapacity |
Amazon EC2 fulfilled capacity |
MaxPercentCapacityAllocation |
Maximum PercentCapacityAllocation specified across all Spot instance pools in the Spot fleet request |
PercentCapacityAllocation |
Capacity allocated for the specified dimension of Spot capacity pools |
TargetCapacity |
Target capacity of the Spot fleet request |
TerminatingCapacity |
Terminated capacity due to pre-provisioned capacity exceeding the target capacity |