forked from docs/doc-exports
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>
160 lines
15 KiB
HTML
160 lines
15 KiB
HTML
<a name="css_01_0199"></a><a name="css_01_0199"></a>
|
|
|
|
<h1 class="topictitle1">Temporary Access Statistics Logs</h1>
|
|
<div id="body0000001435340292"><div class="section" id="css_01_0199__en-us_topic_0000001435340292_section1915032513420"><h4 class="sectiontitle">Context</h4><p id="css_01_0199__en-us_topic_0000001435340292_p16618151523614">You can check access logs in either of the following ways:</p>
|
|
<ul id="css_01_0199__en-us_topic_0000001435340292_ul467133317363"><li id="css_01_0199__en-us_topic_0000001435340292_li1671333123612">Enable and check access logs via an independent API. Configure the API parameters to record the access log time and size. The access log content is returned through a REST API.</li><li id="css_01_0199__en-us_topic_0000001435340292_li1522934133618">Print access logs. Your access logs are printed as files in backend logs. To enable this method, set the <span class="parmname" id="css_01_0199__en-us_topic_0000001435340292_parmname27551253173014"><b>flowcontrol.log.file.enabled</b></span> configuration item in <a href="css_01_0195.html">16.5.4</a>.</li></ul>
|
|
<p id="css_01_0199__en-us_topic_0000001435340292_p71511825133415">The following table describes access log parameters.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_01_0199__en-us_topic_0000001435340292_table14438151713712" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Access log parameters</caption><thead align="left"><tr id="css_01_0199__en-us_topic_0000001435340292_row134385172373"><th align="left" class="cellrowborder" valign="top" width="24.39%" id="mcps1.3.1.5.2.4.1.1"><p id="css_01_0199__en-us_topic_0000001435340292_p94387177375">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.379999999999999%" id="mcps1.3.1.5.2.4.1.2"><p id="css_01_0199__en-us_topic_0000001435340292_p35341047113710">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60.23%" id="mcps1.3.1.5.2.4.1.3"><p id="css_01_0199__en-us_topic_0000001435340292_p84381717153717">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="css_01_0199__en-us_topic_0000001435340292_row10438717163713"><td class="cellrowborder" valign="top" width="24.39%" headers="mcps1.3.1.5.2.4.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p17438317183719">duration_limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.379999999999999%" headers="mcps1.3.1.5.2.4.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p145341647133719">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.23%" headers="mcps1.3.1.5.2.4.1.3 "><p id="css_01_0199__en-us_topic_0000001435340292_p164381817183717">Duration recorded in an access log.</p>
|
|
<p id="css_01_0199__en-us_topic_0000001435340292_p154384172374">Value range: 10 to 120</p>
|
|
<p id="css_01_0199__en-us_topic_0000001435340292_p9438111793716">Unit: s</p>
|
|
<p id="css_01_0199__en-us_topic_0000001435340292_p0438417143712">Default value: <strong id="css_01_0199__en-us_topic_0000001435340292_b6988142185110">30</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0199__en-us_topic_0000001435340292_row34381417173716"><td class="cellrowborder" valign="top" width="24.39%" headers="mcps1.3.1.5.2.4.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p18438201753718">capacity_limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.379999999999999%" headers="mcps1.3.1.5.2.4.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p853404783711">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.23%" headers="mcps1.3.1.5.2.4.1.3 "><p id="css_01_0199__en-us_topic_0000001435340292_p9438111753718">Size of an access log. After access logging is enabled, the size of recorded requests is checked. If the size exceeds the value of this parameter, the access logging stops.</p>
|
|
<p id="css_01_0199__en-us_topic_0000001435340292_p743820171376">Value range: 1 to 5</p>
|
|
<p id="css_01_0199__en-us_topic_0000001435340292_p4438161714372">Unit: MB</p>
|
|
<p id="css_01_0199__en-us_topic_0000001435340292_p1343871763718">Default value: <strong id="css_01_0199__en-us_topic_0000001435340292_b24194335513">1</strong></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="note" id="css_01_0199__en-us_topic_0000001435340292_note047294821315"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="css_01_0199__en-us_topic_0000001435340292_p747117595384">Access logging stops if either <strong id="css_01_0199__en-us_topic_0000001435340292_b10123153520519">duration_limit</strong> or <strong id="css_01_0199__en-us_topic_0000001435340292_b1712383535117">capacity_limit</strong> reaches the threshold.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="css_01_0199__en-us_topic_0000001435340292_section1599121753415"><h4 class="sectiontitle">Procedure</h4><ol id="css_01_0199__en-us_topic_0000001435340292_ol1451314268310"><li id="css_01_0199__en-us_topic_0000001435340292_li7678307317">Log in to the CSS management console.</li><li id="css_01_0199__en-us_topic_0000001435340292_li1312263612313">Choose <strong id="css_01_0199__en-us_topic_0000001435340292_b11686640115113">Clusters</strong> in the navigation pane. On the <strong id="css_01_0199__en-us_topic_0000001435340292_b126875404519">Clusters</strong> page, locate the target cluster and click <strong id="css_01_0199__en-us_topic_0000001435340292_b1168810407517">Access Kibana</strong> in the <strong id="css_01_0199__en-us_topic_0000001435340292_b9689184011513">Operation</strong> column.</li><li id="css_01_0199__en-us_topic_0000001435340292_li13513102653113">In the navigation pane on the left, choose <strong id="css_01_0199__en-us_topic_0000001435340292_b6196343125115">Dev Tools</strong> and run commands to enable or disable access logs.<ul id="css_01_0199__en-us_topic_0000001435340292_ul14793171816334"><li id="css_01_0199__en-us_topic_0000001435340292_li37931181334">Enable access logs for all nodes in a cluster.<pre class="screen" id="css_01_0199__en-us_topic_0000001435340292_screen17931818123313">PUT /_access_log?duration_limit=30s&capacity_limit=1mb</pre>
|
|
</li><li id="css_01_0199__en-us_topic_0000001435340292_li0793111893316">Enable access logs for a node in a cluster.<pre class="screen" id="css_01_0199__en-us_topic_0000001435340292_screen379391812337">PUT /_access_log/<em id="css_01_0199__en-us_topic_0000001435340292_i1679351813312">{nodeId}</em>?duration_limit=30s&capacity_limit=1mb</pre>
|
|
<p id="css_01_0199__en-us_topic_0000001435340292_p8794141853314"><em id="css_01_0199__en-us_topic_0000001435340292_i186191352195119">{nodeId}</em> indicates the ID of the node where you want to enable access logs.</p>
|
|
</li></ul>
|
|
</li><li id="css_01_0199__en-us_topic_0000001435340292_li148131484332">View access logs.<ul id="css_01_0199__en-us_topic_0000001435340292_ul1492754423311"><li id="css_01_0199__en-us_topic_0000001435340292_li139271444163318">Check the access logs of all nodes in a cluster.<pre class="screen" id="css_01_0199__en-us_topic_0000001435340292_screen9927164493314">GET /_access_log</pre>
|
|
</li><li id="css_01_0199__en-us_topic_0000001435340292_li13927144403310">Check the access logs of a node in a cluster.<pre class="screen" id="css_01_0199__en-us_topic_0000001435340292_screen1092704483317">GET /_access_log/<em id="css_01_0199__en-us_topic_0000001435340292_i209271044183311">{nodeId}</em></pre>
|
|
<p id="css_01_0199__en-us_topic_0000001435340292_p2927164443316"><em id="css_01_0199__en-us_topic_0000001435340292_i194941281524">{nodeId}</em> indicates the ID of the node where you want to enable access logs.</p>
|
|
<div class="p" id="css_01_0199__en-us_topic_0000001435340292_p1544125964311">Example response:<pre class="screen" id="css_01_0199__en-us_topic_0000001435340292_screen195443596430">{
|
|
"_nodes" : {
|
|
"total" : 1,
|
|
"successful" : 1,
|
|
"failed" : 0
|
|
},
|
|
"cluster_name" : "css-flowcontroller",
|
|
"nodes" : {
|
|
"8x-ZHu-wTemBQwpcGivFKg" : {
|
|
"name" : "css-flowcontroller-ess-esn-1-1",
|
|
"host" : "10.0.0.98",
|
|
"count" : 2,
|
|
"access" : [
|
|
{
|
|
"time" : "2021-02-23 02:09:50",
|
|
"remote_address" : "/10.0.0.98:28191",
|
|
"url" : "/_access/security/log?pretty",
|
|
"method" : "GET",
|
|
"content" : ""
|
|
},
|
|
{
|
|
"time" : "2021-02-23 02:09:52",
|
|
"remote_address" : "/10.0.0.98:28193",
|
|
"url" : "/_access/security/log?pretty",
|
|
"method" : "GET",
|
|
"content" : ""
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}</pre>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_01_0199__en-us_topic_0000001435340292_table79421457173012" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="css_01_0199__en-us_topic_0000001435340292_row12943105753011"><th align="left" class="cellrowborder" valign="top" width="28.59%" id="mcps1.3.2.2.4.1.2.3.2.2.3.1.1"><p id="css_01_0199__en-us_topic_0000001435340292_p1494335719307">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="71.41%" id="mcps1.3.2.2.4.1.2.3.2.2.3.1.2"><p id="css_01_0199__en-us_topic_0000001435340292_p199431457183013">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="css_01_0199__en-us_topic_0000001435340292_row194320579307"><td class="cellrowborder" valign="top" width="28.59%" headers="mcps1.3.2.2.4.1.2.3.2.2.3.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p894310579302">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.41%" headers="mcps1.3.2.2.4.1.2.3.2.2.3.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p59431557113017">Node name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0199__en-us_topic_0000001435340292_row69435575302"><td class="cellrowborder" valign="top" width="28.59%" headers="mcps1.3.2.2.4.1.2.3.2.2.3.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p09431057113020">host</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.41%" headers="mcps1.3.2.2.4.1.2.3.2.2.3.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p8943657193020">Node IP address</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0199__en-us_topic_0000001435340292_row694345717303"><td class="cellrowborder" valign="top" width="28.59%" headers="mcps1.3.2.2.4.1.2.3.2.2.3.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p13943115753016">count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.41%" headers="mcps1.3.2.2.4.1.2.3.2.2.3.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p494375723012">Number of node access requests in a statistical period</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0199__en-us_topic_0000001435340292_row1994312574305"><td class="cellrowborder" valign="top" width="28.59%" headers="mcps1.3.2.2.4.1.2.3.2.2.3.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p189431657143012">access</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.41%" headers="mcps1.3.2.2.4.1.2.3.2.2.3.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p13943125716308">Details about node access requests in a statistical period. For details, see <a href="#css_01_0199__en-us_topic_0000001435340292_table1631713296470">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="css_01_0199__en-us_topic_0000001435340292_table1631713296470"></a><a name="en-us_topic_0000001435340292_table1631713296470"></a><table cellpadding="4" cellspacing="0" summary="" id="css_01_0199__en-us_topic_0000001435340292_table1631713296470" frame="border" border="1" rules="all"><caption><b>Table 3 </b>access</caption><thead align="left"><tr id="css_01_0199__en-us_topic_0000001435340292_row16317172984720"><th align="left" class="cellrowborder" valign="top" width="28.59%" id="mcps1.3.2.2.4.1.2.4.2.3.1.1"><p id="css_01_0199__en-us_topic_0000001435340292_p13317102913475">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="71.41%" id="mcps1.3.2.2.4.1.2.4.2.3.1.2"><p id="css_01_0199__en-us_topic_0000001435340292_p3317162913477">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="css_01_0199__en-us_topic_0000001435340292_row143177294475"><td class="cellrowborder" valign="top" width="28.59%" headers="mcps1.3.2.2.4.1.2.4.2.3.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p14317202934714">time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.41%" headers="mcps1.3.2.2.4.1.2.4.2.3.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p831762954714">Request time</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0199__en-us_topic_0000001435340292_row2317129154710"><td class="cellrowborder" valign="top" width="28.59%" headers="mcps1.3.2.2.4.1.2.4.2.3.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p73174296477">remote_address</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.41%" headers="mcps1.3.2.2.4.1.2.4.2.3.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p8317129104714">Source IP address and port number of the request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0199__en-us_topic_0000001435340292_row9317929144716"><td class="cellrowborder" valign="top" width="28.59%" headers="mcps1.3.2.2.4.1.2.4.2.3.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p5317152984716">url</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.41%" headers="mcps1.3.2.2.4.1.2.4.2.3.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p4317729194714">Original URL of the request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0199__en-us_topic_0000001435340292_row13177291478"><td class="cellrowborder" valign="top" width="28.59%" headers="mcps1.3.2.2.4.1.2.4.2.3.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p83174298476">method</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.41%" headers="mcps1.3.2.2.4.1.2.4.2.3.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p20317629164716">Method corresponding to the request path</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0199__en-us_topic_0000001435340292_row531742910476"><td class="cellrowborder" valign="top" width="28.59%" headers="mcps1.3.2.2.4.1.2.4.2.3.1.1 "><p id="css_01_0199__en-us_topic_0000001435340292_p193171329184713">content</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.41%" headers="mcps1.3.2.2.4.1.2.4.2.3.1.2 "><p id="css_01_0199__en-us_topic_0000001435340292_p1331722915477">Request content</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li><li id="css_01_0199__en-us_topic_0000001435340292_li11157142918335">Run the following commands to delete access logs.<ul id="css_01_0199__en-us_topic_0000001435340292_ul202347235377"><li id="css_01_0199__en-us_topic_0000001435340292_li1323442393712">Delete access logs of all nodes in a cluster.<pre class="screen" id="css_01_0199__en-us_topic_0000001435340292_screen223415231372">DELETE /_access_log</pre>
|
|
</li><li id="css_01_0199__en-us_topic_0000001435340292_li823492393716">Delete access logs of a specified node in a cluster.<pre class="screen" id="css_01_0199__en-us_topic_0000001435340292_screen92347236376">DELETE /_access_log/<em id="css_01_0199__en-us_topic_0000001435340292_i3234623123711">{nodeId}</em></pre>
|
|
<p id="css_01_0199__en-us_topic_0000001435340292_p5234162343718"><em id="css_01_0199__en-us_topic_0000001435340292_i0169185735310">{nodeId}</em> indicates the ID of the node where you want to enable access logs.</p>
|
|
</li></ul>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0191.html">Flow Control 2.0</a></div>
|
|
</div>
|
|
</div>
|
|
|