doc-exports/docs/ces/api-ref/en-us_topic_0032831274.html
Yang, Tong d75e275491 CES API 20241015 version
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2024-10-22 11:17:42 +00:00

330 lines
28 KiB
HTML

<a name="en-us_topic_0032831274"></a><a name="en-us_topic_0032831274"></a>
<h1 class="topictitle1">Adding Monitoring Data</h1>
<div id="body1467891755154"><div class="section" id="en-us_topic_0032831274__section66578044"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0032831274__p65561530">This API is used to add one or more pieces of custom metric monitoring data to solve the problem that the system metrics cannot meet specific service requirements.</p>
<p id="en-us_topic_0032831274__p1630394516148">For details about the monitoring data retention period, see <a href="https://docs.otc.t-systems.com/cloud-eye/umn/faqs/general_consulting/how_long_is_metric_data_retained.html#ces-faq-0010" target="_blank" rel="noopener noreferrer">How Long Is Metric Data Retained?</a></p>
</div>
<div class="section" id="en-us_topic_0032831274__section62331491"><h4 class="sectiontitle">URI</h4><p id="en-us_topic_0032831274__p48490504">POST /V1.0/{project_id}/metric-data</p>
<ul id="en-us_topic_0032831274__ul8883693"><li id="en-us_topic_0032831274__li33761356">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0032831274__table75058417558" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0032831274__row6325008217558"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.2.3.1.1.2.4.1.1"><p id="en-us_topic_0032831274__p2298303317558">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24%" id="mcps1.3.2.3.1.1.2.4.1.2"><p id="en-us_topic_0032831274__p4968641317558">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59%" id="mcps1.3.2.3.1.1.2.4.1.3"><p id="en-us_topic_0032831274__p6517651717558">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0032831274__row4480653817558"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="en-us_topic_0032831274__p545094717558">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="en-us_topic_0032831274__p3887356117558">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="en-us_topic_0032831274__p6175070717558">Specifies the project ID.</p>
<p id="en-us_topic_0032831274__p92930451060">For details about how to obtain the project ID, see <a href="ces_03_0057.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="en-us_topic_0032831274__section24112512"><h4 class="sectiontitle">Request</h4><div class="notice" id="en-us_topic_0032831274__note2280575010320"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ol id="en-us_topic_0032831274__ol4789596114407"><li id="en-us_topic_0032831274__li349092214407">The size of a POST request cannot exceed 512 KB. Otherwise, the request will be denied.</li><li id="en-us_topic_0032831274__li19685394144011">The period for sending POST requests must be shorter than the minimum aggregation period. Otherwise, the aggregated data will be noncontinuous. For example, if the aggregation period is 5 minutes and the POST request sending period is 7 minutes, the data will be aggregated every 10 minutes, rather than 5 minutes.</li><li id="en-us_topic_0032831274__li33246118144016">Timestamp (collect_time) in the POST request body value must be within the period that starts from three days before the current time to 10 minutes after the current time. If it is not in this range, you are not allowed to insert the metric data.</li></ol>
</div></div>
<ul id="en-us_topic_0032831274__ul9424035"><li id="en-us_topic_0032831274__li25017536">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0032831274__table69011263247" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0032831274__row1990162672413"><th align="left" class="cellrowborder" valign="top" width="18.488151184881513%" id="mcps1.3.3.3.1.1.2.5.1.1"><p id="en-us_topic_0032831274__p7901112618245">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.358064193580642%" id="mcps1.3.3.3.1.1.2.5.1.2"><p id="en-us_topic_0032831274__p20901226192419">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.158584141585843%" id="mcps1.3.3.3.1.1.2.5.1.3"><p id="en-us_topic_0032831274__p156351519585">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="47.995200479952004%" id="mcps1.3.3.3.1.1.2.5.1.4"><p id="en-us_topic_0032831274__p16901182616246">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0032831274__row12901726192414"><td class="cellrowborder" valign="top" width="18.488151184881513%" headers="mcps1.3.3.3.1.1.2.5.1.1 "><p id="en-us_topic_0032831274__p490182682418">Array elements</p>
</td>
<td class="cellrowborder" valign="top" width="19.358064193580642%" headers="mcps1.3.3.3.1.1.2.5.1.2 "><p id="en-us_topic_0032831274__p6399215102813">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="14.158584141585843%" headers="mcps1.3.3.3.1.1.2.5.1.3 "><p id="en-us_topic_0032831274__p96355193820">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="47.995200479952004%" headers="mcps1.3.3.3.1.1.2.5.1.4 "><p id="en-us_topic_0032831274__p8453601350">Specifies whether to add one or more pieces of custom metric monitoring data.</p>
<p id="en-us_topic_0032831274__p164509304268">For details, see <a href="#en-us_topic_0032831274__table15597145972912">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="en-us_topic_0032831274__table15597145972912"></a><a name="table15597145972912"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0032831274__table15597145972912" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Array elements</caption><thead align="left"><tr id="en-us_topic_0032831274__row12596175911297"><th align="left" class="cellrowborder" valign="top" width="16.82831716828317%" id="mcps1.3.3.3.1.2.2.5.1.1"><p id="en-us_topic_0032831274__p459695919298">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.398460153984603%" id="mcps1.3.3.3.1.2.2.5.1.2"><p id="en-us_topic_0032831274__p0596195982919">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.44855514448555%" id="mcps1.3.3.3.1.2.2.5.1.3"><p id="en-us_topic_0032831274__p195961259182914">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.324667533246675%" id="mcps1.3.3.3.1.2.2.5.1.4"><p id="en-us_topic_0032831274__p6596105917294">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0032831274__row1159685916291"><td class="cellrowborder" valign="top" width="16.82831716828317%" headers="mcps1.3.3.3.1.2.2.5.1.1 "><p id="en-us_topic_0032831274__p16596175912299">metric</p>
</td>
<td class="cellrowborder" valign="top" width="15.398460153984603%" headers="mcps1.3.3.3.1.2.2.5.1.2 "><p id="en-us_topic_0032831274__p35961659102918">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.44855514448555%" headers="mcps1.3.3.3.1.2.2.5.1.3 "><p id="en-us_topic_0032831274__p2596135972910">Object</p>
</td>
<td class="cellrowborder" valign="top" width="53.324667533246675%" headers="mcps1.3.3.3.1.2.2.5.1.4 "><p id="en-us_topic_0032831274__p13596125902911">Specifies the metric data.</p>
<p id="en-us_topic_0032831274__p3596115917293">For details, see <a href="#en-us_topic_0032831274__table25981459182914">Table 4</a>.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row559675942919"><td class="cellrowborder" valign="top" width="16.82831716828317%" headers="mcps1.3.3.3.1.2.2.5.1.1 "><p id="en-us_topic_0032831274__p559617598291">ttl</p>
</td>
<td class="cellrowborder" valign="top" width="15.398460153984603%" headers="mcps1.3.3.3.1.2.2.5.1.2 "><p id="en-us_topic_0032831274__p959635915296">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.44855514448555%" headers="mcps1.3.3.3.1.2.2.5.1.3 "><p id="en-us_topic_0032831274__p1659613599292">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="53.324667533246675%" headers="mcps1.3.3.3.1.2.2.5.1.4 "><p id="en-us_topic_0032831274__p26503316553">Specifies the data validity period. The unit is second.</p>
<p id="en-us_topic_0032831274__p422323511551">Supported range: 1 to 604800</p>
<p id="en-us_topic_0032831274__p1559611593298">If the validity period expires, the data will be automatically deleted.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row1259675992914"><td class="cellrowborder" valign="top" width="16.82831716828317%" headers="mcps1.3.3.3.1.2.2.5.1.1 "><p id="en-us_topic_0032831274__p10596195917298">collect_time</p>
</td>
<td class="cellrowborder" valign="top" width="15.398460153984603%" headers="mcps1.3.3.3.1.2.2.5.1.2 "><p id="en-us_topic_0032831274__p159665917293">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.44855514448555%" headers="mcps1.3.3.3.1.2.2.5.1.3 "><p id="en-us_topic_0032831274__p185961359172911">Long</p>
</td>
<td class="cellrowborder" valign="top" width="53.324667533246675%" headers="mcps1.3.3.3.1.2.2.5.1.4 "><p id="en-us_topic_0032831274__p12596659162918">Specifies when the data was collected.</p>
<p id="en-us_topic_0032831274__p85967595292">The time is UNIX timestamp (ms) format.</p>
<div class="note" id="en-us_topic_0032831274__note1959685972910"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="en-us_topic_0032831274__p19596125912910">Since there is a latency between the client and the server, the data timestamp to be inserted should be within the period that starts from three days before the current time plus 20s to 10 minutes after the current time minus 20s. In this way, the timestamp will be inserted to the database without being affected by the latency.</p>
</div></div>
</td>
</tr>
<tr id="en-us_topic_0032831274__row45971359172910"><td class="cellrowborder" valign="top" width="16.82831716828317%" headers="mcps1.3.3.3.1.2.2.5.1.1 "><p id="en-us_topic_0032831274__p14596145918295">value</p>
</td>
<td class="cellrowborder" valign="top" width="15.398460153984603%" headers="mcps1.3.3.3.1.2.2.5.1.2 "><p id="en-us_topic_0032831274__p7597105910296">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.44855514448555%" headers="mcps1.3.3.3.1.2.2.5.1.3 "><p id="en-us_topic_0032831274__p205972592299">Double</p>
</td>
<td class="cellrowborder" valign="top" width="53.324667533246675%" headers="mcps1.3.3.3.1.2.2.5.1.4 "><p id="en-us_topic_0032831274__p7597759102920">Specifies the monitoring metric data to be added, which can be an integer or a floating point number.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row1759725952912"><td class="cellrowborder" valign="top" width="16.82831716828317%" headers="mcps1.3.3.3.1.2.2.5.1.1 "><p id="en-us_topic_0032831274__p1759717593291">unit</p>
</td>
<td class="cellrowborder" valign="top" width="15.398460153984603%" headers="mcps1.3.3.3.1.2.2.5.1.2 "><p id="en-us_topic_0032831274__p759775962910">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.44855514448555%" headers="mcps1.3.3.3.1.2.2.5.1.3 "><p id="en-us_topic_0032831274__p459712593295">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.324667533246675%" headers="mcps1.3.3.3.1.2.2.5.1.4 "><p id="en-us_topic_0032831274__p19597259142919">Specifies the data unit.</p>
<p id="en-us_topic_0032831274__p2597125912915">Enter a maximum of 32 characters.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row5597359192912"><td class="cellrowborder" valign="top" width="16.82831716828317%" headers="mcps1.3.3.3.1.2.2.5.1.1 "><p id="en-us_topic_0032831274__p17597185912913">type</p>
</td>
<td class="cellrowborder" valign="top" width="15.398460153984603%" headers="mcps1.3.3.3.1.2.2.5.1.2 "><p id="en-us_topic_0032831274__p18597359182915">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.44855514448555%" headers="mcps1.3.3.3.1.2.2.5.1.3 "><p id="en-us_topic_0032831274__p759765902912">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.324667533246675%" headers="mcps1.3.3.3.1.2.2.5.1.4 "><p id="en-us_topic_0032831274__p175978596295">Specifies the enumerated type.</p>
<p id="en-us_topic_0032831274__p45971559172916">Possible types:</p>
<ul id="en-us_topic_0032831274__ul1459765915296"><li id="en-us_topic_0032831274__li3597165915299"><strong id="en-us_topic_0032831274__b8885101311569">int</strong></li><li id="en-us_topic_0032831274__li759755919291"><strong id="en-us_topic_0032831274__b898082405618">float</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="en-us_topic_0032831274__table25981459182914"></a><a name="table25981459182914"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0032831274__table25981459182914" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="en-us_topic_0032831274__b1392181471310">metric</strong> data structure description</caption><thead align="left"><tr id="en-us_topic_0032831274__row85971559132918"><th align="left" class="cellrowborder" valign="top" width="16.89%" id="mcps1.3.3.3.1.3.2.5.1.1"><p id="en-us_topic_0032831274__p13597659192914">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.079999999999998%" id="mcps1.3.3.3.1.3.2.5.1.2"><p id="en-us_topic_0032831274__p559715915293">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.77%" id="mcps1.3.3.3.1.3.2.5.1.3"><p id="en-us_topic_0032831274__p65972593292">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.26%" id="mcps1.3.3.3.1.3.2.5.1.4"><p id="en-us_topic_0032831274__p12597155916298">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0032831274__row1597359202910"><td class="cellrowborder" valign="top" width="16.89%" headers="mcps1.3.3.3.1.3.2.5.1.1 "><p id="en-us_topic_0032831274__p85971859122915">namespace</p>
</td>
<td class="cellrowborder" valign="top" width="15.079999999999998%" headers="mcps1.3.3.3.1.3.2.5.1.2 "><p id="en-us_topic_0032831274__p1559714593291">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.77%" headers="mcps1.3.3.3.1.3.2.5.1.3 "><p id="en-us_topic_0032831274__p659745920295">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.26%" headers="mcps1.3.3.3.1.3.2.5.1.4 "><p id="en-us_topic_0032831274__p359775942912">Specifies the customized namespace. For details, see <a href="ces_03_0059.html">Services Interconnected with Cloud Eye</a>.</p>
<p id="en-us_topic_0032831274__p25971059162912">The namespace must be in the <strong id="en-us_topic_0032831274__b1914217271041">service.item</strong> format and contain 3 to 32 characters. <strong id="en-us_topic_0032831274__b181444271645">service</strong> and <strong id="en-us_topic_0032831274__b19145112711415">item</strong> each must start with a letter and contain only letters, digits, and underscores (_). In addition, <strong id="en-us_topic_0032831274__b842352706142346">service</strong> cannot start with <strong id="en-us_topic_0032831274__b842352706195554">SYS</strong>, <strong id="en-us_topic_0032831274__b1439514211911">AGT</strong>, or <strong id="en-us_topic_0032831274__b16419238348">SRE</strong>, and <strong id="en-us_topic_0032831274__b15228318233">namespace</strong> cannot be <strong id="en-us_topic_0032831274__b673317442232">SERVICE.BMS</strong> because this namespace has been used by the system.</p>
<p id="en-us_topic_0032831274__p1776917163378">You can leave this parameter blank when you set <strong id="en-us_topic_0032831274__b891731774216">alarm_type</strong> to <strong id="en-us_topic_0032831274__b391710178424">(EVENT.SYS| EVENT.CUSTOM)</strong>.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row1359816597294"><td class="cellrowborder" valign="top" width="16.89%" headers="mcps1.3.3.3.1.3.2.5.1.1 "><p id="en-us_topic_0032831274__p159710595297">dimensions</p>
</td>
<td class="cellrowborder" valign="top" width="15.079999999999998%" headers="mcps1.3.3.3.1.3.2.5.1.2 "><p id="en-us_topic_0032831274__p259755917297">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.77%" headers="mcps1.3.3.3.1.3.2.5.1.3 "><p id="en-us_topic_0032831274__p9597195912910">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="53.26%" headers="mcps1.3.3.3.1.3.2.5.1.4 "><p id="en-us_topic_0032831274__p5555162513185">Specifies the metric dimension. A maximum of three dimensions are supported.</p>
<p id="en-us_topic_0032831274__p1059865922919">For details, see <a href="#en-us_topic_0032831274__table17598459112913">Table 5</a>.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row2598185982914"><td class="cellrowborder" valign="top" width="16.89%" headers="mcps1.3.3.3.1.3.2.5.1.1 "><p id="en-us_topic_0032831274__p20598165962911">metric_name</p>
</td>
<td class="cellrowborder" valign="top" width="15.079999999999998%" headers="mcps1.3.3.3.1.3.2.5.1.2 "><p id="en-us_topic_0032831274__p15598155952914">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.77%" headers="mcps1.3.3.3.1.3.2.5.1.3 "><p id="en-us_topic_0032831274__p10598859142911">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.26%" headers="mcps1.3.3.3.1.3.2.5.1.4 "><p id="en-us_topic_0032831274__p12598145916293">Specifies the metric ID. For example, if the monitoring metric of an ECS is CPU usage, <strong id="en-us_topic_0032831274__b113361103124">metric_name</strong> is <strong id="en-us_topic_0032831274__b46248314129">cpu_util</strong>. For details, see <a href="ces_03_0059.html">Services Interconnected with Cloud Eye</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="en-us_topic_0032831274__table17598459112913"></a><a name="table17598459112913"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0032831274__table17598459112913" frame="border" border="1" rules="all"><caption><b>Table 5 </b><strong id="en-us_topic_0032831274__b6336108141016">dimensions</strong> data structure description</caption><thead align="left"><tr id="en-us_topic_0032831274__row8598125902919"><th align="left" class="cellrowborder" valign="top" width="16.48%" id="mcps1.3.3.3.1.4.2.5.1.1"><p id="en-us_topic_0032831274__p359817594295">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.479999999999999%" id="mcps1.3.3.3.1.4.2.5.1.2"><p id="en-us_topic_0032831274__p9598205915295">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.85%" id="mcps1.3.3.3.1.4.2.5.1.3"><p id="en-us_topic_0032831274__p1459815952919">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.190000000000005%" id="mcps1.3.3.3.1.4.2.5.1.4"><p id="en-us_topic_0032831274__p859895992917">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0032831274__row8598159182915"><td class="cellrowborder" valign="top" width="16.48%" headers="mcps1.3.3.3.1.4.2.5.1.1 "><p id="en-us_topic_0032831274__p15598175962919">name</p>
</td>
<td class="cellrowborder" valign="top" width="15.479999999999999%" headers="mcps1.3.3.3.1.4.2.5.1.2 "><p id="en-us_topic_0032831274__p155988590299">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.85%" headers="mcps1.3.3.3.1.4.2.5.1.3 "><p id="en-us_topic_0032831274__p1598559162920">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.190000000000005%" headers="mcps1.3.3.3.1.4.2.5.1.4 "><p id="en-us_topic_0032831274__p35981959192919">Specifies the dimension. For example, the ECS dimension is <strong id="en-us_topic_0032831274__b7962131715816">instance_id</strong>. For details about the dimension of each service, see the <strong id="en-us_topic_0032831274__b169716222317">key</strong> column in <a href="ces_03_0059.html">Services Interconnected with Cloud Eye</a>.</p>
<p id="en-us_topic_0032831274__p7598105962915">Start with a letter. Enter 1 to 32 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row5598165922910"><td class="cellrowborder" valign="top" width="16.48%" headers="mcps1.3.3.3.1.4.2.5.1.1 "><p id="en-us_topic_0032831274__p1959813591292">value</p>
</td>
<td class="cellrowborder" valign="top" width="15.479999999999999%" headers="mcps1.3.3.3.1.4.2.5.1.2 "><p id="en-us_topic_0032831274__p859875982912">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.85%" headers="mcps1.3.3.3.1.4.2.5.1.3 "><p id="en-us_topic_0032831274__p659810594292">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.190000000000005%" headers="mcps1.3.3.3.1.4.2.5.1.4 "><p id="en-us_topic_0032831274__p135981599298">Specifies the dimension value, for example, an ECS ID.</p>
<p id="en-us_topic_0032831274__p1659865972911">Start with a letter or a digit. Enter 1 to 256 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0032831274__ul60745976155449"><li id="en-us_topic_0032831274__li9842876155449">Example request<div class="p" id="en-us_topic_0032831274__p390872733714"><a name="en-us_topic_0032831274__li9842876155449"></a><a name="li9842876155449"></a>Example request 1: Add <strong id="en-us_topic_0032831274__b5500157181719">cpu_util</strong> data of a custom dimension. The instance ID is <strong id="en-us_topic_0032831274__b154814681719">6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d</strong>.<pre class="screen" id="en-us_topic_0032831274__screen857912418377">[
{
"metric": {
"namespace": "MINE.APP",
"dimensions": [
{
"name": "instance_id",
"value": "6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d"
}
],
"metric_name": "cpu_util"
},
"ttl": 172800,
"collect_time": 1463598260000,
"type": "float",
"value": 0.09,
"unit": "%"
},
{
"metric": {
"namespace": "MINE.APP",
"dimensions": [
{
"name": "instance_id",
"value": "6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d"
}
],
"metric_name": "cpu_util"
},
"ttl": 172800,
"collect_time": 1463598270000,
"type": "float",
"value": 0.12,
"unit": "%"
}
]</pre>
</div>
<div class="p" id="en-us_topic_0032831274__p134312269499">Example request 2: Add <strong id="en-us_topic_0032831274__b7561826191818">rds021_myisam_buf_usage</strong> data of the RDS instance whose <strong id="en-us_topic_0032831274__b1856645712187">rds_cluster_id</strong> is <strong id="en-us_topic_0032831274__b5224191071913">3c8cc15614ab46f5b8743317555e0de2in01</strong>.<pre class="screen" id="en-us_topic_0032831274__screen634392610492">[
{
"metric": {
"namespace": "SYS.RDS",
"dimensions": [
{
"name": "rds_cluster_id",
"value": "3c8cc15614ab46f5b8743317555e0de2in01"
}
],
"metric_name": "rds021_myisam_buf_usage"
},
"ttl": 172800,
"collect_time": 1463598260000,
"type": "float",
"value": 0.01,
"unit": "Ratio"
}
]</pre>
</div>
</li></ul>
</div>
<div class="section" id="en-us_topic_0032831274__section15686020"><h4 class="sectiontitle">Response</h4><p id="en-us_topic_0032831274__p3819252120917">The response has no message body.</p>
</div>
<div class="section" id="en-us_topic_0032831274__section6956456"><h4 class="sectiontitle">Returned Values</h4><ul id="en-us_topic_0032831274__ul20226985"><li id="en-us_topic_0032831274__li47825138">Normal<p id="en-us_topic_0032831274__p27773061"><a name="en-us_topic_0032831274__li47825138"></a><a name="li47825138"></a>201</p>
</li><li id="en-us_topic_0032831274__li48630964">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0032831274__table46793998" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0032831274__row65573909"><th align="left" class="cellrowborder" valign="top" width="32.519999999999996%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="en-us_topic_0032831274__p1849030182924">Returned Value</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="67.47999999999999%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="en-us_topic_0032831274__p15553712182924">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0032831274__row37564172"><td class="cellrowborder" valign="top" width="32.519999999999996%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="en-us_topic_0032831274__p581987519168">400 Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="67.47999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="en-us_topic_0032831274__p164784039168">Request error.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row66248115"><td class="cellrowborder" valign="top" width="32.519999999999996%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="en-us_topic_0032831274__p2691669168">401 Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="67.47999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="en-us_topic_0032831274__p218024949168">The authentication information is not provided or is incorrect.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row44282627"><td class="cellrowborder" valign="top" width="32.519999999999996%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="en-us_topic_0032831274__p563264059168">403 Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="67.47999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="en-us_topic_0032831274__p661449719168">Access to the requested page is forbidden.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row1815156"><td class="cellrowborder" valign="top" width="32.519999999999996%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="en-us_topic_0032831274__p355199299168">408 Request Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="67.47999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="en-us_topic_0032831274__p585420329168">The request timed out.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row25675773"><td class="cellrowborder" valign="top" width="32.519999999999996%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="en-us_topic_0032831274__p630127129168">429 Too Many Requests</p>
</td>
<td class="cellrowborder" valign="top" width="67.47999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="en-us_topic_0032831274__p37560249168">Concurrent requests are excessive.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row47530006"><td class="cellrowborder" valign="top" width="32.519999999999996%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="en-us_topic_0032831274__p537873819168">500 Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="67.47999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="en-us_topic_0032831274__p618106189168">Failed to complete the request because of an internal service error.</p>
</td>
</tr>
<tr id="en-us_topic_0032831274__row20561848"><td class="cellrowborder" valign="top" width="32.519999999999996%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="en-us_topic_0032831274__p298930079168">503 Service Unavailable</p>
</td>
<td class="cellrowborder" valign="top" width="67.47999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="en-us_topic_0032831274__p54144829168">The service is currently unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="en-us_topic_0032831274__section172711834720"><h4 class="sectiontitle">Error Codes</h4><p id="en-us_topic_0032831274__ces_03_0020_p91851023153416">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ces_03_0032.html">Monitoring Data</a></div>
</div>
</div>