forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com> Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
171 lines
14 KiB
HTML
171 lines
14 KiB
HTML
<a name="rds_06_0004"></a><a name="rds_06_0004"></a>
|
|
|
|
<h1 class="topictitle1">Querying Database Error Logs</h1>
|
|
<div id="body1544167946150"><div class="section" id="rds_06_0004__section61759636"><h4 class="sectiontitle">Function</h4><p id="rds_06_0004__p33831530">This API is used to query the latest 2000 database error logs.</p>
|
|
<ul id="rds_06_0004__ul12259155218373"><li id="rds_06_0004__en-us_topic_0240111818_li836513175363">Before calling an API, you need to understand the API in <a href="rds_03_0001.html">Authentication</a>.</li><li id="rds_06_0004__en-us_topic_0240111818_li1991981933613">Before calling this API, obtain the required <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">region and endpoint</a>.</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_06_0004__section18965813"><h4 class="sectiontitle">URI</h4><ul id="rds_06_0004__ul13194498"><li id="rds_06_0004__li41603465301">URI format<p id="rds_06_0004__p11160246123012"><a name="rds_06_0004__li41603465301"></a><a name="li41603465301"></a>GET https://{<em id="rds_06_0004__i11252164981618">Endpoint</em>}/v3/{project_id}/instances/{instance_id}/errorlog?start_date={start_date}&end_date={end_date}</p>
|
|
</li></ul>
|
|
<ul id="rds_06_0004__ul55999443"><li id="rds_06_0004__li21405046">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0004__table58427690" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_06_0004__row1482002"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.2.3.1.1.2.4.1.1"><p id="rds_06_0004__p52933326"><strong id="rds_06_0004__b84235270691445">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.2.3.1.1.2.4.1.2"><p id="rds_06_0004__p59740974"><strong id="rds_06_0004__b7422340182110">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.00000000000001%" id="mcps1.3.2.3.1.1.2.4.1.3"><p id="rds_06_0004__p7180698"><strong id="rds_06_0004__b842352706163417">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_06_0004__row44765691"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0004__p2142393">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0004__p39316155">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0004__p30492010">Specifies the project ID of a tenant in a region.</p>
|
|
<p id="rds_06_0004__p7139608914">For details about how to obtain the project ID, see <a href="rds_03_0002.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0004__row5992637"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0004__p15641626">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0004__p59012183">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0004__p15257500">Specifies the ID of the queried DB instance.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0004__row10362162619518"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0004__p24007821174547">start_date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0004__p65585369174547">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0004__p1942671971913">Specifies the start time in the "yyyy-mm-ddThh:mm:ssZ" format.</p>
|
|
<p id="rds_06_0004__p442615191195"><strong id="rds_06_0004__b34274408214">T</strong> is the separator between the calendar and the hourly notation of time. <strong id="rds_06_0004__b2427184014211">Z</strong> indicates the time zone offset. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0004__row18204123319519"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0004__p32183997174547">end_date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0004__p56766964174547">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0004__p1463178163412">Specifies the end time in the "yyyy-mm-ddThh:mm:ssZ" format.</p>
|
|
<p id="rds_06_0004__p16291487342"><strong id="rds_06_0004__b1942910404212">T</strong> is the separator between the calendar and the hourly notation of time. <strong id="rds_06_0004__b542994062113">Z</strong> indicates the time zone offset. </p>
|
|
<p id="rds_06_0004__p34721363174547">You can only query error logs generated within a month.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0004__row17867193065114"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0004__p11832481174547">offset</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0004__p18906893174547">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0004__p55063325174547">Specifies the page offset, such as 1, 2, 3, or 4. The parameter value is <strong id="rds_06_0004__b842352706164811">1</strong> by default if it is not specified.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0004__row1887952814518"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0004__p10063368174547">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0004__p9826466174547">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0004__p57746301174547">Specifies the number of records on a page. Its value range is from 1 to 100. The parameter value is <strong id="rds_06_0004__b842352706164925">10</strong> by default if it is not specified.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0004__row1688917232515"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0004__p1619210276202">level</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0004__p1193327112018">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0004__p1217718548483">Specifies the log level. The default value is <strong id="rds_06_0004__b842352706112656">ALL</strong>. Valid value:</p>
|
|
<ul id="rds_06_0004__ul12491156104814"><li id="rds_06_0004__li1712315011493">ALL</li><li id="rds_06_0004__li23034284917">INFO</li><li id="rds_06_0004__li1064544134918">LOG</li><li id="rds_06_0004__li5603106104917">WARNING</li><li id="rds_06_0004__li1664012811491">ERROR</li><li id="rds_06_0004__li1878116108492">FATAL</li><li id="rds_06_0004__li1149195624817">PANIC</li><li id="rds_06_0004__li9463207352">NOTE</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_06_0004__section36474591"><h4 class="sectiontitle">Request</h4><ul id="rds_06_0004__ul1183180183717"><li id="rds_06_0004__li1283110163719">Request parameters<p id="rds_06_0004__p848415163614"><a name="rds_06_0004__li1283110163719"></a><a name="li1283110163719"></a>None</p>
|
|
</li></ul>
|
|
<ul id="rds_06_0004__ul1398681318552"><li id="rds_06_0004__li4411135064210">Example<p id="rds_06_0004__p1454414211213"><a name="rds_06_0004__li4411135064210"></a><a name="li4411135064210"></a>GET https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/errorlog?offset=1&limit=10&start_date=2018-08-06T10:41:14+0800&end_date=2018-08-07T10:41:14+0800&level=ALL</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_06_0004__section59835867"><h4 class="sectiontitle">Response</h4><ul id="rds_06_0004__ul66273227"><li id="rds_06_0004__li59588135">Normal response
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0004__table29752153" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="rds_06_0004__row62070345"><th align="left" class="cellrowborder" valign="top" width="16.6%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="rds_06_0004__p61642077"><strong id="rds_06_0004__b84235270691445_1">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50.07%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="rds_06_0004__p26952341"><strong id="rds_06_0004__b842352706164541">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="rds_06_0004__p35656026"><strong id="rds_06_0004__b842352706163417_1">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_06_0004__row49943891183823"><td class="cellrowborder" valign="top" width="16.6%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="rds_06_0004__p17747976183823">error_log_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.07%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="rds_06_0004__p28299952183823">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="rds_06_0004__p10594789183823">Indicates detailed information.</p>
|
|
<p id="rds_06_0004__p9886152615558">For details, see <a href="#rds_06_0004__table66531170">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0004__row29657875143522"><td class="cellrowborder" valign="top" width="16.6%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="rds_06_0004__p56278588143531">total_record</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.07%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="rds_06_0004__p62271785143531">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="rds_06_0004__p10849843143531">Indicates the total number of records.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="rds_06_0004__table66531170"></a><a name="table66531170"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0004__table66531170" frame="border" border="1" rules="all"><caption><b>Table 3 </b>error_log_list field data structure description</caption><thead align="left"><tr id="rds_06_0004__row12984378"><th align="left" class="cellrowborder" valign="top" width="15.659999999999998%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="rds_06_0004__p45101667"><strong id="rds_06_0004__b84235270691445_2">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.1%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="rds_06_0004__p29356372"><strong id="rds_06_0004__b842352706164541_1">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="69.24%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="rds_06_0004__p29055926"><strong id="rds_06_0004__b842352706163417_2">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_06_0004__row4719792"><td class="cellrowborder" valign="top" width="15.659999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0004__p46758891">time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.1%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0004__p29373839">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0004__p30470722">Indicates the time in the UTC format.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0004__row154615419615"><td class="cellrowborder" valign="top" width="15.659999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0004__p135461141867">level</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.1%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0004__p75471546619">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0004__p12547745620">Indicates the log level.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0004__row5801050"><td class="cellrowborder" valign="top" width="15.659999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0004__p123050">content</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.1%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0004__p9967070">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0004__p2026335">Indicates the log content.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="rds_06_0004__ul26818564"><li id="rds_06_0004__li40040492">Example normal response<pre class="codeblock" id="rds_06_0004__codeblock1246522131615">{
|
|
"error_log_list": [{
|
|
"time": "2018-12-04T14:24:42",
|
|
"level": "ERROR",
|
|
"content": "Slave I/O for channel '': error connecting to master 'rdsRepl@172.16.30.111:3306' - retry-time: 60 retries: 1, Error_code: 203"
|
|
}, {
|
|
"time": "2018-12-04T14:24:42",
|
|
"level": "ERROR",
|
|
"content": "Slave I/O for channel '': error connecting to master 'rdsRepl@172.11.11.111:8081' - retry-time: 60 retries: 1, Error_code: 203"
|
|
}],
|
|
"total_record": 2
|
|
}</pre>
|
|
</li><li id="rds_06_0004__li1953636143515">Abnormal Response<p id="rds_06_0004__p46896054"><a name="rds_06_0004__li1953636143515"></a><a name="li1953636143515"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_06_0004__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_06_0004__en-us_topic_0032347778_ul7858132212142"><li id="rds_06_0004__en-us_topic_0032347778_li58581622171411">Normal<p id="rds_06_0004__en-us_topic_0032347778_p1040982941020"><a name="rds_06_0004__en-us_topic_0032347778_li58581622171411"></a><a name="en-us_topic_0032347778_li58581622171411"></a>200</p>
|
|
</li><li id="rds_06_0004__en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_06_0004__en-us_topic_0032347778_p0723374409"><a name="rds_06_0004__en-us_topic_0032347778_li11583183218149"></a><a name="en-us_topic_0032347778_li11583183218149"></a>For details, see <a href="en-us_topic_0032488240.html">Status Codes</a>.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_06_0004__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_06_0004__en-us_topic_0032347778_p19357163913406">For details, see <a href="en-us_topic_0032488241.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0056887472.html">Log Information Queries</a></div>
|
|
</div>
|
|
</div>
|
|
|