Skip to content

Manage SLO

You can manage all SLO tasks on the Monitoring > SLO page. The list displays key metrics in real time (such as Success Rate and Error Budget) and supports enabling, editing, viewing events, exporting to dashboards, and importing/exporting SLO configurations.

List Fields

Field
Description
Monitor The number of monitors associated with the SLI, that is, the metrics that measure service performance.
Target The target percentage of service availability set when creating the SLO task.
Success Rate (7 days) The percentage of time without system anomalies within the given evaluation period (Success Rate = time without system anomalies / evaluation period × 100%):
  • When minimum target percentage ≤ percentage < target percentage, the SLA is considered unhealthy and the Success Rate is displayed in orange;
  • When percentage < minimum target percentage, the SLA is considered breached and the Success Rate is displayed in red.
  • Error Time (7 days) The time during which the monitor is in an abnormal state / allowance consumed.
    Error Budget (7 days) The remaining tolerable error time of the current SLO (assuming the target SLO is set to 95%, there is a 5% error tolerance; with the default period of the last 7 days, the default is: Error Budget = 7 days × 5% = 8.4 h). Displayed as:
  • Green: remaining tolerable error time ≥ 0;
  • Red: remaining tolerable error time < 0.
  • Operations

    • Search: filter by SLO name;
    • Batch: enable, disable, delete, or export multiple selected SLOs;
    • Individual SLO task: enable, disable, edit (excluding name/target/frequency), delete;
    • Delete: delete existing SLO tasks;
    • View related events: view all unrecovered events triggered by this SLO with one click;
    • Export to dashboard: sync the SLO view to a dashboard.
    Note
    • Deleting an SLO also deletes its dashboard view;
    • The time range of the SLO view in the dashboard is consistent with the dashboard by default, and the list displays the Success Rate for the last 7 days by default.

    Import and Export

    Members with SLO configuration management permissions can migrate SLOs and their associated configurations between workspaces through a ZIP resource package.

    Export

    • Export All: click the settings button in the upper-right corner of the list and select Export All;
    • Export Selected: select one or more SLOs and click Export in the batch operations bar. SLOs selected across pages remain in the current export scope.

    After the export task is completed, the system opens a result dialog showing the number of exported SLOs and the number of associated resources. Click Download Export Package to obtain the ZIP file.

    The export can result in:

    • Complete export: all selected SLOs and their associated resources are exported;
    • Partial export: the dialog shows the exported count and lists the unexported resources and the affected SLOs by Insufficient Permissions and Other Reasons; the generated resource package can still be downloaded;
    • Nothing to export: the dialog displays "No SLO available for export" and the download button is unavailable.

    The SLO resource package includes, according to the actual configuration, SLI monitors, child monitors of composite monitors, alert policies, notification targets, custom notification dates, associated tags, and required security detection rules.

    Note

    If a required associated resource of an SLO cannot be exported, the system skips that SLO to avoid generating a configuration with incomplete dependencies.

    Import

    1. Click the settings button in the upper-right corner of the list and select Import;
    2. Select a ZIP resource package exported by the system;
    3. If resources with duplicate names are detected, select Skip Duplicates or Overwrite, then confirm the import;
    4. Wait for the import to complete. The system refreshes the current SLO list.

    If the cross-workspace monitors in the resource package are not authorized in the target workspace, the import result displays the related monitors and the target workspace. After completing the authorization, you can import again.

    Query SLO Values with DQL

    For error time, refer to the following query:

    df_slo_cost represents the deducted minutes; the sum of the values is the error time. Replace df_slo_id with the corresponding value:

    E::`slo`:(sum(`df_slo_cost`)) { `df_slo_id` = 'monitor_6bad2a76dd9b41d7894f21a76d44ae42' }
    

    To query the 7-day SLO value, use the following DQL expression:

    eval((10080-A)/10080 *100, A="E::`slo`:(sum(`df_slo_cost`)) { `df_slo_id` = 'monitor_6bad2a76dd9b41d7894f21a76d44ae42'}")
    

    Example:

    In the figure below, the SLO value of the SLO task in the past 7 days is 80.496%.

    Go to Shortcut > Query Tools, select DQL Query, and enter the query statement for the 7-day SLO value. The query result matches the value in the figure above.

    Note

    When using Query Tools > DQL Query, ensure that the time range in the upper-right corner is consistent with the time range used to obtain the SLO value. You can view the slo_id at Events > Event Details: