forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: zhengxiu <zhengxiu@huawei.com> Co-committed-by: zhengxiu <zhengxiu@huawei.com>
108 lines
18 KiB
HTML
108 lines
18 KiB
HTML
<a name="css_01_0508"></a><a name="css_01_0508"></a>
|
|
|
|
|
|
<h1 class="topictitle1">Querying and Managing OpenSearch Cluster Logs</h1>
|
|
|
|
<div id="body0000001955726570"><p id="css_01_0508__css_01_0077_p94471228152613">CSS supports log backup and search, so users can analyze logs to locate issues.</p>
|
|
<p id="css_01_0508__css_01_0077_p372793492615">You can have cluster logs periodically backed up to OBS buckets and download log files from OBS later.</p>
|
|
<p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p8060118"></p>
|
|
<div class="section" id="css_01_0508__css_01_0077_section2080164161016"><h4 class="sectiontitle">Querying Logs</h4><ol id="css_01_0508__css_01_0077_ol17801183819125"><li id="css_01_0508__css_01_0077_li151471041111210">Log in to the <span id="css_01_0508__css_01_0077_text1602090685111615">CSS</span> management console.</li><li id="css_01_0508__css_01_0077_li1614744120121">Choose <strong id="css_01_0508__css_01_0077_b883211615560">Clusters</strong> in the navigation pane. On the <span class="wintitle" id="css_01_0508__css_01_0077_wintitle178321116195618"><b>Clusters</b></span> page, click the cluster whose logs you want to query. The cluster information page is displayed.</li><li id="css_01_0508__css_01_0077_li1914710418125">In the navigation pane on the left, choose <span class="uicontrol" id="css_01_0508__css_01_0077_uicontrol3147341201215"><b>Log Management</b></span>.</li><li id="css_01_0508__css_01_0077_li1586342193712">Query logs on the log management page.</li><li id="css_01_0508__css_01_0077_li11162103418130">Select the node, log type, and log level you want to query, and then click <span><img id="css_01_0508__css_01_0077_image169102401216" src="en-us_image_0000001938377972.png"></span>. The query result is displayed.<p id="css_01_0508__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_0508__css_01_0077_en-us_topic_0000001223434432_section3460103108"><h4 class="sectiontitle">Backing Up Logs</h4><p id="css_01_0508__css_01_0077_p13414184011331">CSS cluster logs can be periodically backed up to specified OBS buckets.</p>
|
|
<ol id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_ol17582191371010"><li id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li1142971461017">Log in to the <span id="css_01_0508__css_01_0077_text553166302111615">CSS</span> management console.</li><li id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li174291147108">Choose <strong id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_b137682194518">Clusters</strong> in the navigation pane. On the <span class="wintitle" id="css_01_0508__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_0508__css_01_0077_en-us_topic_0000001223434432_li193846159103">Click the <strong id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_b17447101301">Logs</strong> tab and toggle on the <strong id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_b3744181018302">Log Management</strong> switch.</li><li id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li51851453313">In the <strong id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_b632317184">Edit Log Backup Configuration</strong> dialog box, set the parameters.<p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p95434531512">In the displayed dialog box, <strong id="css_01_0508__css_01_0077_b93841152124715">OBS Bucket</strong> and <strong id="css_01_0508__css_01_0077_b18385175224718">IAM Agency</strong> are automatically created for log backup. You can change the default values by referring to <a href="#css_01_0508__css_01_0077_en-us_topic_0000001223434432_table109611127114919">Table 1</a>.</p>
|
|
<p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p5287124194413">If <strong id="css_01_0508__css_01_0077_b840663984110">Log Backup</strong> has been enabled for the cluster, you can click the Edit icon on the right of <strong id="css_01_0508__css_01_0077_b4407203911416">Log Backup Configuration</strong> and modify the configuration in the displayed <strong id="css_01_0508__css_01_0077_b1840723994114">Edit Log Backup Configuration</strong> dialog box. For details, see <a href="#css_01_0508__css_01_0077_en-us_topic_0000001223434432_table109611127114919">Table 1</a>.</p>
|
|
|
|
<div class="tablenoborder"><a name="css_01_0508__css_01_0077_en-us_topic_0000001223434432_table109611127114919"></a><a name="css_01_0077_en-us_topic_0000001223434432_table109611127114919"></a><table cellpadding="4" cellspacing="0" summary="" id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_table109611127114919" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Configuring log backup</caption><thead align="left"><tr id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_row595810278493"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.4.4.2.4.1.1"><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p695812714916">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="27.98%" id="mcps1.3.5.3.4.4.2.4.1.2"><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p1395852774918">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.019999999999996%" id="mcps1.3.5.3.4.4.2.4.1.3"><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p495862734918">Remarks</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_row296002719498"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.4.4.2.4.1.1 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p89581827124914"><span class="parmname" id="css_01_0508__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.5.3.4.4.2.4.1.2 "><p id="css_01_0508__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_0508__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.5.3.4.4.2.4.1.3 "><p id="css_01_0508__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_0508__css_01_0077_en-us_topic_0000001223434432_note381923793019"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_en-us_topic_0000001223754348_p12463145632710">To grant an IAM user access to an OBS bucket, you need to grant the <strong id="css_01_0508__css_01_0077_b949933418426">GetBucketStoragePolicy</strong>, <strong id="css_01_0508__css_01_0077_b1349963411424">GetBucketLocation</strong>, <strong id="css_01_0508__css_01_0077_b24991734124216">ListBucket</strong>, and <strong id="css_01_0508__css_01_0077_b174991134104218">ListAllMyBuckets</strong> permissions to the user.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_row129610425594"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.4.4.2.4.1.1 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p1329944225912"><span class="parmname" id="css_01_0508__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.5.3.4.4.2.4.1.2 "><p id="css_01_0508__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.5.3.4.4.2.4.1.3 "><div class="p" id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p19607361515">The backup path cannot:<ul id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_ul16496085211"><li id="css_01_0508__css_01_0077_li11916318614">Contain the following characters: \:*?"<>|'{}</li><li id="css_01_0508__css_01_0077_li61019311466">Start with a slash (/).</li><li id="css_01_0508__css_01_0077_li81114310617">Start or end with a period (.).</li><li id="css_01_0508__css_01_0077_li13121131961">Contain more than two consecutive slashes (/) or periods (.).</li><li id="css_01_0508__css_01_0077_li01323115619">Exceed 512 characters.</li></ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_row1996112794910"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.4.4.2.4.1.1 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p3960172744913"><span class="parmname" id="css_01_0508__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.5.3.4.4.2.4.1.2 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p199601727134910">IAM agency authorized by the current account for <span id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_text18960152712494">CSS</span> to access or maintain data stored in OBS buckets.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.019999999999996%" headers="mcps1.3.5.3.4.4.2.4.1.3 "><div class="p" id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p15960122764916">The IAM agency must meet the following requirements:<ul id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_ul29611827194917"><li id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li1896011275492"><span class="parmname" id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_parmname162301941152714"><b>Agency Type</b></span> must be <span class="parmvalue" id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_parmvalue123664113271"><b>Cloud service</b></span>.</li><li id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li696032784920">Set <strong id="css_01_0508__css_01_0077_b17282354184811">Cloud Service</strong> to <strong id="css_01_0508__css_01_0077_b18283185410484">CSS</strong>.</li><li id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li1068227172516">Mandatory policies: <span class="parmname" id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_parmname186797344268"><b>Tenant Administrator</b></span></li><li id="css_01_0508__css_01_0077_li205631030144912">If no agency is available, contact the CSS administrator to create one. For details, see <a href="https://docs.otc.t-systems.com/en-us/usermanual/iam/en-us_topic_0046613147.html" target="_blank" rel="noopener noreferrer">Creating an Agency (by a Delegating Party)</a>.</li></ul>
|
|
</div>
|
|
<div class="note" id="css_01_0508__css_01_0077_note471411126378"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="css_01_0508__css_01_0077_p671411121377">The agency name can contain only letters (case-sensitive), digits, underscores (_), and hyphens (-). Otherwise, the backup will fail.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li98491420132518">Back up logs.<ul id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_ul91221854141616"><li id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li10122205417169">Automatically backing up logs<p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p2044412216265"><a name="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li10122205417169"></a><a name="css_01_0077_en-us_topic_0000001223434432_li10122205417169"></a>Click the icon on the right of <span class="parmname" id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_parmname79609170530"><b>Auto Backup</b></span> to enable the auto backup function.</p>
|
|
<p id="css_01_0508__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_0508__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_0508__css_01_0077_en-us_topic_0000001223434432_p350291411528">After the <strong id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_b4501639124412">Automatic Snapshot Creation</strong> function is enabled, you can click the Edit icon on the right of the parameter to change the backup start time.</p>
|
|
</li><li id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li08181026122616">Manually backing up logs<p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p158454714287"><a name="css_01_0508__css_01_0077_en-us_topic_0000001223434432_li08181026122616"></a><a name="css_01_0077_en-us_topic_0000001223434432_li08181026122616"></a>On the <strong id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_b45486296411">Log Backup</strong> tab page, click <strong id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_b138724501035">Back Up</strong>. In the displayed dialog box, click <span class="uicontrol" id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_uicontrol856611561879"><b>Yes</b></span> to start backup.</p>
|
|
<p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p218113822620">If <strong id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_b1618119568920">Task Status</strong> in the log backup list is <strong id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_b840532321317">Successful</strong>, the backup is successful.</p>
|
|
</li></ul>
|
|
</li><li id="css_01_0508__css_01_0077_li14995221780">View log files.<p id="css_01_0508__css_01_0077_p101539329170"><a name="css_01_0508__css_01_0077_li14995221780"></a><a name="css_01_0077_li14995221780"></a>After logs are successfully backed up, you can click OBS Buckets to go to the bucket list, and find the bucket that stores the log files to view log files.</p>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_section17987164312211"><h4 class="sectiontitle">Log Files</h4><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p203148602313">Deprecation logs, run logs, index slow logs, and search slow logs are backed up for Elasticsearch and OpenSearch clusters.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_table19918142319532" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Log file types</caption><thead align="left"><tr id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_row109195233532"><th align="left" class="cellrowborder" valign="top" width="37.24%" id="mcps1.3.6.3.2.3.1.1"><p id="css_01_0508__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.6.3.2.3.1.2"><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p152094351566">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_row29191423115317"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.6.3.2.3.1.1 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p168311846155616">clustername_deprecation.log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.6.3.2.3.1.2 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p183164616564">Deprecation log</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_row6920142315533"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.6.3.2.3.1.1 "><p id="css_01_0508__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.6.3.2.3.1.2 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p68314469569">Search slow log</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_row69201232537"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.6.3.2.3.1.1 "><p id="css_01_0508__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.6.3.2.3.1.2 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p18831134695612">Index slow log</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_row209208238530"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.6.3.2.3.1.1 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p138311946195614">clustername.log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.6.3.2.3.1.2 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p6831846135618">Elasticsearch run log</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_row3546155355912"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.6.3.2.3.1.1 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p1547205318595">clustername_access.log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.6.3.2.3.1.2 "><p id="css_01_0508__css_01_0077_en-us_topic_0000001223434432_p854725315913">Access log</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0504.html">OpenSearch Cluster Monitoring and Log Management</a></div>
|
|
</div>
|
|
</div>
|
|
|