Files
doc-exports/docs/css/api-ref/StartLogs.html
zhengxiu 8f6b8d3664 css api 25.6.0 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: zhengxiu <zhengxiu@huawei.com>
Co-committed-by: zhengxiu <zhengxiu@huawei.com>
2025-11-25 11:21:12 +00:00

308 lines
24 KiB
HTML

<a name="StartLogs"></a><a name="StartLogs"></a>
<h1 class="topictitle1">Enabling Log Backup or Log Collection</h1>
<div id="body1708331107508"><div class="section" id="StartLogs__section4746434111110"><h4 class="sectiontitle">Function</h4><p id="StartLogs__p157465347116">This API is used to enable log backup or log ingestion for a cluster. Log backup and log ingestion can be enabled separately. After log backup is enabled, you can configure an automatic backup policy or manually trigger backup to back up the cluster's run logs to a specified OBS bucket and directory. After log collection is enabled, the cluster's run logs will be collected in real time and saved to a specified index of a specified cluster.</p>
</div>
<div class="section" id="StartLogs__section12746123461112"><h4 class="sectiontitle">Calling Method</h4><p id="StartLogs__p1746834191118">For details, see <a href="css_03_0077.html">Calling APIs</a>.</p>
</div>
<div class="section" id="StartLogs__section7746173412112"><h4 class="sectiontitle">URI</h4><p id="StartLogs__p1274673413118">POST /v1.0/{project_id}/clusters/{cluster_id}/logs/open</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="StartLogs__table197478347111" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="StartLogs__row11746734101118"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="StartLogs__p177471534101113">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="StartLogs__p1974716346114">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="StartLogs__p1747193471111">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="StartLogs__p274713340118">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="StartLogs__row137475341112"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="StartLogs__p10747434161117">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="StartLogs__p167471734191119">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="StartLogs__p1374723401119">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="StartLogs__p474773411111"><strong id="StartLogs__b57472344116">Definition</strong>:</p>
<p id="StartLogs__p1774803441112">Project ID. For details about how to obtain the project ID and name, see <a href="css_03_0071.html">Obtaining the Project ID and Name</a>.</p>
<p id="StartLogs__p474803421116"><strong id="StartLogs__b374811342113">Constraints</strong>:</p>
<p id="StartLogs__p1674843411116">N/A</p>
<p id="StartLogs__p10748193471114"><strong id="StartLogs__b16748173481119">Value range</strong>:</p>
<p id="StartLogs__p674813419111">Project ID of the account.</p>
<p id="StartLogs__p1174893410115"><strong id="StartLogs__b974853414114">Default value</strong>:</p>
<p id="StartLogs__p1074813417112">N/A</p>
</td>
</tr>
<tr id="StartLogs__row19747183421115"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="StartLogs__p37481534101119">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="StartLogs__p77481234171119">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="StartLogs__p1774883431118">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="StartLogs__p774893401111"><strong id="StartLogs__b874812342115">Definition</strong>:</p>
<p id="StartLogs__p1974823411120">ID of the cluster for which log backup or ingestion is to be enabled. For details about how to obtain the cluster ID, see <a href="css_03_0101.html">Obtaining the Cluster ID</a>.</p>
<p id="StartLogs__p137485349113"><strong id="StartLogs__b474817346115">Constraints</strong>:</p>
<p id="StartLogs__p87481234191120">N/A</p>
<p id="StartLogs__p47482341117"><strong id="StartLogs__b13748173421117">Value range</strong>:</p>
<p id="StartLogs__p157481534161118">Cluster ID.</p>
<p id="StartLogs__p774813401112"><strong id="StartLogs__b274919344117">Default value</strong>:</p>
<p id="StartLogs__p16749834161111">N/A</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="StartLogs__table1074953413111" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr id="StartLogs__row17491934111111"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="StartLogs__p1774903418113">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="StartLogs__p16749193417113">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="StartLogs__p1574973415113">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="StartLogs__p2749034201110">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="StartLogs__row10749734121120"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="StartLogs__p147491734161116">action</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="StartLogs__p1974912341113">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="StartLogs__p774919340116">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="StartLogs__p1075015342117"><strong id="StartLogs__b16750434191116">Parameter description</strong>:</p>
<p id="StartLogs__p19750133413118">Configure log backup or log collection for a cluster.</p>
<p id="StartLogs__p675011346110"><strong id="StartLogs__b1475013349119">Constraints</strong>:</p>
<p id="StartLogs__p275016344117">N/A</p>
<p id="StartLogs__p375043415116"><strong id="StartLogs__b2750173419113">Options</strong>:</p>
<ul id="StartLogs__ul67504342115"><li id="StartLogs__li157507348115"><p id="StartLogs__p157501834171110"><a name="StartLogs__li157507348115"></a><a name="li157507348115"></a>base_log_collect: Backs up logs to OBS.</p>
</li><li id="StartLogs__li375013412114"><p id="StartLogs__p18750934131113"><a name="StartLogs__li375013412114"></a><a name="li375013412114"></a>real_time_log_collect: Saves logs to an Elasticsearch cluster in real time.</p>
</li></ul>
<p id="StartLogs__p1475033421113"><strong id="StartLogs__b075083419114">Default value</strong>:</p>
<p id="StartLogs__p17750534161112">base_log_collect</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="StartLogs__section8750183412114"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="StartLogs__request_StartLogsReq" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="StartLogs__row1075111349115"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="StartLogs__p1975133419119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="StartLogs__p675113349119">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="StartLogs__p27511434171119">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="StartLogs__p575273461119">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="StartLogs__row9751123471112"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="StartLogs__p77521134151115">agency</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="StartLogs__p127523348114">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="StartLogs__p275219345118">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="StartLogs__p1775273416117"><strong id="StartLogs__b167523344118">Parameter description</strong>:</p>
<p id="StartLogs__p5752734181111">Agency name. Through this agency, you delete OBS permissions to CSS, so that CSS will be able to back up log files to your OBS buckets.</p>
<p id="StartLogs__p1875293471118"><strong id="StartLogs__b1375218340111">Constraints</strong>:</p>
<p id="StartLogs__p17522348112">This parameter is mandatory when action is not set to real_time_log_collect.</p>
<p id="StartLogs__p1752134161118"><strong id="StartLogs__b12752103415119">Options</strong>:</p>
<p id="StartLogs__p147522034141119">The value can contain only letters (a-z and A-Z), digits (0-9), hyphens (-), and underscores (_). It cannot contain Chinese characters or other special characters.</p>
<p id="StartLogs__p2752734181119"><strong id="StartLogs__b18752234181118">Default value</strong>:</p>
<p id="StartLogs__p117521134151117">N/A</p>
</td>
</tr>
<tr id="StartLogs__row107511134101118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="StartLogs__p175213481120">log_base_path</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="StartLogs__p13752133415117">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="StartLogs__p1675273451115">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="StartLogs__p15753193412115"><strong id="StartLogs__b47531334141119">Definition</strong>:</p>
<p id="StartLogs__p14753173415111">Storage path of backed up logs in the OBS bucket.</p>
<p id="StartLogs__p975323417113"><strong id="StartLogs__b37536349114">Constraints</strong>:</p>
<p id="StartLogs__p675393471119">This parameter is mandatory when action is not set to real_time_log_collect.</p>
<p id="StartLogs__p5753534171119"><strong id="StartLogs__b127538344117">Value range</strong>:</p>
<ul id="StartLogs__ul775313349118"><li id="StartLogs__li4753034191115"><p id="StartLogs__p117531534131110"><a name="StartLogs__li4753034191115"></a><a name="li4753034191115"></a>The backup path cannot contain the following characters: \:*?"&lt;&gt;|'{}. Additionally, it cannot:</p>
</li><li id="StartLogs__li10753934171118"><p id="StartLogs__p1775343418111"><a name="StartLogs__li10753934171118"></a><a name="li10753934171118"></a>Start with a slash (/).</p>
</li><li id="StartLogs__li77533342111"><p id="StartLogs__p19753113461117"><a name="StartLogs__li77533342111"></a><a name="li77533342111"></a>Start or end with a period (.).</p>
</li><li id="StartLogs__li15753133481111"><p id="StartLogs__p14753034171116"><a name="StartLogs__li15753133481111"></a><a name="li15753133481111"></a>Contain more than two consecutive slashes (/) or periods (.).</p>
</li><li id="StartLogs__li19753173431117"><p id="StartLogs__p17753534181114"><a name="StartLogs__li19753173431117"></a><a name="li19753173431117"></a>Exceed 512 characters.</p>
</li></ul>
<p id="StartLogs__p37532343110"><strong id="StartLogs__b175313345114">Default value</strong>:</p>
<p id="StartLogs__p57535341119">N/A</p>
</td>
</tr>
<tr id="StartLogs__row11751203413117"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="StartLogs__p117531345113">log_bucket</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="StartLogs__p8753183411110">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="StartLogs__p1375312348116">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="StartLogs__p11754173451119"><strong id="StartLogs__b2754103431115">Definition</strong>:</p>
<p id="StartLogs__p1075413342114">OBS bucket name for log backup.</p>
<p id="StartLogs__p27541534141115"><strong id="StartLogs__b1975453419114">Constraints</strong>:</p>
<p id="StartLogs__p11754173491116">This parameter is mandatory when action is not set to real_time_log_collect.</p>
<p id="StartLogs__p10754103410112"><strong id="StartLogs__b19754133471116">Value range</strong>:</p>
<p id="StartLogs__p157541034101113">N/A</p>
<p id="StartLogs__p475463421113"><strong id="StartLogs__b47547348113">Default value</strong>:</p>
<p id="StartLogs__p975443410118">N/A</p>
</td>
</tr>
<tr id="StartLogs__row1275123401119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="StartLogs__p9754034111120">auto_enable</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="StartLogs__p77544344110">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="StartLogs__p975493411117">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="StartLogs__p1875473451116"><strong id="StartLogs__b107541834191115">Definition</strong>:</p>
<p id="StartLogs__p1175463481114">Whether to enable automatic backup of cluster logs.</p>
<p id="StartLogs__p6754193471112"><strong id="StartLogs__b1275443419117">Constraints</strong>:</p>
<p id="StartLogs__p77541734111114">N/A</p>
<p id="StartLogs__p107542348114"><strong id="StartLogs__b7754153491112">Value range</strong>:</p>
<ul id="StartLogs__ul11755143481120"><li id="StartLogs__li1575553417117"><p id="StartLogs__p187551434141117"><a name="StartLogs__li1575553417117"></a><a name="li1575553417117"></a>true: Enable automatic backup of cluster logs.</p>
</li><li id="StartLogs__li14755113481114"><p id="StartLogs__p175523417114"><a name="StartLogs__li14755113481114"></a><a name="li14755113481114"></a>false: Disable automatic backup of cluster logs.</p>
</li></ul>
<p id="StartLogs__p1875517345112"><strong id="StartLogs__b207558348115">Default value</strong>:</p>
<p id="StartLogs__p5755113441120">false</p>
</td>
</tr>
<tr id="StartLogs__row15751734141119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="StartLogs__p15755163401116">period</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="StartLogs__p975573414115">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="StartLogs__p97551734181110">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="StartLogs__p127551434111112"><strong id="StartLogs__b575583411115">Definition</strong>:</p>
<p id="StartLogs__p9755153417119">Cluster log backup start time.</p>
<p id="StartLogs__p1275523417114"><strong id="StartLogs__b107553340117">Constraints</strong>:</p>
<p id="StartLogs__p17553348114">Format: Greenwich Mean Time (GMT).</p>
<p id="StartLogs__p27551934101111"><strong id="StartLogs__b107551347114">Value range</strong>:</p>
<p id="StartLogs__p187552341112">N/A</p>
<p id="StartLogs__p117551534161114"><strong id="StartLogs__b157557342115">Default value</strong>:</p>
<p id="StartLogs__p127554344117">N/A</p>
</td>
</tr>
<tr id="StartLogs__row16751153420118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="StartLogs__p15755203415119">index_prefix</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="StartLogs__p175693471110">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="StartLogs__p137561734171112">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="StartLogs__p1375612349117"><strong id="StartLogs__b187561334101115">Parameter description</strong>:</p>
<p id="StartLogs__p117568340119">Index prefix for storing logs.</p>
<p id="StartLogs__p1675683401118"><strong id="StartLogs__b1875643421115">Constraints</strong>:</p>
<p id="StartLogs__p475613414111">This parameter is mandatory when action is set to real_time_log_collect.</p>
<p id="StartLogs__p27563346117"><strong id="StartLogs__b1375620348111">Options</strong>:</p>
<p id="StartLogs__p9756163411111">N/A</p>
<p id="StartLogs__p77561734171110"><strong id="StartLogs__b37561434101113">Default value</strong>:</p>
<p id="StartLogs__p575683411111">N/A</p>
</td>
</tr>
<tr id="StartLogs__row1875113491113"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="StartLogs__p1675683441116">keep_days</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="StartLogs__p3756183414113">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="StartLogs__p8756193419113">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="StartLogs__p197561634151113"><strong id="StartLogs__b157571034161114">Parameter description</strong>:</p>
<p id="StartLogs__p7757123414117">Number of days for log retention.</p>
<p id="StartLogs__p20757123414111"><strong id="StartLogs__b187574342117">Constraints</strong>:</p>
<p id="StartLogs__p57571434101112">This parameter is mandatory when action is set to real_time_log_collect.</p>
<p id="StartLogs__p187571348110"><strong id="StartLogs__b12757123418114">Options</strong>:</p>
<p id="StartLogs__p075793418113">1-3650</p>
<p id="StartLogs__p6757133461117"><strong id="StartLogs__b167571734201112">Default value</strong>:</p>
<p id="StartLogs__p1757134181116">N/A</p>
</td>
</tr>
<tr id="StartLogs__row4751153411110"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="StartLogs__p1875703411112">target_cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="StartLogs__p5757534101119">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="StartLogs__p1675793481114">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="StartLogs__p475753418117"><strong id="StartLogs__b275793411113">Definition</strong>:</p>
<p id="StartLogs__p1757113410119">ID of the target cluster for log storage.</p>
<p id="StartLogs__p107579341114"><strong id="StartLogs__b0757133419119">Constraints</strong>:</p>
<ul id="StartLogs__ul1775753481118"><li id="StartLogs__li1375719349118"><p id="StartLogs__p5757173412118"><a name="StartLogs__li1375719349118"></a><a name="li1375719349118"></a>The target cluster can be the current cluster or another Elasticsearch cluster. If logs are saved to another cluster, you need to use the <a href="StartTargetClusterConnectivityTest.html">connectivity testing</a> API to test connectivity to the target cluster. If status code 200 is returned, the target cluster can be reached. Otherwise, you need to select another target cluster.</p>
</li><li id="StartLogs__li147585348113"><p id="StartLogs__p17581834121114"><a name="StartLogs__li147585348113"></a><a name="li147585348113"></a>This parameter is mandatory when action is set to real_time_log_collect.</p>
</li></ul>
<p id="StartLogs__p1075813411119"><strong id="StartLogs__b5758183441119">Value range</strong>:</p>
<p id="StartLogs__p187581634101110">N/A</p>
<p id="StartLogs__p1375811346118"><strong id="StartLogs__b1375883491119">Default value</strong>:</p>
<p id="StartLogs__p4758153491119">N/A</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="StartLogs__section1975893461112"><h4 class="sectiontitle">Response Parameters</h4><p id="StartLogs__p187582034101112"><strong id="StartLogs__b127581034181119">Status code: 200</strong></p>
<p id="StartLogs__p3758203420119">Request succeeded.</p>
<p id="StartLogs__p27585342111">None</p>
</div>
<div class="section" id="StartLogs__section4758133461114"><h4 class="sectiontitle">Example Requests</h4><ul id="StartLogs__ul475853491113"><li id="StartLogs__li4758734191112"><p id="StartLogs__p197581734171118"><a name="StartLogs__li4758734191112"></a><a name="li4758734191112"></a>Enable the log backup function.</p>
<pre class="screen" id="StartLogs__screen1575813419119">POST https://{Endpoint}/v1.0/{project_id}/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/logs/open
{
"agency" : "css_obs_agency",
"log_base_path" : "css_repository/logs",
"log_Bucket" : "000-words",
"auto_enable" : true,
"period" : "00:00 GMT+08:00"
}</pre>
</li><li id="StartLogs__li1575933481110"><p id="StartLogs__p1175973421115"><a name="StartLogs__li1575933481110"></a><a name="li1575933481110"></a>Enable real-time log collection function.</p>
<pre class="screen" id="StartLogs__screen8759103471111">POST https://{Endpoint}/v1.0/{project_id}/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/logs/open?action=real_time_log_collect
{
"index_prefix" : "css_log",
"keep_days" : 30,
"target_cluster_id" : "4f3deec3-efa8-4598-bf91-560aad1377a3"
}</pre>
</li></ul>
</div>
<div class="section" id="StartLogs__section1775963411113"><h4 class="sectiontitle">Example Responses</h4><p id="StartLogs__p4760143431111">None</p>
</div>
<div class="section" id="StartLogs__section08785346112"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="StartLogs__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="StartLogs__row97703349118"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="StartLogs__p12878734141119">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="StartLogs__p7878334101114">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="StartLogs__row8770534191117"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="StartLogs__p1987943461120">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="StartLogs__p8879113414117">Request succeeded.</p>
</td>
</tr>
<tr id="StartLogs__row127701234181117"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="StartLogs__p7879183413113">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="StartLogs__p16879123421116">Invalid request.</p>
<p id="StartLogs__p138791934121117">Modify the request before retry.</p>
</td>
</tr>
<tr id="StartLogs__row377093491115"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="StartLogs__p6879183418113">409</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="StartLogs__p6879183471113">The request could not be completed due to a conflict with the current state of the resource.</p>
<p id="StartLogs__p787993441116">The resource that the client attempts to create already exists, or the update request fails to be processed because of a conflict.</p>
</td>
</tr>
<tr id="StartLogs__row10770173416114"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="StartLogs__p118791034161117">412</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="StartLogs__p198795347117">The server did not meet one of the preconditions contained in the request.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="StartLogs__section1687933421110"><h4 class="sectiontitle">Error Codes</h4><p id="StartLogs__p13879334141120">See <a href="css_03_0076.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="log_management.html">Log Management</a></div>
</div>
</div>