tencent cloud

Cloud Log Service

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Features
Available Regions
Limits
Concepts
Service Regions and Service Providers
Purchase Guide
Billing Overview
Product Pricing
Pay-as-You-Go
Billing
Cleaning up CLS resources
Cost Optimization
FAQs
Getting Started
Getting Started in 1 Minute
Getting Started Guide
Quickly Trying out CLS with Demo
Operation Guide
Resource Management
Permission Management
Log Collection
Metric Collection
Log Storage
Metric Storage
Search and Analysis (Log Topic)
Search and Analysis (Metric Topic)
Dashboard
Data Processing documents
Shipping and Consumption
Monitoring Alarm
Cloud Insight
Independent DataSight console
Historical Documentation
Practical Tutorial
Log Collection
Search and Analysis
Dashboard
Monitoring Alarm
Shipping and Consumption
Cost Optimization
Developer Guide
Embedding CLS Console
CLS Connection to Grafana
API Documentation
History
Introduction
API Category
Making API Requests
Topic Management APIs
Log Set Management APIs
Index APIs
Topic Partition APIs
Machine Group APIs
Collection Configuration APIs
Log APIs
Metric APIs
Alarm Policy APIs
Data Processing APIs
Kafka Protocol Consumption APIs
CKafka Shipping Task APIs
Kafka Data Subscription APIs
COS Shipping Task APIs
SCF Delivery Task APIs
Scheduled SQL Analysis APIs
COS Data Import Task APIs
Data Types
Error Codes
FAQs
Health Check
Collection
Log Search
Others
CLS Service Level Agreement
CLS Policy
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary
DocumentationCloud Log ServicePractical TutorialMonitoring AlarmSetting Interval-Valued Comparison and Periodically-Valued Comparison as Alarm Trigger Conditions

Setting Interval-Valued Comparison and Periodically-Valued Comparison as Alarm Trigger Conditions

PDF
Focus Mode
Font Size
Last updated: 2024-01-20 17:28:40

Overview

Setting an alarm trigger condition usually involves interval-valued comparison of metrics due to business characteristics. For example, you can set to trigger an alarm when API response time is over 50% longer than that in the same time period yesterday.

Configuration method

When configuring an alarm policy, enter the following query statements and trigger conditions:
Query statements:
* | select
round(compare[3], 4) as ratio,
compare[1] as current_avg_request_time,
compare[2] as yesterday_avg_request_time
from
(
select compare(avg_request_time, 86400) as compare
from
(
select avg("request_time") as avg_request_time
)
)
In the execution result of the above statements:
ratio indicates the ratio of the current average API response time to the value yesterday (86,400 seconds earlier).
current_avg_request_time indicates the current average API response time.
yesterday_avg_request_time indicates the average API response time in the same period yesterday.
The compare function is used in the above statement. For more information, see Interval-Valued Comparison and Periodicity-Valued Comparison Functions.
Trigger conditions:
$1.ratio > 1.5
An alarm will be triggered if ratio exceeds 1.5, that is, the time is over 50% longer than that yesterday.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback