当前位置:网站首页>[log service CLS] Tencent cloud log service CLS accesses CDN

[log service CLS] Tencent cloud log service CLS accesses CDN

2022-06-24 12:36:00 Meow man

Introduce

First of all, let's understand what a log service is CLS, According to the official description below :

The log service (Cloud Log Service,CLS) It is a one-stop log data service platform provided by Tencent cloud , It mainly provides the following functions :

Log collection : Log collection end LogListener ,API And so on . The logging stored : Centralized storage and management of log data . Search analysis : Provide log query and filtering function . Delivery consumption : Provide log delivery / Consumer function , Facilitate further processing of log data . CLS Seamless connection with multiple cloud product logs of Tencent cloud .

The functions described above look a lot , But the first experience may still be confused . But follow the official console and document instructions , It's easy to get started .

Opening CLS The log service

First, access the log service CLS Official website , Click on 【 Immediate use 】.

The opening dialog box will appear for the first time , Click OK , Enter the log service console .

The log service Log service platform Log data analysis - Tencent cloud (tencent.com)

From the console you can see , Above is the overview data , Below is the quick access entrance .

Fast access basically covers the mainstream log service application scenarios in the market , This experience is based on the content distribution network CDN For example , Take a look at how the log service here is used .

Content distribution network CDN Access log service

Document introduction

First click... On the console 【 Fast access 】-【 Content distribution network CDN】, It will appear on the right 【 Real time log 】 Documents , There are detailed documents in it . The document links are as follows :

Content distribution network Real time log - Configuration Guide - Document center - Tencent cloud

Opening CDN The log service

Get into CDN Console , choice 【 The log service 】, Switch to 【 Real time log 】 tab . For the first time, you should choose to open the real-time log service .

Create a service role and authorize .

image-20210525143115330

choice 【 Agree to authorize 】

New blog topic

Back to the real-time log , choice 【 newly build 】, Then enter the topic name , Select the domain name to add in the domain name list . Click save when finished .

Be careful : At present, only domain names of domestic regions can be added here .

image-20210525143334757

You can see that the current status is 【 In delivery 】, The configuration needs to wait 15 minute .

Make complaints : The waiting time here is too long , and 15 Refresh the page in minutes , Still in delivery , There is no change in state .

Search logs

Click on 【 retrieval 】, You can see the log information , Currently, there is no log .

CDN Log generation for is easy , As long as the domain name is accessed , Records will be generated in the search analysis .

I visited the root path of my domain name / and /list route , The following records were generated :

You can see detailed client access information from the table , Including but not limited to access addresses 、IP source 、 Browser kernel version 、 Operating system version 、 User Province, etc .

If you think there are too many data , Not conducive to screening , You can select the display field on the left , So the key information is clear at a glance .

I will be a local H5 page , Deployed to the secondary directory of the domain name , After the visit 77 Data .

Many of them are picture resources , Many log entries are generated . Therefore, you can consider configuring image resources on other domain names , This allows you to H5 The home page is distinguished from the picture resources , Make the log data not redundant .

Chart analysis

Switch to 【 Chart analysis 】, The following content is found to be empty , This is because there are only today's data , It will take some time to analyze . Fortunately, the number of logs generated in a single day on that day , Can be on the top 【 Number of logs 】 You can see clearly in the histogram .

Delete the log topic

If you do not need the log topic service , In the log service console , find 【 The log service 】-【 Journal topics 】, Find the specified log topic ID Or name , Click delete .

Deleting is a dangerous operation , Operation must be careful .

Make complaints : I didn't click OK , Just click on the top right corner x, The log topic is deleted , And there is no recycle bin .

If important data needs to be backed up , Can be in 【 Search analysis 】 Inside , Click the download button .

You can also refer to the official documents for specific operations :

The log service Download logs - Operation guide - Document center - Tencent cloud

summary

The log service CLS This is my first time to experience the console , Only then did I discover the log service of the cloud function used before , It also comes from the log service CLS. Through this experience , I have basically found out CLS Usage of . But for now , The log service CLS Not mature enough , For example, the current console search monitoring granularity is only one minute , The document lacks best practices for specific scenarios , Delete operation has bug, Lack of recycle bin, etc . I hope the following versions , The log service CLS Can do better and better .

原网站

版权声明
本文为[Meow man]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/05/20210526184508265A.html