doc-exports/docs/css/umn/css_01_0077.html
Zheng, Xiu 0c90df93b1 CSS UMN 20230404 Version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com>
Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
2023-04-05 08:45:09 +00:00

99 lines
12 KiB
HTML

<a name="css_01_0077"></a><a name="css_01_0077"></a>
<h1 class="topictitle1">Managing Logs</h1>
<div id="body0000001334619305"><p id="css_01_0077__p8060118">CSS provides log backup and search functions to help you locate faults. You can back up cluster logs to OBS buckets and download required log files to analyze and locate faults.</p>
<div class="section" id="css_01_0077__section3460103108"><h4 class="sectiontitle">Enabling Log Management</h4><ol id="css_01_0077__ol17582191371010"><li id="css_01_0077__li1142971461017">Log in to the <span id="css_01_0077__text208055615149">CSS</span> management console.</li><li id="css_01_0077__li174291147108">On the <span class="wintitle" id="css_01_0077__wintitle8360185213588"><b>Clusters</b></span> page, click the name of the cluster whose logs you want to back up. The <strong id="css_01_0077__b1367251018">Basic Information</strong> page is displayed.</li><li id="css_01_0077__li193846159103">Click the <strong id="css_01_0077__b2144835102913">Logs</strong> tab and enable <strong id="css_01_0077__b1980234311305">Log Management</strong>.<p id="css_01_0077__p2678171913911"><span><img id="css_01_0077__image1967812191691" src="en-us_image_0000001554897317.png"></span> indicates that the log management function is disabled. <span><img id="css_01_0077__image8410195516444" src="en-us_image_0000001554777377.png"></span> indicates that it is enabled.</p>
</li><li id="css_01_0077__li51851453313">Enable the <strong id="css_01_0077__b950811661914">Log Management</strong> function. In the <strong id="css_01_0077__b632317184">Edit Log Backup Configuration</strong> dialog box, set the parameters.<p id="css_01_0077__p95434531512">In the displayed dialog box, <strong id="css_01_0077__b15941312014">OBS Bucket</strong>, <strong id="css_01_0077__b0228191212015">Backup Path</strong>, and <strong id="css_01_0077__b21966174205">IAM Agency</strong> are automatically created for log backup. You can modify the default value by referring to <a href="#css_01_0077__table109611127114919">Table 1</a>.</p>
<div class="tablenoborder"><a name="css_01_0077__table109611127114919"></a><a name="table109611127114919"></a><table cellpadding="4" cellspacing="0" summary="" id="css_01_0077__table109611127114919" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="css_01_0077__row595810278493"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.4.4.2.4.1.1"><p id="css_01_0077__p695812714916">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.98%" id="mcps1.3.2.2.4.4.2.4.1.2"><p id="css_01_0077__p1395852774918">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="52.019999999999996%" id="mcps1.3.2.2.4.4.2.4.1.3"><p id="css_01_0077__p495862734918">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="css_01_0077__row296002719498"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.4.2.4.1.1 "><p id="css_01_0077__p89581827124914"><span class="parmname" id="css_01_0077__parmname1495882754917"><b>OBS Bucket</b></span></p>
</td>
<td class="cellrowborder" valign="top" width="27.98%" headers="mcps1.3.2.2.4.4.2.4.1.2 "><p id="css_01_0077__p795832712491">Select an OBS bucket from the drop-down list for storing logs. You can also click <strong id="css_01_0077__b11152132918254">Create Bucket</strong> on the right to create a new OBS bucket.</p>
</td>
<td class="cellrowborder" valign="top" width="52.019999999999996%" headers="mcps1.3.2.2.4.4.2.4.1.3 "><p id="css_01_0077__p169581927104917">The OBS bucket and the cluster must be in the same region.</p>
<div class="note" id="css_01_0077__note381923793019"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="css_01_0077__en-us_topic_0000001223754348_p12463145632710">To let an IAM user access an OBS bucket, you need to grant the GetBucketStoragePolicy, GetBucketLocation, ListBucket, and ListAllMyBuckets permissions to the user.</p>
</div></div>
</td>
</tr>
<tr id="css_01_0077__row1996112794910"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.4.2.4.1.1 "><p id="css_01_0077__p3960172744913"><span class="parmname" id="css_01_0077__parmname209609278492"><b>IAM Agency</b></span></p>
</td>
<td class="cellrowborder" valign="top" width="27.98%" headers="mcps1.3.2.2.4.4.2.4.1.2 "><p id="css_01_0077__p199601727134910">IAM agency authorized by the current account for <span id="css_01_0077__text54451146182616">CSS</span> to access or maintain data stored in the OBS bucket. You can also click <strong id="css_01_0077__b1639122110279">Create IAM Agency</strong> on the right to create a new IAM agency.</p>
</td>
<td class="cellrowborder" valign="top" width="52.019999999999996%" headers="mcps1.3.2.2.4.4.2.4.1.3 "><p id="css_01_0077__p15960122764916">The IAM agency must meet the following requirements:</p>
<ul id="css_01_0077__ul29611827194917"><li id="css_01_0077__li1896011275492"><span class="parmname" id="css_01_0077__parmname162301941152714"><b>Agency Type</b></span> must be <span class="parmvalue" id="css_01_0077__parmvalue123664113271"><b>Cloud service</b></span>.</li><li id="css_01_0077__li696032784920">Set <strong id="css_01_0077__b7828103115183">Cloud Service</strong> to <strong id="css_01_0077__b18829153171813">CSS</strong>.</li><li id="css_01_0077__li1068227172516">Mandatory policies: <span class="parmname" id="css_01_0077__parmname186797344268"><b>Tenant Administrator</b></span></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="css_01_0077__li196572027145716">(Optional) If the <strong id="css_01_0077__b1369342514332">Log Management</strong> function has been enabled for the cluster, you can modify the log backup parameters.<p id="css_01_0077__p1227972805710">Click <span><img id="css_01_0077__image1727110018566" src="en-us_image_0000001503657752.png"></span> on the right of <span class="parmname" id="css_01_0077__parmname027115045612"><b>Log Backup Configuration</b></span>. The <strong id="css_01_0077__b382312516334">Edit Log Backup Configuration</strong> dialog box is displayed. You can modify the log backup parameters.</p>
</li><li id="css_01_0077__li98491420132518">Back up logs.<ul id="css_01_0077__ul91221854141616"><li id="css_01_0077__li10122205417169">Automatically backing up logs<p id="css_01_0077__p2044412216265"><a name="css_01_0077__li10122205417169"></a><a name="li10122205417169"></a>Click the icon on the right of <span class="parmname" id="css_01_0077__parmname79609170530"><b>Auto Backup</b></span> to enable the auto backup function.</p>
<p id="css_01_0077__p17014512439"><span><img id="css_01_0077__image11999195014317" src="en-us_image_0000001554777385.png"></span> indicates that the auto backup function is enabled, and <span><img id="css_01_0077__image19958175044319" src="en-us_image_0000001554897317.png"></span> indicates that it is disabled.</p>
<p id="css_01_0077__p1372917352620">After the automatic backup function is enabled, set the backup start time in the <strong id="css_01_0077__b12645161514561">Modify Log Backup Policy</strong> dialog box. When the scheduled time arrives, the system will back up logs automatically. Click <span><img id="css_01_0077__image1702444111517" src="en-us_image_0000001554577405.png"></span> on the right of the switch to change <span class="parmname" id="css_01_0077__parmname18195113613169"><b>Backup Start Time</b></span>.</p>
</li><li id="css_01_0077__li08181026122616">Manually backing up logs<p id="css_01_0077__p158454714287"><a name="css_01_0077__li08181026122616"></a><a name="li08181026122616"></a>On the <strong id="css_01_0077__b45486296411">Log Backup</strong> tab page, click <strong id="css_01_0077__b138724501035">Back Up</strong>. On the displayed page, click <span class="uicontrol" id="css_01_0077__uicontrol856611561879"><b>Yes</b></span> to start backup.</p>
<p id="css_01_0077__p218113822620">If <strong id="css_01_0077__b1618119568920">Task Status</strong> in the log backup list is <strong id="css_01_0077__b840532321317">Successful</strong>, the backup is successful.</p>
<div class="note" id="css_01_0077__note13497430133916"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="css_01_0077__p19497143018398">All logs in the cluster are copied to a specified OBS path. You can view or download log files from the path of the OBS bucket.</p>
</div></div>
</li></ul>
</li><li id="css_01_0077__li74758710224">Search for logs.<p id="css_01_0077__p594025005113"><a name="css_01_0077__li74758710224"></a><a name="li74758710224"></a>On the <strong id="css_01_0077__b8786450104110">Log Search</strong> page, select the desired node, log type, and log level, and click <span><img id="css_01_0077__image878610507412" src="en-us_image_0000001554577409.png"></span>. The search results are displayed.</p>
<p id="css_01_0077__p13365112615198">When you search for logs, the latest 10,000 logs are matched. A maximum of 100 logs are displayed.</p>
</li></ol>
</div>
<div class="section" id="css_01_0077__section17987164312211"><h4 class="sectiontitle">Viewing Logs</h4><p id="css_01_0077__p4740053122219">After backing up logs, you can click <strong id="css_01_0077__b148034300206">Backup Path</strong> to go to the OBS console and view the logs.</p>
<p id="css_01_0077__p203148602313">Backed up logs mainly include deprecation logs, run logs, index slow logs, and search slow logs. <a href="#css_01_0077__table19918142319532">Table 2</a> lists the storage types of the OBS bucket.</p>
<div class="tablenoborder"><a name="css_01_0077__table19918142319532"></a><a name="table19918142319532"></a><table cellpadding="4" cellspacing="0" summary="" id="css_01_0077__table19918142319532" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Log types</caption><thead align="left"><tr id="css_01_0077__row109195233532"><th align="left" class="cellrowborder" valign="top" width="37.24%" id="mcps1.3.3.4.2.3.1.1"><p id="css_01_0077__p7209435135613">Log Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.760000000000005%" id="mcps1.3.3.4.2.3.1.2"><p id="css_01_0077__p152094351566">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_01_0077__row29191423115317"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.3.4.2.3.1.1 "><p id="css_01_0077__p168311846155616">clustername_deprecation.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.3.4.2.3.1.2 "><p id="css_01_0077__p183164616564">Deprecation log</p>
</td>
</tr>
<tr id="css_01_0077__row6920142315533"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.3.4.2.3.1.1 "><p id="css_01_0077__p1783164610566">clustername_index_indexing_slowlog.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.3.4.2.3.1.2 "><p id="css_01_0077__p68314469569">Search slow log</p>
</td>
</tr>
<tr id="css_01_0077__row69201232537"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.3.4.2.3.1.1 "><p id="css_01_0077__p1583111468561">clustername_index_search_slowlog.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.3.4.2.3.1.2 "><p id="css_01_0077__p18831134695612">Index slow log</p>
</td>
</tr>
<tr id="css_01_0077__row209208238530"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.3.4.2.3.1.1 "><p id="css_01_0077__p138311946195614">clustername.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.3.4.2.3.1.2 "><p id="css_01_0077__p6831846135618">Elasticsearch run log</p>
</td>
</tr>
<tr id="css_01_0077__row3546155355912"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.3.4.2.3.1.1 "><p id="css_01_0077__p1547205318595">clustername_access.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.3.4.2.3.1.2 "><p id="css_01_0077__p854725315913">Access log</p>
</td>
</tr>
<tr id="css_01_0077__row17634165625916"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.3.4.2.3.1.1 "><p id="css_01_0077__p14634556115912">clustername_audit.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.3.4.2.3.1.2 "><p id="css_01_0077__p86341356115915">Audit log</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0009.html">Managing Elasticsearch Clusters</a></div>
</div>
</div>