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>
269 lines
53 KiB
HTML
269 lines
53 KiB
HTML
<a name="EN-US_TOPIC_0000001955726570"></a><a name="EN-US_TOPIC_0000001955726570"></a>
|
|
|
|
<h1 class="topictitle1">Managing OpenSearch Cluster Logs</h1>
|
|
<div id="body0000001955726570"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p18346164212128">CSS provides log query and log backup, enabling you to easily manage and analyze logs to efficiently locate faults, optimize performance, and enhance system security.</p>
|
|
<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ul1760442171712"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li96052271716">Log query: On the log management page of the CSS management console, you can query the latest log records by node, log type, and other criteria, so you can quickly locate or diagnose issues.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li9604132141717">Log backup: Cluster logs are periodically synchronized to OBS buckets. You can download them for in-depth analysis at any time. You can configure custom log backup policies by specifying backup schedules and storage locations. The system backs up all critical logs, including run logs, slow query logs, and deprecation logs. They provide comprehensive data for auditing and troubleshooting purposes.</li></ul>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726570__section1478210053012"><h4 class="sectiontitle">Impact on Billing</h4><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p21411143309">When log backup is enabled, the generated log backups are stored in OBS buckets, which will result in additional costs. For details, see .</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965497077_en-us_topic_0000001268314505_section914018211934"><h4 class="sectiontitle">Prerequisites</h4><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p6109115241420">The OBS bucket used for storing log backups has been created. The OBS bucket must meet the following requirements:</p>
|
|
<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ul12277564230"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li227714619237"><span class="parmname" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_parmname202676597072336"><b>Storage Class</b></span>: <span class="parmvalue" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_parmvalue26104542872336"><b>Standard</b></span> or <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b214133672972336">Warm</strong>.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li52771861237"><span class="parmname" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_parmname12785682315"><b>Region</b></span>: the same as that of the cluster.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_section2080164161016"><h4 class="sectiontitle">Log Search</h4><ol id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ol17801183819125"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li12784145519115"><span id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ph9800646111212">Log in to the CSS management console.</span></li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1078415517116">In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001955726570__uicontrol69343819504"><b>Clusters > OpenSearch</b></span>.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li87855552113">In the cluster list, click the name of the target cluster. The cluster information page is displayed.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li230072718313">Choose <span class="wintitle" id="EN-US_TOPIC_0000001955726570__wintitle92134615513"><b>Logs > Log Search</b></span>. The <strong id="EN-US_TOPIC_0000001955726570__b19319460513">Log Search</strong> page is displayed.<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1881652733115">You can search records by log type, node, log level, or keyword. For a detailed description of each type of logs, see <a href="#EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_section132041636163218">Log Introduction</a>.</p>
|
|
<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1715910122814">When a log file reaches 128 MB or when the time reaches 00:00 UTC, the system automatically compresses and archives it. Only unarchived logs appear on the log search page, while archived logs remain accessible through the log backup function.</p>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000001223434432_section3460103108"><h4 class="sectiontitle">Log Backup</h4><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p172504412112">Cluster logs can be backed up to OBS buckets, where you can download them for in-depth analysis at any time.</p>
|
|
<ol id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000001223434432_ol17582191371010"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000001223434432_li1142971461017"><span id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ph16723143918395">Log in to the CSS management console.</span></li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1575984643913">In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001955726570__uicontrol8399202312521"><b>Clusters > OpenSearch</b></span>.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li274685293915">In the cluster list, click the name of the target cluster. The cluster information page is displayed.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li16271857143910">Choose <span class="wintitle" id="EN-US_TOPIC_0000001955726570__wintitle1044522810524"><b>Logs > Log Backup</b></span>. The <strong id="EN-US_TOPIC_0000001955726570__b124461028135214">Log Backup</strong> page is displayed.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li12942195175420">Enable log backup.<div class="dropdownexpand"><div class="dropdowntitle" onclick="ExpandorCollapseNode(this)"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p172513142813"><a name="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li12942195175420"></a><a name="en-us_topic_0000001965416649_li12942195175420"></a>Perform the following steps to enable log backup. If it is already enabled, skip this step.</p></div>
|
|
<div class="dropdowncontext"><ol type="a" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ol52699512556"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li61171157115412">Click <strong id="EN-US_TOPIC_0000001955726570__b13473143665220">Enable Backup</strong>. In the displayed dialog box, configure necessary settings.
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_table1157417214570" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Log backup settings</caption><thead align="left"><tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row1957482155715"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.3.5.2.1.2.2.3.1.1"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p6574521115710">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.6.3.5.2.1.2.2.3.1.2"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p135741121155711">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row657416216574"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.5.2.1.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p257415213575">OBS Bucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.6.3.5.2.1.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1557432118571">Select an OBS bucket for storing log backups from the drop-down list box.</p>
|
|
<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p2574721185718">If no OBS buckets meet your requirements, click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b62436019972336">Create Bucket</strong> to go to the OBS console and create one. For details, see <a href="https://docs.otc.t-systems.com/en-us/usermanual/obs/en-us_topic_0045853662.html" target="_blank" rel="noopener noreferrer">Creating a Bucket</a>.</p>
|
|
<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p6576721105710">To grant an IAM user access to an OBS bucket, you need to grant the <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b32107755351850">GetBucketStoragePolicy</strong>, <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b204607443551850">GetBucketLocation</strong>, <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b210555951850">ListBucket</strong>, and <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b204339269251850">ListAllMyBuckets</strong> permissions to that user.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row16576192118577"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.5.2.1.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1457642165717">Backup Path</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.6.3.5.2.1.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1357682119574">Set the log storage location in the OBS bucket.</p>
|
|
<div class="p" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p157612135717">The backup path cannot:<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ul8576142114571"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li11576821165711">Contain the following characters: <span class="parmvalue" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_parmvalue29952313012"><b>\:*?"<>|'{}</b></span></li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li19577321155714">Start with a slash (/).</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li957720216579">Start or end with a period (.).</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1057710213571">Contain more than two consecutive slashes (/) or periods (.).</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li105771021105716">Exceed 512 characters.</li></ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row1557782175714"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.5.2.1.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1457717214572">IAM Agency</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.6.3.5.2.1.2.2.3.1.2 "><div class="p" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p8577182145718">To back up data to an OBS bucket, you must have the write permission to it. By configuring an IAM agency, you can authorize CSS to access its OBS resources through an associated account.<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_ul3441205562411"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_li24411155132413">If you are configuring an agency for the first time, click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_b5976258053247">Automatically Create IAM Agency</strong> to create <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_b187458051553247">css-obs-agency</strong>.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_li544195515247">If there is an IAM agency automatically created earlier, you can click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_b99661991253247">One-click authorization</strong> to have the OBS Administrator permissions deleted automatically, and have the following custom policies added automatically instead to implement more refined permissions control.<pre class="screen" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_screen1144145514247">"obs:bucket:GetBucketLocation",
|
|
"obs:object:GetObjectVersion",
|
|
"obs:object:GetObject",
|
|
"obs:object:DeleteObject",
|
|
"obs:bucket:HeadBucket",
|
|
"obs:bucket:GetBucketStoragePolicy",
|
|
"obs:object:DeleteObjectVersion",
|
|
"obs:bucket:ListBucketVersions",
|
|
"obs:bucket:ListBucket",
|
|
"obs:object:PutObject"</pre>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_li1144165516246">When OBS buckets use SSE-KMS encryption, the IAM agency must be granted KMS permissions. You can click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_b29906333953247">Automatically Create IAM Agency</strong> and <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_b25885174953247">One-click authorization</strong> to have the following custom policies created automatically.<pre class="screen" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_screen544117553245">"kms:cmk:create",
|
|
"kms:dek:create",
|
|
"kms:cmk:get",
|
|
"kms:dek:decrypt",
|
|
"kms:cmk:list"</pre>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_li13441155542414">To use <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_b121154083353247">Automatically Create IAM Agency</strong> and <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_b198014404253247">One-click authorization</strong>, the following minimum permissions are required:<pre class="screen" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_screen9442555102417">"iam:agencies:listAgencies",
|
|
"iam:roles:listRoles",
|
|
"iam:agencies:getAgency",
|
|
"iam:agencies:createAgency",
|
|
"iam:permissions:listRolesForAgency",
|
|
"iam:permissions:grantRoleToAgency",
|
|
"iam:permissions:listRolesForAgencyOnProject",
|
|
"iam:permissions:revokeRoleFromAgency",
|
|
"iam:roles:createRole"</pre>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_li84422554243">To use an IAM agency, the following minimum permissions are required:<pre class="screen" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_en-us_topic_0000002287474002_screen1844215558248">"iam:agencies:listAgencies",
|
|
"iam:agencies:getAgency",
|
|
"iam:permissions:listRolesForAgencyOnProject",
|
|
"iam:permissions:listRolesForAgency"</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="warning" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_note158015214574"><span class="warningtitle"> WARNING: </span><div class="warningbody"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p10580202118575">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>
|
|
<div class="p" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p16891145013">Determine whether to enable <strong id="EN-US_TOPIC_0000001955726570__b33412398527">Automatic backup</strong> based on service needs.<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ul599721816516"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li19971818145116">To enable automatic, periodic log backup, select <strong id="EN-US_TOPIC_0000001955726570__b12856114117527">Automatic backup</strong>, and set the backup policy. For more information, see <a href="#EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_table13235122823218">Table 2</a>.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li10997518155117">If manual log backup is sufficient, deselect <strong id="EN-US_TOPIC_0000001955726570__b852875365210">Automatic backup</strong>.</li></ul>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li199118285572">Click <strong id="EN-US_TOPIC_0000001955726570__b281420215539">OK</strong> to enable log backup.<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p58964148717">The configuration information will be displayed on the <strong id="EN-US_TOPIC_0000001955726570__b1634515575312">Log Backup</strong> tab.</p>
|
|
</li></ol></div></div>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1402236692">Back up logs. Two options are available: automatic or manual.<div class="dropdownexpand"><div class="dropdowntitle" onclick="ExpandorCollapseNode(this)"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p7775102218136"><a name="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1402236692"></a><a name="en-us_topic_0000001965416649_li1402236692"></a>Automatic log backup: Logs are backed up periodically based on the preset policy.</p></div>
|
|
<div class="dropdowncontext"><ol type="a" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ol556513565111"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1698102810537">On the <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b1533165524712">Log Backup</strong> page, click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b19198165154811">Modify Settings</strong> on the right.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li6970552151219">In the <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b19772665117">Modify Settings</strong> dialog box, select <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b189081257145119">Automatic backup</strong>, and configure the automatic backup policy.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_table13235122823218"></a><a name="en-us_topic_0000001965416649_table13235122823218"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_table13235122823218" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Automatic backup settings</caption><thead align="left"><tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row11236328153217"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.3.6.2.2.3.2.3.1.1"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p9236142833210">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.6.3.6.2.2.3.2.3.1.2"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p82365288324">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row723672833214"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.6.2.2.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p102360281321">Time Zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.6.3.6.2.2.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p9429193191314">Select a time zone for the backup start time.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row923622810322"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.6.2.2.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p123612813322">Backup Start Time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.6.3.6.2.2.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p10430133111136">Specify the start time of auto backup.</p>
|
|
<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p13430163141318">Select a value from the drop-down list. The value range is from <span class="parmvalue" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_parmvalue18430193151313"><b>00:00</b></span> to <span class="parmvalue" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_parmvalue5430153121313"><b>23:00</b></span>. The backup always happens on the hour.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1523716217280">Click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b1852864115537">OK</strong> to enable automatic log backup.<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1868914485581">Automatic log backup tasks are displayed in the task list. When <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b15367631101613">Task Status</strong> in the task list changes to <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b18367133191615">Succeeded</strong>, the backup is successful.</p>
|
|
<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p89616813515">If log backup fails, click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b66021318115">Failed Tasks</strong> learn the failure causes. A maximum of 10 failed tasks can be displayed. When log backup is disabled or the cluster is deleted, the failure records are also cleared.</p>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li10431527124610">If automatic log backup is not required, click <span class="uicontrol" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_uicontrol16308103104716"><b>Modify Settings</b></span>. In the displayed dialog box, deselect <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b1960332231911">Automatic backup</strong>, and click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b24542711917">OK</strong>. In the displayed confirmation dialog box, click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b83076412020">OK</strong>.<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p197381441164613">Disabling log backup does not automatically delete log backups automatically generated earlier. Instead, you need to manually delete them on the OBS console.</p>
|
|
</li></ol></div></div>
|
|
<div class="dropdownexpand"><div class="dropdowntitle" onclick="ExpandorCollapseNode(this)"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p19226153521311">Manual log backup: Back up logs right away.</p></div>
|
|
<div class="dropdowncontext"><ol type="a" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ol1322913351138"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li182461655418">On the <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b4763135516">Log Backup</strong> page, click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b124261161568">Back Up Manually</strong> under <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b12907161442213">Log Backup Tasks</strong>.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li11229183541320">In the displayed dialog box, confirm the log backup path and click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b1199311385567">OK</strong>.<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p182255310314">The log backup task is displayed in the task list. When <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b13574194610146">Task Status</strong> in the task list changes to <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b331411578185">Succeeded</strong>, the backup is successful.</p>
|
|
<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p194284571940">If log backup fails, click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b14732216111117">Failed Tasks</strong> learn the failure causes. A maximum of 10 failed tasks can be displayed. When log backup is disabled or the cluster is deleted, the failure records are also cleared.</p>
|
|
</li></ol></div></div>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li14995221780">Check the backed-up log files.<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p101539329170"><a name="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li14995221780"></a><a name="en-us_topic_0000001965416649_li14995221780"></a>Logs are backed up incrementally. After the backup is successful, you can access the target OBS bucket to obtain the full log files by clicking <span class="parmname" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_parmname7724115535711"><b>Log Path</b></span>.</p>
|
|
<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p136234975620"><a href="#EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_table11352134814319">Table 3</a> lists the log types, where <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_b1652193410010">clustername</strong> indicates the cluster name.</p>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_table11352134814319"></a><a name="en-us_topic_0000001965416649_table11352134814319"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_table11352134814319" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Log types</caption><thead align="left"><tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row2352204810312"><th align="left" class="cellrowborder" valign="top" width="37.24%" id="mcps1.3.6.3.7.3.2.3.1.1"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1335219486317">Log Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="62.760000000000005%" id="mcps1.3.6.3.7.3.2.3.1.2"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p9352248143113">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row16352144813113"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.6.3.7.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p19353748113116"><i><span class="varname" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_varname1189612451148">clustername</span></i>_deprecation.log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.6.3.7.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p163531848133119">Deprecation log file</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row1353154833113"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.6.3.7.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1435354819319"><i><span class="varname" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_varname1816655017410">clustername</span></i>_index_indexing_slowlog.log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.6.3.7.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p13535483315">Slow indexing log file</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row11353548143119"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.6.3.7.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p143533484317"><i><span class="varname" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_varname1586135311415">clustername</span></i>_index_search_slowlog.log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.6.3.7.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p153531448203115">Slow query log file</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row1435394823119"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.6.3.7.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1735354823117"><i><span class="varname" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_varname73872583415">clustername</span></i>.log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.6.3.7.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1835384863111">Run log file</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row3354548133116"><td class="cellrowborder" valign="top" width="37.24%" headers="mcps1.3.6.3.7.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p735419488319"><i><span class="varname" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_varname9907180450">clustername</span></i>_access.log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.760000000000005%" headers="mcps1.3.6.3.7.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p735410484312">Access log file</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li16621212148">If the log backup function is no longer needed, you can disable it.<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p132433711"><a name="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li16621212148"></a><a name="en-us_topic_0000001965416649_li16621212148"></a>On the <strong id="EN-US_TOPIC_0000001955726570__b9773123805314">Log Backup</strong> page, click <strong id="EN-US_TOPIC_0000001955726570__b12774183810535">Disable Backup</strong>. In the displayed dialog box, click <strong id="EN-US_TOPIC_0000001955726570__b1877493885311">OK</strong>. Disabling log backup does not automatically delete existing log backups. Instead, you need to manually delete them on the OBS console.</p>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_section132041636163218"><a name="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_section132041636163218"></a><a name="en-us_topic_0000001965416649_section132041636163218"></a><h4 class="sectiontitle">Log Introduction</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_table262303316458" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Log introduction</caption><thead align="left"><tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row176239338451"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.7.2.2.4.1.1"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p13623533174513">Log Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.7.2.2.4.1.2"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p26231833174512">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.7.2.2.4.1.3"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p166231033154519">Purpose</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row1662323315453"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.7.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1062312334456">Run logs</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.7.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p11623433144511">Run logs, or main logs, record the cluster status and key information about write and query operations. For example, write logs record operations such as index creation, index mapping update, and write queue exhaustion; and query logs record query queue status and query exceptions.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.7.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p13623103384513">Check the status and write and query operations of each cluster node, including inter-node connectivity, full GC, index creation or deletion, and cluster-level query errors.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row15623833194515"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.7.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p19623183313452">Slow indexing logs</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.7.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p9623183311456">Slow indexing logs record indexing operations (such as bulk, index, update, and delete) that took a long time to complete, helping you identify performance bottlenecks.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.7.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p197577558414">In the case of slow write performance, you can query slow indexing logs to locate the cause.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row18979112744618"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.7.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p139794278461">Slow query logs</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.7.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p29791927124617">Slow query logs record search requests that took a long time to complete. They help you monitor and analyze time-consuming search requests, so you can identify performance bottlenecks, optimize SQL queries, and improve overall system performance.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.7.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p126601448433">In the case of slow query performance, you can query slow query logs to locate the cause.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row11842122984616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.7.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p188422292464">Deprecation logs</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.7.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p9842152916466">Deprecation logs record deprecation warnings. Deprecation warnings are written to this log when you use APIs, configurations, or functions that are marked for removal in future versions.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.7.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p5437141834511">Check for APIs or features that are about to expire in future versions.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_row1524811819572"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.7.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p225015815571">Access logs</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.7.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p325018885719">Access logs record cluster access requests, such as the request path and source address.</p>
|
|
<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p552910331383">You cannot check access logs on the console. To check them, you need to back them up to an OBS bucket or transfer them to a target cluster first.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.7.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1225017845713">If there is a surge in service requests, you can analyze the request sources and paths by checking the access logs.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ul1673719346393"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1351114973914"><strong id="EN-US_TOPIC_0000001955726570__b191857224017">Run log description</strong><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p0887104918399">Run logs record the cluster status and key information about write and query operations. For example, the log record below indicates that an index named <strong id="EN-US_TOPIC_0000001955726570__b115862419119">test</strong> was created and afterwards the cluster status changed from <strong id="EN-US_TOPIC_0000001955726570__b9586942015">YELLOW</strong> to <strong id="EN-US_TOPIC_0000001955726570__b205861444111">GREEN</strong>.</p>
|
|
<div class="fignone" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_fig1460158104014"><span class="figcap"><b>Figure 1 </b>Run log sample</span><br><span><img id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_image1244841318224" src="figure/en-us_image_0000002384886584.png"></span></div>
|
|
<div class="p" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p8289182920246">Log content:<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ul497854922316"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1097854918234">1. Log generation time</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li189786496230">2. Log level, which can be DEBUG, INFO, WARN, or ERROR</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li189781549192312">3. Log-generating module</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li13978549162314">4. Name of the log-generating node</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li997834962313">5. Log content</li></ul>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1155383918399"><strong id="EN-US_TOPIC_0000001955726570__b1888812291119">Slow indexing log description</strong><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p17585173417255">Slow indexing logs record indexing operations that took a long time to complete. For example, the log record below shows an indexing request that lasted longer than the preset threshold. The log contains the index name, duration, and request content.</p>
|
|
<div class="fignone" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_fig5944193034217"><span class="figcap"><b>Figure 2 </b>Slow indexing log sample</span><br><span><img id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_image5242032172512" src="figure/en-us_image_0000002385046436.png"></span></div>
|
|
<div class="p" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p117711809435">Log content:<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ul677140184314"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li7771802432"><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p15382161310458"><a name="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li7771802432"></a><a name="en-us_topic_0000001965416649_li7771802432"></a>1. Log generation time</p>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1665010244515">2. Log level, which can be DEBUG, INFO, WARN, or ERROR</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1365112254518">3. Log-generating module</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li156511729459">4. Name of the log-generating node</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li765118218459">5. Index name and ID</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1965218213457">6. Log content. In this example, the log recorded the request execution duration, index type, and index request body.</li></ul>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li522156164118"><strong id="EN-US_TOPIC_0000001955726570__b650091828">Slow query log description</strong><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p8677162142817">Slow query logs record search requests that took a long time to complete. For example, the log record below shows a search request that lasted longer than the preset threshold. The log contains the index name, duration, and request content.</p>
|
|
<div class="fignone" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_fig05123584466"><span class="figcap"><b>Figure 3 </b>Slow query log sample</span><br><span><img id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_image15587106133119" src="figure/en-us_image_0000002418645681.png"></span></div>
|
|
<div class="p" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p9640162535614">Log content:<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ul13514185585614"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li193132543562">1. Log generation time</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li14313854115612">2. Log level, which can be DEBUG, INFO, WARN, or ERROR</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li1331455455612">3. Log-generating module</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li531416541568">4. Name of the log-generating node</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li10315454135614">5. Index name and shard ID</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li731511542566">6. Log content. In this example, the log recorded the query duration, number of hits, and query request body.</li></ul>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li0472184810426"><strong id="EN-US_TOPIC_0000001955726570__b10501848525">Deprecation log description</strong><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p1662213413209">Deprecation logs record deprecation warnings. For example, the log record below indicates that <b><span class="cmdname" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_cmdname3717123016514">GET /_cat/master</span></b> has been deprecated and should be replaced with <b><span class="cmdname" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_cmdname1199117357519">GET /_cat/cluster_manager</span></b>.</p>
|
|
<div class="fignone" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_fig1365910174579"><span class="figcap"><b>Figure 4 </b>Deprecation log sample</span><br><span><img id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_image993005917197" src="figure/en-us_image_0000002418565841.png"></span></div>
|
|
<div class="p" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p31072196572">Log content:<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ul9633080214"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li9910167123">1. Log generation time</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li291111717210">2. Log level, which can only be DEPRECATION.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li109111671227">3. Log-generating module</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li3911271124">4. Name of the log-generating node</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li49116719219">5. Log content</li></ul>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li13569144716511"><strong id="EN-US_TOPIC_0000001955726570__b9968343413">Access log description</strong><p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p0401781766">Access logs record cluster access requests and source addresses. For example, the log record below has recorded source information for the /_snapshot/my_backup/my_snapshot/_restore?pretty=true operation.</p>
|
|
<div class="fignone" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_fig128247576152"><span class="figcap"><b>Figure 5 </b>Access log sample</span><br><span><img id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_image14991882044" src="figure/en-us_image_0000002384886600.png"></span></div>
|
|
<div class="p" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_p12413118844">Log content:<ul id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_ul15384487517"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li18381848552">1. Log generation time</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li12385481155">2. Name of the log-generating node</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li14386489516">3. Name of the log-generating thread</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li45611557619">4. Log level, which can be DEBUG, INFO, WARN, or ERROR.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li10384481150">5. Log request method</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li216120331578">6. Request path</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000001965416649_li89509491074">7. Source and destination addresses of the request</li></ul>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726570__section178375451288"><h4 class="sectiontitle">FAQ: How Do I Change Log Levels?</h4><p id="EN-US_TOPIC_0000001955726570__p128371345152817">Log4j2 is used as the log component in OpenSearch clusters. Multiple log levels (ERROR, WARN, INFO, DEBUG, and TRACE) are supported. The default log level is INFO. To facilitate troubleshooting and debugging, you can dynamically adjust the log levels.</p>
|
|
<ul id="EN-US_TOPIC_0000001955726570__ul683710453283"><li id="EN-US_TOPIC_0000001955726570__li13837174592813">INFO is the default log level. The levels, in order of increasing detail, are: ERROR, WARN, INFO, DEBUG, and TRACE. When INFO is set, you will see logs for itself and all higher-severity levels (ERROR and WARN), while more verbose levels (DEBUG and TRACE) are excluded.</li><li id="EN-US_TOPIC_0000001955726570__li8837194511283">You can change the log level of a specified module in real time via an OpenSearch API.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001955726570__p20837164582814"><strong id="EN-US_TOPIC_0000001955726570__b340116156206">Example</strong></p>
|
|
<ol id="EN-US_TOPIC_0000001955726570__ol1783764515287"><li id="EN-US_TOPIC_0000001955726570__li188371445172815">Log in to OpenSearch Dashboards and go to the command execution page. OpenSearch clusters support multiple access methods. This topic uses OpenSearch Dashboards as an example to describe the operation procedures.<ol type="a" id="EN-US_TOPIC_0000001955726570__ol37531011101619"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_li111185453113"><span id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_ph134648105316">Log in to the CSS management console.</span></li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_li1711804571114">In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_uicontrol1511834581115"><b>Clusters > OpenSearch</b></span>.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_li201181045151113">In the cluster list, find the target cluster, and click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_b8963520674129">Dashboards</strong> in the <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_b1363282744129">Operation</strong> column to log in to OpenSearch Dashboards.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_li811824512111">In the left navigation pane, choose <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_b45261424710">Dev Tools</strong>.<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_p539424154519">The left part of the console is the command input box, and the triangle icon in its upper-right corner is the execution button. The right part shows the execution result.</p>
|
|
</li></ol>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__li168381945112818">Run the following command to change the log level of the action module to <strong id="EN-US_TOPIC_0000001955726570__b18241122162016">DEBUG</strong>:<pre class="screen" id="EN-US_TOPIC_0000001955726570__screen1383824513289">PUT _cluster/settings
|
|
{
|
|
"persistent": {
|
|
"logger": {
|
|
"org.opensearch.action": "DEBUG"
|
|
}
|
|
}
|
|
}</pre>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__li98381845182810">Run the following command to restore the default log level <strong id="EN-US_TOPIC_0000001955726570__b12572402014">INFO</strong>:<pre class="screen" id="EN-US_TOPIC_0000001955726570__screen8838445102812">PUT _cluster/settings
|
|
{
|
|
"persistent": {
|
|
"logger": {
|
|
"org.opensearch.action": null
|
|
}
|
|
}
|
|
}</pre>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726570__section8265734153118"><h4 class="sectiontitle">FAQ: How Do I Enable Trace Logging?</h4><p id="EN-US_TOPIC_0000001955726570__p142650346312">To facilitate troubleshooting, debugging, and performance analysis, you may enable trace logging for the HTTP/Transport module and view detailed trace logs.</p>
|
|
<p id="EN-US_TOPIC_0000001955726570__p102656340316">Enabling trace logging is a non-persistent configuration and will be disabled upon a cluster restart.</p>
|
|
<p id="EN-US_TOPIC_0000001955726570__p1626511348314"><strong id="EN-US_TOPIC_0000001955726570__b138691233202015">Operation Guide</strong></p>
|
|
<ol id="EN-US_TOPIC_0000001955726570__ol1426573417314"><li id="EN-US_TOPIC_0000001955726570__li4265143415317">Log in to OpenSearch Dashboards and go to the command execution page. OpenSearch clusters support multiple access methods. This topic uses OpenSearch Dashboards as an example to describe the operation procedures.<ol type="a" id="EN-US_TOPIC_0000001955726570__ol19443114519315"><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_li111185453113_1"><span id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_ph134648105316_1">Log in to the CSS management console.</span></li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_li1711804571114_1">In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_uicontrol1511834581115_1"><b>Clusters > OpenSearch</b></span>.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_li201181045151113_1">In the cluster list, find the target cluster, and click <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_b8963520674129_1">Dashboards</strong> in the <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_b1363282744129_1">Operation</strong> column to log in to OpenSearch Dashboards.</li><li id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_li811824512111_1">In the left navigation pane, choose <strong id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_b45261424710_1">Dev Tools</strong>.<p id="EN-US_TOPIC_0000001955726570__en-us_topic_0000002338102386_p539424154519_1">The left part of the console is the command input box, and the triangle icon in its upper-right corner is the execution button. The right part shows the execution result.</p>
|
|
</li></ol>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__li1265193453111">Run the following command to enable trace logging:<pre class="screen" id="EN-US_TOPIC_0000001955726570__screen1371915183217">PUT _cluster/settings
|
|
{
|
|
"transient": {
|
|
"logger.org.opensearch.transport.TransportService.tracer": "trace",
|
|
"transport.tracer.include": "",
|
|
"http.tracer.include": "",
|
|
"logger.org.opensearch.http.HttpTracer": "trace"
|
|
}
|
|
}</pre>
|
|
</li><li id="EN-US_TOPIC_0000001955726570__li14913153218247">Go to the log details page to view trace logs.<ol type="a" id="EN-US_TOPIC_0000001955726570__ol196045104147"><li id="EN-US_TOPIC_0000001955726570__li1482303312010">In the cluster list, click the name of the target cluster. The cluster information page is displayed.</li><li id="EN-US_TOPIC_0000001955726570__li14314131141613">Choose <span class="wintitle" id="EN-US_TOPIC_0000001955726570__wintitle156726420206"><b>Logs > Log Search</b></span>. The <strong id="EN-US_TOPIC_0000001955726570__b7673164232012">Log Search</strong> page is displayed.</li><li id="EN-US_TOPIC_0000001955726570__li11823113315016">Select all log levels (mandatory) and view trace logs.</li></ol>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0212.html">OpenSearch Cluster Monitoring and Log Management</a></div>
|
|
</div>
|
|
</div>
|
|
|