当前位置:网站首页>CLB O & M & operation best practices - big insight into access logs
CLB O & M & operation best practices - big insight into access logs
2022-06-24 01:31:00 【Log service CLS assistant】
author :v god
Introduction : Cloud native log service (Cloud Log Service,CLS) It is a one-stop service provided by Tencent cloud Log data Solution platform , Provides data collection from logs 、 Log storage to log retrieval , Chart analysis 、 Monitoring alarm 、 Log delivery and other services , Assist users to solve business problems through logs Operation and maintenance 、 Service monitoring 、 Log audit and other scenarios .
CLB Access log big insight
Load balancing CLB As hundreds of billions QPS Gateway products , Fine operation is very important , and CLB The access log is a powerful tool .
adopt CLB Access log , We can mine massive amounts of data value , Not only can client requests be monitored from the access log 、 Assist in troubleshooting 、 You can also analyze and sort out user behavior , Provide data support for operational roles .
CLB: Load balancing (Cloud Load Balancer,CLB) Provide safe and fast traffic distribution service , Access traffic through CLB It can be automatically assigned to multiple cloud servers in the cloud , Expand the service capabilities of the system and eliminate single points of failure . Load balancing supports 100 million level connections and 10 million concurrent levels , Easy to handle high traffic , Meet business needs .
In this issue, we mainly introduce how to use CLS analysis CLB Access log .
Operation and maintenance monitoring
scene
Xiao Qin is a classmate in charge of the operation and maintenance of an Internet business advertising platform , Recently, I often meet the challenge of advertisers : What's wrong with the slow response of users clicking on our ads on your platform . In many cases, advertising partners have high requirements for timeliness and stability , Mr. Qin asked if there was any abnormal service , such as 1min Internal alarm ,5min Internal solution .
Xiao Qin was at a loss , Thought it over , Need to use CLB The log has the following capabilities :
- The access delay to the client , Abnormal request monitoring , Alarm above a certain threshold ;
- Alarm appears , There is additional information to help determine the cause of the fault :
- Which websites are visited by requests whose latency is higher than the threshold , Which? LB Instance and backend RS The server ;
- LB Instance and backend RS Server delay statistics .
CLS Logging solutions
be based on CLS Of 1min Real time alarm and multidimensional analysis capability , Users can quickly target CLB Access logs for O & M monitoring , Quickly locate abnormal problems and repair faults .
1. First , Turn on CLB Access log posting CLS.
In load balancing " Instance management " On the page , Click load balancing ID, Can be opened “ Log posted to CLS”. As shown in the figure below , Refer to... For detailed operation steps : Configure access logs .
2. Configure the alarm strategy for client access delay and abnormal request monitoring .
Client access delay statistics :
* | select time_series(__TIMESTAMP__, '1m', '%Y-%m-%d %H:%i:%s', '0') as time, round(avg(request_time)*1000,2) as " Average access delay " group by time order by time limit 1000
Exception request statistics :
status:>200 | select time_series(__TIMESTAMP__, '1m', '%Y-%m-%d %H:%i:%s', '0') as time, status, count(1) group by time,status order by time limit 1000
- Configure alarm policy , Detect the average delay per minute , Above threshold alarm .
- Multidimensional analysis is configured in the alarm strategy , When an alarm occurs , With additional information :
- LB Instance and backend RS Server delay statistics ;
- Which websites are visited by requests whose latency is higher than the threshold , Which? LB Instance and backend RS The server .
- Configure notification channels , The following channels can be supported :
- SMS
- Enterprise WeChat
- Telephone
- Custom interface callback
3. Receive alarms , Rapid positioning .
Once the alarm is triggered , WeChat 、 Enterprise WeChat 、 SMS 、 Telephone and other terminals receive alarm information and details :
Alarm details , See the affected RS example ,LB Examples and other information .
It is known from the alarm information ,LB The average instance delay is high , Affected by LB Examples are mainly 9.*****.1. Xiao Qin of the operation and maintenance department has found an abnormality LB Instance and repair , The overall time consumption is only 1 minute .
Operation statistics
Actually CLB The access log can not only become the right assistant of the operation and maintenance students , At the same time, it is also a tool for operating students “ tool ”.
scene
A scientific and technological content APP I hope to plan an offline salon next month , On the one hand, it increases the stickiness of stock users , On the other hand, take this opportunity to publicize products , Pull new users . The preparation time is short , Limited funding , How to make use of limited resources , Finish as much as possible KPI The goal is . Xiaoting, the operation classmate, pondered hard , List the information you need to know :
- Where will the offline salon be held : Need to know the geographical source of access to customers , Understand the geographical location of key customer groups ;
- What is the theme of the Salon : Statistics hot sites TOP Sort , Understand what content blocks users pay more attention to ;
- What clients are currently used by users to access : For the current client distribution , Focus on the design of landing page ;
- Which channels are the landing pages put in : Statistics of current website request sources , Look for the diversion entrance with high flow and focus on advertising .
Let's see how to use CLB Visit the log to easily solve the urgent needs of the operation students ~
1. Understand the geographic sources of access to customers : utilize CLS Provide IP function , The client ip Convert to the corresponding province or country .
China distribution :
* | select count(1) as c, ip_to_province(remote_addr) as address group by address limit 100
Global distribution :
* | select count(1) as c, ip_to_country(remote_addr) as address group by address limit 100
2. Statistics hot sites TOP Sort :http_host The domain name of the access request is recorded , Request domain name by statistics pv,uv, You can count top host Sort .
* | select http_host, count(*) as pv, count(distinct(remote_addr)) as uv group by http_host order by pv desc limit 100
3. Statistics of client distribution .
* | select http_user_agent, count(*) group by http_user_agent
4. Statistics of current website request sources :http_referer Field records where the site's requests come from .
* | select http_referer, count(*) as count group by http_referer order by count desc limit 100
CLB Access log data mining
CLB Load balanced access logs can also tap a lot of value , such as pv,uv Trend Statistics , Client message traffic statistics , Status code distribution ,P99,P95 Access delay, etc . To help users quickly analyze CLB Access log ,CLS and CLB Jointly create a visual analysis scheme out of the box , The user only needs to open CLB Access log posting CLS, Enjoy immediately !
Operation steps
- land Console , Turn on CLB Access log posting CLS, See documentation Load balancing access log configuration .
- open Visual dashboard .
The above is the current issue CLB Access log play sharing , If you have more interesting logging practices ,
Welcome to scan and follow us , Contribute and share !
The articles :
CLB The core of the log is how you play Get Have we arrived ?
【 The log service CLS】 Tencent cloud log service CLS Access to the content distribution network CDN
【 Tencent cloud log service CLS】serverless In application CLS Service details
【 The log service CLS】Nginx Access log retrieval 、 Analysis examples
边栏推荐
- Longest substring without duplicate characters
- AES encryption analysis of CNKI academic translation
- Law / principle / rule / rule / theorem / axiom / essence / Law
- Video stream playback address redirection optimization after easycvr replaces the new kernel
- [log service CLS] experience of troubleshooting abnormal scenarios with tke event log
- 5-step method to quickly find data analysis ideas
- How to improve program performance
- How to build high quality and high brand websites what should be paid attention to in the construction of enterprise websites
- Coordinate system "slang" in GIS world
- Why use CDN content distribution network?
猜你喜欢
![[shutter] how to use shutter packages and plug-ins](/img/a6/e494dcdb2d3830b6d6c24d0ee05af2.png)
[shutter] how to use shutter packages and plug-ins

