Skip to content

Inspection of Alibaba Cloud Preemptible Instance Survival


Background

Due to the fluctuating market price of preemptible instances influenced by supply and demand, it is necessary to specify a bidding model when creating preemptible instances. A preemptible instance can only be successfully created if the real-time market price for the specified instance specification is lower than the bid and there is sufficient inventory. Therefore, inspection of preemptible instances for cloud assets becomes particularly important. Through inspection, when it is discovered that a preemptible instance is about to be released, it will prompt with the latest prices of all available zones for the current specification of preemptible instances as well as the historical price of that preemptible instance, and provide appropriate handling recommendations.

Prerequisites

  1. Self-built DataFlux Func Guance Special Edition or activate DataFlux Func (Automata)
  2. Create an API Key in Guance under 「Manage / API Key Management」 for operations.

Note: If you consider using a cloud server for offline deployment of DataFlux Func, please ensure it is deployed with the same operator and in the same region as your currently used Guance SaaS deployment here.

Start Inspection

In the self-built DataFlux Func, install 「Guance Integration (Alibaba Cloud-ECS Collection)」 and 「Guance Self-built Inspection (Alibaba Cloud Preemptible Instance Survival Detection)」 via the 「Script Market」 and configure the Guance API Key to start the inspection.

In the DataFlux Func Script Market, select the required inspection scenario to click and install. After configuring the Guance API Key and GuanceNode, choose to deploy and start the script.

image

After the startup script deployment is successful, it will automatically create the startup script and automatic trigger configuration. You can directly jump to view the corresponding configuration through the link.

image

Configure Inspection

Configure Inspection in Guance

image

Enable/Disable

The survival inspection of Alibaba Cloud preemptible instances is default set to 「Enable」 status. It can be manually 「Disabled」. After enabling, it will inspect the configured list of preemptible instances.

Edit

The intelligent inspection 「Alibaba Cloud Preemptible Instance Survival Inspection」 supports users adding manual filtering conditions. In the operation menu on the right side of the intelligent inspection list, click the Edit button to edit the inspection template.

  • Filtering Conditions: Configure instance_type type and spot_with_price_limit accepted discount.
  • Alert Notifications: Supports selecting and editing alert strategies, including event levels requiring notification, notification targets, and alert silence cycles.

To configure the entry parameters, click Edit and fill in the corresponding detection objects in the parameter configuration, then save and start the inspection:

image

You can refer to the following JSON to configure multiple application information

 // Configuration example: Can configure multiple groups or single
    configs = [
        {"instance_type": "xxx1", "spot_with_price_limit": "xxx2"},
        {"instance_type": "xxx3", "spot_with_price_limit": "xxx4"}
    ]

View Events

Guance will conduct inspections based on the current state of preemptible instances. When instances close to release are detected, the intelligent inspection will generate corresponding events. In the operation menu on the right side of the intelligent inspection list, click the View Related Events button to check the corresponding abnormal events.

image

Event Details Page

Click Event, to view the details page of the intelligent inspection event, including event status, time of anomaly occurrence, anomaly name, basic attributes, event details, alert notifications, history records, and related events.

  • Click the small icon 「View Monitor Configuration」 in the upper-right corner of the details page to view and edit the current intelligent inspection configuration details.

Basic Attributes

  • Detection Dimensions: Based on the filtering conditions configured for intelligent inspection, supports copying key/value, adding to filters, and viewing related logs, containers, processes, security checks, traces, user analysis, synthetic tests, and CI data.
  • Extended Attributes: After selecting extended attributes, supports copying in key/value format, forward/reverse filtering.

image

Event Details

  • Event Overview: Describes the object and content of the abnormal inspection event.
  • Preemptible Instance Details: View detailed information about the current instance, including instance name, ID, region, availability zone, etc.
  • Preemptible Instance Type Price: View the price of all available zones under the current specification to help users place bids.
  • Preemptible Instance Type Historical Price: View the historical price of preemptible instances under different availability zones for the current specification to track price changes.
  • Warm Suggestions: Provides operational suggestions for the current abnormal scenario.

image

History Records

Supports viewing the detection object, anomaly/recovery times, and duration.

image

Supports viewing related events through filtered fields and selected time component information.

image

Common Issues

1. How to configure the detection frequency for the survival inspection of Alibaba Cloud Preemptible Instances

  • In the self-built DataFlux Func, add fixed_crontab='*/2 * * * *', timeout=60 in the decorator while writing the custom inspection processing function. Then configure it in 「Manage / Automatic Trigger Configuration」.

2. Why might there be no anomaly analysis during the triggering of the survival inspection of Alibaba Cloud Preemptible Instances

When there is no anomaly analysis in the inspection report, please check the data collection status of the current datakit.

3. During the inspection process, previously normal scripts show abnormal errors

Please update the referenced script set in the DataFlux Func Script Market. You can check the update record of the Script Market through the Change Log to facilitate timely updates to the script.

4. During the upgrade of the inspection script, why does the corresponding script set in Startup not change

Please delete the corresponding script set first, then click the Upgrade button and configure the corresponding Guance API key to complete the upgrade.

5. How to determine if the inspection has taken effect after enabling

In 「Manage / Automatic Trigger Configuration」, view the corresponding inspection status. The status should first be enabled, and secondly, you can verify whether the inspection script has any issues by clicking Execute. If there is a message indicating successful execution xxx minutes ago, the inspection is running normally and taking effect.

Feedback

Is this page helpful? ×