doc-exports/docs/css/umn/css_01_0077.html
Wuwan, Qi 050b395397 CSS UMN 23.2.1 20230926
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-committed-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
2024-01-10 14:23:15 +00:00

110 lines
17 KiB
HTML

<a name="css_01_0077"></a><a name="css_01_0077"></a>
<h1 class="topictitle1">Managing Logs</h1>
<div id="body1568972990101"><p id="css_01_0077__en-us_topic_0000001223434432_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__section2080164161016"><h4 class="sectiontitle">Log Query</h4><ol id="css_01_0077__ol17801183819125"><li id="css_01_0077__li151471041111210">Log in to the <span id="css_01_0077__text13147104120129">CSS</span> management console.</li><li id="css_01_0077__li1614744120121">Choose <strong id="css_01_0077__b883211615560">Clusters</strong> in the navigation pane. On the <span class="wintitle" id="css_01_0077__wintitle178321116195618"><b>Clusters</b></span> page, click the name of the target cluster. The cluster information page is displayed.</li><li id="css_01_0077__li1914710418125">In the navigation pane on the left, choose <span class="uicontrol" id="css_01_0077__uicontrol3147341201215"><b>Log Management</b></span>.</li><li id="css_01_0077__li11162103418130">Query logs on the log management page.<p id="css_01_0077__p19614133519134"><a name="css_01_0077__li11162103418130"></a><a name="li11162103418130"></a>Select the node, log type, and log level you want to query, and then click <span><img id="css_01_0077__image169102401216" src="en-us_image_0000001714921993.png"></span>. The query result is displayed.</p>
<p id="css_01_0077__p291122431216">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__en-us_topic_0000001223434432_section3460103108"><h4 class="sectiontitle">Enabling Log Backup</h4><ol id="css_01_0077__en-us_topic_0000001223434432_ol17582191371010"><li id="css_01_0077__en-us_topic_0000001223434432_li1142971461017">Log in to the <span id="css_01_0077__en-us_topic_0000001223434432_text7429314121020">CSS</span> management console.</li><li id="css_01_0077__en-us_topic_0000001223434432_li174291147108">Choose <strong id="css_01_0077__en-us_topic_0000001223434432_b137682194518">Clusters</strong> in the navigation pane. On the <span class="wintitle" id="css_01_0077__en-us_topic_0000001223434432_wintitle8360185213588"><b>Clusters</b></span> page, click the name of the target cluster. The cluster information page is displayed.</li><li id="css_01_0077__en-us_topic_0000001223434432_li193846159103">Click the <strong id="css_01_0077__en-us_topic_0000001223434432_b17447101301">Logs</strong> tab and toggle on the <strong id="css_01_0077__en-us_topic_0000001223434432_b3744181018302">Log Management</strong> switch.</li><li id="css_01_0077__en-us_topic_0000001223434432_li51851453313">In the <strong id="css_01_0077__en-us_topic_0000001223434432_b632317184">Edit Log Backup Configuration</strong> dialog box, set the parameters.<p id="css_01_0077__en-us_topic_0000001223434432_p95434531512">In the displayed dialog box, <strong id="css_01_0077__b93841152124715">OBS Bucket</strong> and <strong id="css_01_0077__b18385175224718">IAM Agency</strong> are automatically created for log backup. You can change the default value by referring to <a href="#css_01_0077__en-us_topic_0000001223434432_table109611127114919">Table 1</a>.</p>
<p id="css_01_0077__en-us_topic_0000001223434432_p5287124194413">If the <strong id="css_01_0077__b5294103817267">Log Management</strong> function has been enabled for the cluster, you can click <span><img id="css_01_0077__image52941938152611" src="en-us_image_0000001666842674.png"></span> on the right of <strong id="css_01_0077__b9294163819261">Log Backup Configuration</strong> and modify the configuration in the displayed <strong id="css_01_0077__b9295133811264">Edit Log Backup Configuration</strong> dialog box. For details, see <a href="#css_01_0077__en-us_topic_0000001223434432_table109611127114919">Table 1</a>.</p>
<div class="tablenoborder"><a name="css_01_0077__en-us_topic_0000001223434432_table109611127114919"></a><a name="en-us_topic_0000001223434432_table109611127114919"></a><table cellpadding="4" cellspacing="0" summary="" id="css_01_0077__en-us_topic_0000001223434432_table109611127114919" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for configuring log backup</caption><thead align="left"><tr id="css_01_0077__en-us_topic_0000001223434432_row595810278493"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.4.4.2.4.1.1"><p id="css_01_0077__en-us_topic_0000001223434432_p695812714916">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.98%" id="mcps1.3.3.2.4.4.2.4.1.2"><p id="css_01_0077__en-us_topic_0000001223434432_p1395852774918">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="52.019999999999996%" id="mcps1.3.3.2.4.4.2.4.1.3"><p id="css_01_0077__en-us_topic_0000001223434432_p495862734918">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="css_01_0077__en-us_topic_0000001223434432_row296002719498"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.4.2.4.1.1 "><p id="css_01_0077__en-us_topic_0000001223434432_p89581827124914"><span class="parmname" id="css_01_0077__en-us_topic_0000001223434432_parmname1495882754917"><b>OBS Bucket</b></span></p>
</td>
<td class="cellrowborder" valign="top" width="27.98%" headers="mcps1.3.3.2.4.4.2.4.1.2 "><p id="css_01_0077__en-us_topic_0000001223434432_p795832712491">Select an OBS bucket from the drop-down list for storing logs. You can also click <strong id="css_01_0077__en-us_topic_0000001223434432_b11152132918254">Create Bucket</strong> on the right to create an OBS bucket.</p>
</td>
<td class="cellrowborder" valign="top" width="52.019999999999996%" headers="mcps1.3.3.2.4.4.2.4.1.3 "><p id="css_01_0077__en-us_topic_0000001223434432_p169581927104917">The OBS bucket and the cluster must be in the same region.</p>
<div class="note" id="css_01_0077__en-us_topic_0000001223434432_note381923793019"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="css_01_0077__en-us_topic_0000001223434432_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__en-us_topic_0000001223434432_row129610425594"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.4.2.4.1.1 "><p id="css_01_0077__en-us_topic_0000001223434432_p1329944225912"><span class="parmname" id="css_01_0077__en-us_topic_0000001223434432_parmname1040885715596"><b>Backup Path</b></span></p>
</td>
<td class="cellrowborder" valign="top" width="27.98%" headers="mcps1.3.3.2.4.4.2.4.1.2 "><p id="css_01_0077__en-us_topic_0000001223434432_p729913427593">Storage path of logs in the OBS bucket</p>
</td>
<td class="cellrowborder" valign="top" width="52.019999999999996%" headers="mcps1.3.3.2.4.4.2.4.1.3 "><div class="p" id="css_01_0077__en-us_topic_0000001223434432_p19607361515">The backup path configuration rules are as follows:<ul id="css_01_0077__en-us_topic_0000001223434432_ul16496085211"><li id="css_01_0077__en-us_topic_0000001223434432_li194961681424">The backup path cannot contain the following characters: \:*?"&lt;&gt;|</li><li id="css_01_0077__en-us_topic_0000001223434432_li1889111518220">The backup path cannot start with a slash (/).</li><li id="css_01_0077__en-us_topic_0000001223434432_li51025319215">The backup path cannot start or end with a period (.).</li><li id="css_01_0077__en-us_topic_0000001223434432_li54301835428">The total length of the backup path cannot exceed 1,023 characters.</li></ul>
</div>
</td>
</tr>
<tr id="css_01_0077__en-us_topic_0000001223434432_row1996112794910"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.4.2.4.1.1 "><p id="css_01_0077__en-us_topic_0000001223434432_p3960172744913"><span class="parmname" id="css_01_0077__en-us_topic_0000001223434432_parmname209609278492"><b>IAM Agency</b></span></p>
</td>
<td class="cellrowborder" valign="top" width="27.98%" headers="mcps1.3.3.2.4.4.2.4.1.2 "><p id="css_01_0077__en-us_topic_0000001223434432_p199601727134910">IAM agency authorized by the current account for <span id="css_01_0077__en-us_topic_0000001223434432_text18960152712494">CSS</span> to access or maintain data stored in the OBS bucket. You can also click <strong id="css_01_0077__en-us_topic_0000001223434432_b1639122110279">Create IAM Agency</strong> on the right to create an IAM agency.</p>
</td>
<td class="cellrowborder" valign="top" width="52.019999999999996%" headers="mcps1.3.3.2.4.4.2.4.1.3 "><p id="css_01_0077__en-us_topic_0000001223434432_p15960122764916">The IAM agency must meet the following requirements:</p>
<ul id="css_01_0077__en-us_topic_0000001223434432_ul29611827194917"><li id="css_01_0077__en-us_topic_0000001223434432_li1896011275492"><span class="parmname" id="css_01_0077__en-us_topic_0000001223434432_parmname162301941152714"><b>Agency Type</b></span> must be <span class="parmvalue" id="css_01_0077__en-us_topic_0000001223434432_parmvalue123664113271"><b>Cloud service</b></span>.</li><li id="css_01_0077__en-us_topic_0000001223434432_li696032784920">Set <strong id="css_01_0077__b17282354184811">Cloud Service</strong> to <strong id="css_01_0077__b18283185410484">CSS</strong>.</li><li id="css_01_0077__en-us_topic_0000001223434432_li1068227172516">Mandatory policies: <span class="parmname" id="css_01_0077__en-us_topic_0000001223434432_parmname186797344268"><b>Tenant Administrator</b></span></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="css_01_0077__en-us_topic_0000001223434432_li98491420132518">Back up logs.<ul id="css_01_0077__en-us_topic_0000001223434432_ul91221854141616"><li id="css_01_0077__en-us_topic_0000001223434432_li10122205417169">Automatically backing up logs<p id="css_01_0077__en-us_topic_0000001223434432_p2044412216265"><a name="css_01_0077__en-us_topic_0000001223434432_li10122205417169"></a><a name="en-us_topic_0000001223434432_li10122205417169"></a>Click the icon on the right of <span class="parmname" id="css_01_0077__en-us_topic_0000001223434432_parmname79609170530"><b>Auto Backup</b></span> to enable the auto backup function.</p>
<p id="css_01_0077__en-us_topic_0000001223434432_p1372917352620">After the automatic backup function is enabled, set the backup start time in the <strong id="css_01_0077__en-us_topic_0000001223434432_b12645161514561">Configure Auto Backup</strong> dialog box. When the scheduled time arrives, the system will back up logs automatically.</p>
<p id="css_01_0077__en-us_topic_0000001223434432_p350291411528">After the <strong id="css_01_0077__en-us_topic_0000001223434432_b4501639124412">Automatic Snapshot Creation</strong> function is enabled, you can click <span><img id="css_01_0077__en-us_topic_0000001223434432_image88691014145210" src="en-us_image_0000001667002374.png"></span> on the right of the parameter to change the backup start time.</p>
</li><li id="css_01_0077__en-us_topic_0000001223434432_li08181026122616">Manually backing up logs<p id="css_01_0077__en-us_topic_0000001223434432_p158454714287"><a name="css_01_0077__en-us_topic_0000001223434432_li08181026122616"></a><a name="en-us_topic_0000001223434432_li08181026122616"></a>On the <strong id="css_01_0077__en-us_topic_0000001223434432_b45486296411">Log Backup</strong> tab page, click <strong id="css_01_0077__en-us_topic_0000001223434432_b138724501035">Back Up</strong>. On the displayed page, click <span class="uicontrol" id="css_01_0077__en-us_topic_0000001223434432_uicontrol856611561879"><b>Yes</b></span> to start backup.</p>
<p id="css_01_0077__en-us_topic_0000001223434432_p218113822620">If <strong id="css_01_0077__en-us_topic_0000001223434432_b1618119568920">Task Status</strong> in the log backup list is <strong id="css_01_0077__en-us_topic_0000001223434432_b840532321317">Successful</strong>, the backup is successful.</p>
<div class="note" id="css_01_0077__en-us_topic_0000001223434432_note13497430133916"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="css_01_0077__en-us_topic_0000001223434432_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__en-us_topic_0000001223434432_li74758710224">Search for logs.<p id="css_01_0077__en-us_topic_0000001223434432_p594025005113"><a name="css_01_0077__en-us_topic_0000001223434432_li74758710224"></a><a name="en-us_topic_0000001223434432_li74758710224"></a>On the <strong id="css_01_0077__en-us_topic_0000001223434432_b8786450104110">Log Search</strong> page, select the target node, log type, and log level, and click <span><img id="css_01_0077__en-us_topic_0000001223434432_image199740573294" src="en-us_image_0000001667002402.png"></span>. The search results are displayed.</p>
<p id="css_01_0077__en-us_topic_0000001223434432_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__en-us_topic_0000001223434432_section17987164312211"><h4 class="sectiontitle">Viewing Logs</h4><p id="css_01_0077__en-us_topic_0000001223434432_p4740053122219">After backing up logs, you can click <strong id="css_01_0077__en-us_topic_0000001223434432_b178781626474">Backup Path</strong> to go to the OBS console and view the logs.</p>
<p id="css_01_0077__en-us_topic_0000001223434432_p203148602313">Backed up logs mainly include deprecation logs, run logs, index slow logs, and search slow logs. <a href="#css_01_0077__en-us_topic_0000001223434432_table19918142319532">Table 2</a> lists the storage types of the OBS bucket.</p>
<div class="tablenoborder"><a name="css_01_0077__en-us_topic_0000001223434432_table19918142319532"></a><a name="en-us_topic_0000001223434432_table19918142319532"></a><table cellpadding="4" cellspacing="0" summary="" id="css_01_0077__en-us_topic_0000001223434432_table19918142319532" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Log types</caption><thead align="left"><tr id="css_01_0077__en-us_topic_0000001223434432_row109195233532"><th align="left" class="cellrowborder" valign="top" width="37.24%" id="mcps1.3.4.4.2.3.1.1"><p id="css_01_0077__en-us_topic_0000001223434432_p7209435135613">Log Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.760000000000005%" id="mcps1.3.4.4.2.3.1.2"><p id="css_01_0077__en-us_topic_0000001223434432_p152094351566">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_01_0077__en-us_topic_0000001223434432_row29191423115317"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.4.4.2.3.1.1 "><p id="css_01_0077__en-us_topic_0000001223434432_p168311846155616">clustername_deprecation.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.4.4.2.3.1.2 "><p id="css_01_0077__en-us_topic_0000001223434432_p183164616564">Deprecation log</p>
</td>
</tr>
<tr id="css_01_0077__en-us_topic_0000001223434432_row6920142315533"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.4.4.2.3.1.1 "><p id="css_01_0077__en-us_topic_0000001223434432_p1783164610566">clustername_index_indexing_slowlog.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.4.4.2.3.1.2 "><p id="css_01_0077__en-us_topic_0000001223434432_p68314469569">Search slow log</p>
</td>
</tr>
<tr id="css_01_0077__en-us_topic_0000001223434432_row69201232537"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.4.4.2.3.1.1 "><p id="css_01_0077__en-us_topic_0000001223434432_p1583111468561">clustername_index_search_slowlog.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.4.4.2.3.1.2 "><p id="css_01_0077__en-us_topic_0000001223434432_p18831134695612">Index slow log</p>
</td>
</tr>
<tr id="css_01_0077__en-us_topic_0000001223434432_row209208238530"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.4.4.2.3.1.1 "><p id="css_01_0077__en-us_topic_0000001223434432_p138311946195614">clustername.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.4.4.2.3.1.2 "><p id="css_01_0077__en-us_topic_0000001223434432_p6831846135618">Elasticsearch run log</p>
</td>
</tr>
<tr id="css_01_0077__en-us_topic_0000001223434432_row3546155355912"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.4.4.2.3.1.1 "><p id="css_01_0077__en-us_topic_0000001223434432_p1547205318595">clustername_access.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.4.4.2.3.1.2 "><p id="css_01_0077__en-us_topic_0000001223434432_p854725315913">Access log</p>
</td>
</tr>
<tr id="css_01_0077__en-us_topic_0000001223434432_row17634165625916"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.4.4.2.3.1.1 "><p id="css_01_0077__en-us_topic_0000001223434432_p14634556115912">clustername_audit.log</p>
</td>
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.4.4.2.3.1.2 "><p id="css_01_0077__en-us_topic_0000001223434432_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_0207.html">Elasticsearch</a></div>
</div>
</div>