Use recursion to form a multi-level directory tree structure, with possibly the most detailed notes of the whole network.

Error reported using worker: uncaught domexception: failed to construct 'worker': script at***

JS input / output statements, variables
Talk to Wu Jiesheng, head of Alibaba cloud storage: my 20 years of data storage (unlimited growth)
![[flutter] comment utiliser les paquets et plug - ins flutter](/img/a6/e494dcdb2d3830b6d6c24d0ee05af2.png)
[flutter] comment utiliser les paquets et plug - ins flutter

Cross domain and jsonp

【Flutter】如何使用Flutter包和插件

Arm learning (7) symbol table and debugging

Installation and use of winscp and putty
随机推荐
Oushudb learning experience sharing (I)
How to build a practical website and how to operate after the website goes online
One article introduces you to the world of kubernetes
Arm learning (7) symbol table and debugging
Spatial4j introduction practice
How does Huawei weautomate RPA achieve the natural growth of government enterprise automation?
Echo framework: implementing distributed log tracing
Go language core 36 lectures (go language practice and application VII) -- learning notes
Gin framework: automatically add requestid
ctfhub---SSRF
How does smart digital operation get through offline collection and online marketing?
Analysis of the whole process of webapck5 core packaging principle
Dart series: creating a library package
Qu'est - ce que le financement des pensions? Quels sont les produits financiers pour les personnes âgées?
Longest substring without duplicate characters
What is the website construction process? What details need to be valued?
How to implement NSQ delay streaming technology in easycvr?
EasyPlayer. JS play m3u8 error net:: err_ EMPTY_ Response, how to solve it?
Grab startup logcat
Radware load balancer common maintenance query commands