forked from docs/doc-exports
Reviewed-by: Mützel, Andrea <andrea.muetzel@t-systems.com> Co-authored-by: liusiying01 <liusiying@huawei.com> Co-committed-by: liusiying01 <liusiying@huawei.com>
90 lines
17 KiB
HTML
90 lines
17 KiB
HTML
<a name="lts_04_0003"></a><a name="lts_04_0003"></a>
|
|
|
|
<h1 class="topictitle1">Managing Log Groups</h1>
|
|
<div id="body32001227"><p id="lts_04_0003__en-us_topic_0000001125775239_p198512252274">A log group is the basic unit for LTS to manage logs. It classifies and consists of log streams, but does not store any log data itself. Up to 100 log groups can be created for each account.</p>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p6911030172220">A log group usually corresponds to a project or business in a company. You are advised to sort log streams of various applications or services within a project or business to the same log group. In this way, project staff only need to monitor log streams in the log group corresponding to their project, without being distracted by log streams of other projects.</p>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p1391153052211">LTS allows you to add tags to log groups to help O&M personnel manage services.</p>
|
|
<div class="section" id="lts_04_0003__en-us_topic_0000001125775239_section8823122318815"><h4 class="sectiontitle">Prerequisites</h4><p id="lts_04_0003__en-us_topic_0000001125775239_p782312317811">You have obtained an account and its password for logging in to the LTS console.</p>
|
|
</div>
|
|
<div class="section" id="lts_04_0003__en-us_topic_0000001125775239_se2459b5266d5409991b981d947d68462"><h4 class="sectiontitle">Creating a Log Group</h4><ol id="lts_04_0003__en-us_topic_0000001125775239_ol864510455592"><li id="lts_04_0003__en-us_topic_0000001125775239_li256471520374"><span>Log in to the management console and choose <strong id="lts_04_0003__en-us_topic_0000001125775239_b49374154011">Management & Deployment</strong> > <strong id="lts_04_0003__en-us_topic_0000001125775239_b12937101517020">Log Tank Service</strong>.</span></li><li id="lts_04_0003__en-us_topic_0000001125775239_li764615454596"><span>On the <strong id="lts_04_0003__en-us_topic_0000001125775239_b5708123153120">Log Management</strong> page, click <strong id="lts_04_0003__en-us_topic_0000001125775239_b10708143120316">Create Log Group</strong>.</span></li><li id="lts_04_0003__en-us_topic_0000001125775239_li96464459599"><span>On the displayed page, set log group parameters by referring to <a href="#lts_04_0003__en-us_topic_0000001125775239_table9217134717322">Table 1</a>.</span><p>
|
|
<div class="tablenoborder"><a name="lts_04_0003__en-us_topic_0000001125775239_table9217134717322"></a><a name="en-us_topic_0000001125775239_table9217134717322"></a><table cellpadding="4" cellspacing="0" summary="" id="lts_04_0003__en-us_topic_0000001125775239_table9217134717322" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Log group parameters</caption><thead align="left"><tr id="lts_04_0003__en-us_topic_0000001125775239_row1221719472329"><th align="left" class="cellrowborder" valign="top" width="22.85%" id="mcps1.3.5.2.3.2.1.2.3.1.1"><p id="lts_04_0003__en-us_topic_0000001125775239_p13217134710325">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="77.14999999999999%" id="mcps1.3.5.2.3.2.1.2.3.1.2"><p id="lts_04_0003__en-us_topic_0000001125775239_p1221719474323">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_04_0003__en-us_topic_0000001125775239_row11217164763218"><td class="cellrowborder" valign="top" width="22.85%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="lts_04_0003__en-us_topic_0000001125775239_p221754714320">Log Group Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="77.14999999999999%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="lts_04_0003__en-us_topic_0000001125775239_p1264620378361">A log group is the basic unit for LTS to manage logs. It is used to classify log streams. If there are too many logs to collect, separate logs into different log groups based on log types, and name log groups in an easily identifiable way.</p>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p1552064718156">LTS automatically generates a default log group name. You are advised to customize one based on your service. You can also change it after the log group is created. The naming rules are as follows:</p>
|
|
<ul id="lts_04_0003__en-us_topic_0000001125775239_ul129691787341"><li id="lts_04_0003__en-us_topic_0000001125775239_li1097038183414">Enter 1 to 64 characters, including only letters, digits, hyphens (-), underscores (_), and periods (.). Do not start with a period or underscore or end with a period.</li><li id="lts_04_0003__en-us_topic_0000001125775239_li439518710277">Each log group name must be unique.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_04_0003__en-us_topic_0000001125775239_row650695014493"><td class="cellrowborder" valign="top" width="22.85%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="lts_04_0003__en-us_topic_0000001125775239_p1150718503493">Enterprise Project Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="77.14999999999999%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="lts_04_0003__en-us_topic_0000001125775239_p9281830124320">Enterprise projects allow you to manage cloud resources and users by project.</p>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p9507750164913">By default, the <strong id="lts_04_0003__en-us_topic_0000001125775239_b18935201310223">default</strong> enterprise project is used. You are advised to select an enterprise project that fits your service needs. To see all available options, click <strong id="lts_04_0003__en-us_topic_0000001125775239_b10937201382215">View Enterprise Projects</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_04_0003__en-us_topic_0000001125775239_row1021724718321"><td class="cellrowborder" valign="top" width="22.85%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="lts_04_0003__en-us_topic_0000001125775239_p172177477324">Log Retention (Days)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="77.14999999999999%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="lts_04_0003__en-us_topic_0000001125775239_p1321774711326">Specify the log retention period for the log group, that is, how many days the logs will be stored in LTS after being reported to LTS.</p>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p782171752314">By default, logs are retained for 30 days. You can set the retention period to one to 365 days.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_04_0003__en-us_topic_0000001125775239_row132171347173213"><td class="cellrowborder" valign="top" width="22.85%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="lts_04_0003__en-us_topic_0000001125775239_p2021717473329">Tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="77.14999999999999%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="lts_04_0003__en-us_topic_0000001125775239_p12217154719325">Tag the log group as required. Click <strong id="lts_04_0003__en-us_topic_0000001125775239_b655211199157">Add Tags</strong> and enter a tag key and value. If you enable <strong id="lts_04_0003__en-us_topic_0000001125775239_b455271951513">Apply to Log Stream</strong>, the tag will be applied to all log streams in the log group. To add more tags, repeat this step. A maximum of 20 tags can be added.</p>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p10411449123218"><strong id="lts_04_0003__en-us_topic_0000001125775239_b144164913218">Tag key restrictions:</strong></p>
|
|
<ul id="lts_04_0003__en-us_topic_0000001125775239_ul657013211515"><li id="lts_04_0003__en-us_topic_0000001125775239_li155701124513">A tag key can contain letters, digits, spaces, and special characters (_.:=+-@), but cannot start or end with a space or start with <strong id="lts_04_0003__en-us_topic_0000001125775239_b6701018418">_sys_</strong>.</li><li id="lts_04_0003__en-us_topic_0000001125775239_li657012213512">A tag key can contain up to 128 characters.</li><li id="lts_04_0003__en-us_topic_0000001125775239_li1357018285117">Each tag key must be unique.</li></ul>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p7735534182614"><strong id="lts_04_0003__en-us_topic_0000001125775239_b168433104323">Tag value restrictions:</strong></p>
|
|
<ul id="lts_04_0003__en-us_topic_0000001125775239_ul19804115165118"><li id="lts_04_0003__en-us_topic_0000001125775239_li1280419535120">A tag value can contain letters, digits, spaces, and the following special characters: _.:=+-@</li><li id="lts_04_0003__en-us_topic_0000001125775239_li2080413513514">A tag value can contain up to 255 characters.</li></ul>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p1109829163513"><strong id="lts_04_0003__en-us_topic_0000001125775239_b20956104210109">Deleting a tag:</strong></p>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p17787193813513">Click <strong id="lts_04_0003__en-us_topic_0000001125775239_b189611856151011">Delete</strong> in the <strong id="lts_04_0003__en-us_topic_0000001125775239_b1996185671015">Operation</strong> column of the tag.</p>
|
|
<div class="warning" id="lts_04_0003__en-us_topic_0000001125775239_note1530092814536"><span class="warningtitle"> WARNING: </span><div class="warningbody"><p id="lts_04_0003__en-us_topic_0000001125775239_p1992310306">Deleted tags cannot be recovered.</p>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p649563275316">If a tag is used by a transfer task, you need to modify the task configuration after deleting the tag.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_04_0003__en-us_topic_0000001125775239_row145506369356"><td class="cellrowborder" valign="top" width="22.85%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="lts_04_0003__en-us_topic_0000001125775239_p555163663510">Remark</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="77.14999999999999%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="lts_04_0003__en-us_topic_0000001125775239_p555163613513">Enter remarks. The value contains up to 1,024 characters.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</p></li><li id="lts_04_0003__en-us_topic_0000001125775239_li166461745195914"><span>Click <strong id="lts_04_0003__en-us_topic_0000001125775239_b189455372055">OK</strong>. The created log group will be displayed in the log group list.</span><p><ul id="lts_04_0003__en-us_topic_0000001125775239_ul20242237191115"><li id="lts_04_0003__en-us_topic_0000001125775239_li9377125581819">In the log group list, view information such as the log group name, tags, and log streams.</li><li id="lts_04_0003__en-us_topic_0000001125775239_li1252964241110">Click the log group name to access the log details page.</li></ul>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="lts_04_0003__en-us_topic_0000001125775239_section195512265102"><h4 class="sectiontitle">Modifying a Log Group</h4><p id="lts_04_0003__en-us_topic_0000001125775239_p19695332141013">After a log group is created, you can modify its settings, such as the group name, log retention duration, or tags as follows:</p>
|
|
<ol id="lts_04_0003__en-us_topic_0000001125775239_ol58733241003"><li id="lts_04_0003__en-us_topic_0000001125775239_li1987317248017"><span>In the log group list on the <strong id="lts_04_0003__en-us_topic_0000001125775239_b20763154612498">Log Management</strong> page, locate the target log group and click <strong id="lts_04_0003__en-us_topic_0000001125775239_b1249321614411">Modify</strong> in the <strong id="lts_04_0003__en-us_topic_0000001125775239_b3493141615415">Operation</strong> column.</span></li><li id="lts_04_0003__en-us_topic_0000001125775239_li387372414020"><span>On the page displayed, modify the group name, log retention period, and tags.</span></li><li id="lts_04_0003__en-us_topic_0000001125775239_li168731424907"><span>Click <strong id="lts_04_0003__en-us_topic_0000001125775239_b185810910579">OK</strong>.</span></li><li id="lts_04_0003__en-us_topic_0000001125775239_li15873152415013"><span>After the modification is successful, move the cursor over the log group name to view the new and original names along with the log group ID.</span><p><div class="fignone" id="lts_04_0003__en-us_topic_0000001125775239_fig11188131819131"><span class="figcap"><b>Figure 1 </b>Log group name</span><br><span><img id="lts_04_0003__en-us_topic_0000001125775239_image1428618141132" src="en-us_image_0000001748544704.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="lts_04_0003__en-us_topic_0000001125775239_section1571594316373"><h4 class="sectiontitle">Deleting a Log Group</h4><p id="lts_04_0003__en-us_topic_0000001125775239_p676517115314">You can delete a log group that is no longer needed. Deleting a log group will also delete the log streams and log data in the log group.</p>
|
|
<p id="lts_04_0003__en-us_topic_0000001125775239_p13284175614311">If you want to delete a log group that is associated with a log transfer task, delete the task first.</p>
|
|
<div class="warning" id="lts_04_0003__en-us_topic_0000001125775239_note41521939590"><span class="warningtitle"><img src="public_sys-resources/warning_3.0-en-us.png"> </span><div class="warningbody"><p id="lts_04_0003__en-us_topic_0000001125775239_p31520305914">Deleting a log group may lead to exceptions in related log tasks. In addition, deleted log groups cannot be restored.</p>
|
|
</div></div>
|
|
<ol id="lts_04_0003__en-us_topic_0000001125775239_ol1520516492016"><li id="lts_04_0003__en-us_topic_0000001125775239_li52052049008"><span>In the log group list on the <strong id="lts_04_0003__en-us_topic_0000001125775239_b1438893312243">Log Management</strong> page, locate the target log group and click <strong id="lts_04_0003__en-us_topic_0000001125775239_b838903314246">Delete</strong> in the <strong id="lts_04_0003__en-us_topic_0000001125775239_b13898334240">Operation</strong> column.</span></li><li id="lts_04_0003__en-us_topic_0000001125775239_li2205124910018"><span>Enter <strong id="lts_04_0003__en-us_topic_0000001125775239_b1398873010327">DELETE</strong> in the text box or click <strong id="lts_04_0003__en-us_topic_0000001125775239_b15975459173315">Auto Enter</strong>, and click <strong id="lts_04_0003__en-us_topic_0000001125775239_b18989183018327">OK</strong>.</span><p><div class="fignone" id="lts_04_0003__en-us_topic_0000001125775239_fig1175701920315"><span class="figcap"><b>Figure 2 </b>Deleting a log group</span><br><span><img id="lts_04_0003__en-us_topic_0000001125775239_image103492001218" src="en-us_image_0000002178924481.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="lts_04_0003__en-us_topic_0000001125775239_section1347363017535"><h4 class="sectiontitle">Searching Log Groups/Streams</h4><p id="lts_04_0003__en-us_topic_0000001125775239_p16879103511332">You can search for log groups using the following filter criteria:</p>
|
|
<ul id="lts_04_0003__en-us_topic_0000001125775239_ul688641193418"><li id="lts_04_0003__en-us_topic_0000001125775239_li48861611183413"><strong id="lts_04_0003__en-us_topic_0000001125775239_b69778120351">Log Group/Log Stream</strong>: log group or stream name.</li><li id="lts_04_0003__en-us_topic_0000001125775239_li13669557154315"><strong id="lts_04_0003__en-us_topic_0000001125775239_b1066091131114">Original Log Group Name/Original Log Stream Name</strong>: original name of a log group or log stream before the name is changed, that is, the name defined during creation.</li><li id="lts_04_0003__en-us_topic_0000001125775239_li250792943411"><strong id="lts_04_0003__en-us_topic_0000001125775239_b1248211811220">Log Group Name/ID</strong>: log group name or ID (hover your cursor over the log group name to view the ID)</li><li id="lts_04_0003__en-us_topic_0000001125775239_li75457428347"><strong id="lts_04_0003__en-us_topic_0000001125775239_b191991143201317">Log Stream Name/ID</strong>: log stream name or ID (hover your cursor over the log stream name to view the ID)</li><li id="lts_04_0003__en-us_topic_0000001125775239_li15306175893420"><strong id="lts_04_0003__en-us_topic_0000001125775239_b1972872471415">Log Group Tag</strong>: tags set for a log group</li><li id="lts_04_0003__en-us_topic_0000001125775239_li106022552516"><strong id="lts_04_0003__en-us_topic_0000001125775239_b946511264196">Remark</strong>: remarks customized during log group creation.</li></ul>
|
|
<div class="fignone" id="lts_04_0003__en-us_topic_0000001125775239_fig63441237144814"><span class="figcap"><b>Figure 3 </b>Searching log groups/streams</span><br><span><img id="lts_04_0003__en-us_topic_0000001125775239_image20401231191411" src="en-us_image_0000001748704148.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</div>
|
|
<div class="section" id="lts_04_0003__en-us_topic_0000001125775239_section2266124132810"><h4 class="sectiontitle">Other Operations</h4><ul id="lts_04_0003__en-us_topic_0000001125775239_ul18121204616217"><li id="lts_04_0003__en-us_topic_0000001125775239_li11212461626"><strong id="lts_04_0003__en-us_topic_0000001125775239_b432611516278">Viewing log group details:</strong> In the log group list, click <strong id="lts_04_0003__en-us_topic_0000001125775239_b0413111819460">Details</strong> in the <strong id="lts_04_0003__en-us_topic_0000001125775239_b194132184460">Operation</strong> column of the desired log group to view its name, ID, and creation time.</li><li id="lts_04_0003__en-us_topic_0000001125775239_li156419154318">To download all displayed information about a log group to the local PC, click <span><img id="lts_04_0003__en-us_topic_0000001125775239_image9664162714919" src="en-us_image_0000002444585646.png" title="Click to enlarge" class="imgResize"></span> next to the search box.</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="lts_04_1053.html">Log Management</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |