forked from docs/doc-exports
Reviewed-by: Ziuzko, Alevtina <alevtina.ziuzko@t-systems.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
336 lines
28 KiB
HTML
336 lines
28 KiB
HTML
<a name="ces_03_0066"></a><a name="ces_03_0066"></a>
|
|
|
|
<h1 class="topictitle1">Updating a Custom Alarm Template</h1>
|
|
<div id="body1604373162219"><div class="section" id="ces_03_0066__section690717184830"><h4 class="sectiontitle">Function</h4><p id="ces_03_0066__p55948112184830">This API is used to update a custom alarm template.</p>
|
|
</div>
|
|
<div class="section" id="ces_03_0066__section33770965184830"><h4 class="sectiontitle">URI</h4><p id="ces_03_0066__p44943671184830">PUT /V1.0/{project_id}/alarm-template/{template_id}</p>
|
|
<ul id="ces_03_0066__ul51093634184830"><li id="ces_03_0066__li1839861184830">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0066__table16558749184830" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="ces_03_0066__row13099266184830"><th align="left" class="cellrowborder" valign="top" width="19.39%" id="mcps1.3.2.3.1.1.2.4.1.1"><p id="ces_03_0066__p54407610184830">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.41%" id="mcps1.3.2.3.1.1.2.4.1.2"><p id="ces_03_0066__p44940266184830">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60.199999999999996%" id="mcps1.3.2.3.1.1.2.4.1.3"><p id="ces_03_0066__p16282939184830">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ces_03_0066__row43849684184830"><td class="cellrowborder" valign="top" width="19.39%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="ces_03_0066__p62163550184830">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.41%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="ces_03_0066__p2082817184830">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.199999999999996%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="ces_03_0066__p42316702175455">Specifies the project ID.</p>
|
|
<p id="ces_03_0066__p191415137612">For details about how to obtain the project ID, see <a href="ces_03_0057.html">Obtaining a Project ID</a>.</p>
|
|
<p id="ces_03_0066__en-us_topic_0000001646899046_p18100524114814">Minimum: <strong id="ces_03_0066__b44831516043819">1</strong></p>
|
|
<p id="ces_03_0066__en-us_topic_0000001646899046_p81001524104817">Maximum: <strong id="ces_03_0066__b139772587483226">64</strong></p>
|
|
<p id="ces_03_0066__p4697184133915"><strong id="ces_03_0066__b97064943725013">Regular expression matching</strong>: ^[a-zA-Z0-9-]{1,64}$</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row33641621125512"><td class="cellrowborder" valign="top" width="19.39%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="ces_03_0066__p3365192155510">template_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.41%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="ces_03_0066__p15365321185512">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.199999999999996%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="ces_03_0066__p6365921175520">Specifies the ID of the custom alarm template you want to update.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="ces_03_0066__ul42264495184830"><li id="ces_03_0066__li44836139184830">Example<pre class="screen" id="ces_03_0066__screen1381185164515">PUT https://{Cloud Eye endpoint}/V1.0/{project_id}/alarm-template/{template_id}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="ces_03_0066__section7848679184830"><h4 class="sectiontitle">Request</h4><ul id="ces_03_0066__ul31763230184830"><li id="ces_03_0066__li17433620184830">Request parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0066__table22684858184830" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="ces_03_0066__row36700749184830"><th align="left" class="cellrowborder" valign="top" width="22.77777777777778%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="ces_03_0066__p19970684184830">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.454545454545453%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="ces_03_0066__p7012732184830">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.18181818181818%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="ces_03_0066__p31160437184830">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="46.58585858585859%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="ces_03_0066__p40967438184830">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ces_03_0066__row30028143184830"><td class="cellrowborder" valign="top" width="22.77777777777778%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="ces_03_0066__p182121331203419">template_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.454545454545453%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="ces_03_0066__p821211316342">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.18181818181818%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="ces_03_0066__p396920163511">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.58585858585859%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="ces_03_0066__p132126313341">Specifies the name of the custom alarm template. The name can contain 1 to 128 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row6976698184830"><td class="cellrowborder" valign="top" width="22.77777777777778%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="ces_03_0066__p9212203112341">template_description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.454545454545453%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="ces_03_0066__p221283112341">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.18181818181818%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="ces_03_0066__p129697012356">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.58585858585859%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="ces_03_0066__p162124314343">Provides supplementary information about the custom alarm template. The description can contain 0 to 256 characters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row55869026184830"><td class="cellrowborder" valign="top" width="22.77777777777778%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="ces_03_0066__p12212143193417">namespace</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.454545454545453%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="ces_03_0066__p14212153143417">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.18181818181818%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="ces_03_0066__p496970113512">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.58585858585859%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="ces_03_0066__p20212103111344">Specifies the resource type selected for creating the custom alarm template, that is, the service namespace. For example, if you select ECS, <strong id="ces_03_0066__b122911591344">namespace</strong> is <strong id="ces_03_0066__b105991334153717">SYS.ECS</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row52573824184830"><td class="cellrowborder" valign="top" width="22.77777777777778%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="ces_03_0066__p121233143413">dimension_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.454545454545453%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="ces_03_0066__p1221263133419">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.18181818181818%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="ces_03_0066__p596913019359">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.58585858585859%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="ces_03_0066__p192123318349">Specifies the dimension corresponding to the resource type. If ECS is selected, the dimension is ECS and <strong id="ces_03_0066__b121590339496">dimension_name</strong> is <strong id="ces_03_0066__b81602033174917">instance_id</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row33885327184830"><td class="cellrowborder" valign="top" width="22.77777777777778%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="ces_03_0066__p11212031103419">template_items</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.454545454545453%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="ces_03_0066__p142125310340">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.18181818181818%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="ces_03_0066__p1496919010350">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.58585858585859%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="ces_03_0066__p3212193173414">Specifies the alarm rules that you add to the custom alarm template. You can add up to 20 alarm rules.</p>
|
|
<p id="ces_03_0066__p7611291362">For details, see <a href="#ces_03_0066__table240293625811">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ces_03_0066__table240293625811"></a><a name="table240293625811"></a><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0066__table240293625811" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="ces_03_0066__b20261191195610">template_items</strong> data structure description</caption><thead align="left"><tr id="ces_03_0066__row4402133616588"><th align="left" class="cellrowborder" valign="top" width="22.73%" id="mcps1.3.3.2.1.2.2.5.1.1"><p id="ces_03_0066__p640203695820">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.52%" id="mcps1.3.3.2.1.2.2.5.1.2"><p id="ces_03_0066__p19403336105819">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.479999999999999%" id="mcps1.3.3.2.1.2.2.5.1.3"><p id="ces_03_0066__p11403193605811">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="46.27%" id="mcps1.3.3.2.1.2.2.5.1.4"><p id="ces_03_0066__p2040333615811">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ces_03_0066__row104031363584"><td class="cellrowborder" valign="top" width="22.73%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="ces_03_0066__p53452177395">metric_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.52%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="ces_03_0066__p163351124113915">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.479999999999999%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="ces_03_0066__p19345101710394">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.27%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="ces_03_0066__p136918264293">Specifies the metric you add to the custom alarm template. For example, you can add ECS <strong id="ces_03_0066__b292422512368">cpu_util</strong>.</p>
|
|
<p id="ces_03_0066__p134510173395">For the metric names of each resource, see <a href="ces_03_0059.html">Services Interconnected with Cloud Eye</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row13403183617582"><td class="cellrowborder" valign="top" width="22.73%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="ces_03_0066__p113451917153910">condition</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.52%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="ces_03_0066__p7334172423920">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.479999999999999%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="ces_03_0066__p1534581719399">Condition object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.27%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="ces_03_0066__p17345217183913">Specifies the alarm policy you created for the custom alarm template.</p>
|
|
<p id="ces_03_0066__p1560054114367">For details, see <a href="#ces_03_0066__table6403153675817">Table 4</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row1240313645815"><td class="cellrowborder" valign="top" width="22.73%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="ces_03_0066__p1034519174399">alarm_level</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.52%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="ces_03_0066__p11334162413397">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.479999999999999%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="ces_03_0066__p113456172392">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.27%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="ces_03_0066__p12449921820">Specifies the alarm severity.</p>
|
|
<p id="ces_03_0066__p103456175393">Possible severities are <strong id="ces_03_0066__b1566512384185">1</strong> (critical), <strong id="ces_03_0066__b11411675199">2 </strong>(major), <strong id="ces_03_0066__b84235270610931">3</strong> (minor), and <strong id="ces_03_0066__b84235270610934">4</strong> (informational).</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ces_03_0066__table6403153675817"></a><a name="table6403153675817"></a><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0066__table6403153675817" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="ces_03_0066__b114326143815">condition</strong> data structure description</caption><thead align="left"><tr id="ces_03_0066__row440363619582"><th align="left" class="cellrowborder" valign="top" width="23.36%" id="mcps1.3.3.2.1.3.2.5.1.1"><p id="ces_03_0066__p7403203685811">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.37%" id="mcps1.3.3.2.1.3.2.5.1.2"><p id="ces_03_0066__p16304193794413">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.540000000000001%" id="mcps1.3.3.2.1.3.2.5.1.3"><p id="ces_03_0066__p14031736165817">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="49.730000000000004%" id="mcps1.3.3.2.1.3.2.5.1.4"><p id="ces_03_0066__p1540363613582">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ces_03_0066__row7403173613582"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0066__p53794974416">comparison_operator</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.37%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="ces_03_0066__p23041837124413">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.540000000000001%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="ces_03_0066__p8380159144415">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.730000000000004%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="ces_03_0066__p138089114410">Specifies the alarm threshold operator, which can be <strong id="ces_03_0066__b121872078643638">></strong>, <strong id="ces_03_0066__b117868613543638">=</strong>, <strong id="ces_03_0066__b9902261543638"><</strong>, <strong id="ces_03_0066__b64643041743638">>=</strong>, <strong id="ces_03_0066__b134074232743638"><=</strong>, or <strong id="ces_03_0066__b5781429543638">!=</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row16403133613589"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0066__p93803954411">count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.37%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="ces_03_0066__p10304103704419">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.540000000000001%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="ces_03_0066__p1038011913440">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.730000000000004%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="ces_03_0066__p638018917444">Specifies the number of consecutive occurrence times that the alarm policy was met. Supported range: <strong id="ces_03_0066__b557123218422">1</strong> to <strong id="ces_03_0066__b1758832154213">5</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row1940315362589"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0066__p13380149114411">filter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.37%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="ces_03_0066__p15304153734413">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.540000000000001%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="ces_03_0066__p183800924417">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.730000000000004%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="ces_03_0066__p872217558469">Specifies the data aggregation method. The value can be:</p>
|
|
<ul id="ces_03_0066__ul172245518469"><li id="ces_03_0066__li18722125534616"><strong id="ces_03_0066__b198319542623310">average</strong>: average value of metric data within an aggregation period.</li><li id="ces_03_0066__li18722855164610"><strong id="ces_03_0066__b9945746092345">max</strong>: maximum value of metric data in an aggregation period.</li><li id="ces_03_0066__li1172214555464"><strong id="ces_03_0066__b92888427524332">min</strong>: minimum value of metric data within an aggregation period.</li><li id="ces_03_0066__li11722455114617"><strong id="ces_03_0066__b80014539632210">sum</strong>: sum of metric data within an aggregation period.</li><li id="ces_03_0066__li2072275544613"><strong id="ces_03_0066__b192735397433230">variance</strong>: variance value of metric data within an aggregation period.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row2404636185811"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0066__p113805914417">period</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.37%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="ces_03_0066__p6304133718448">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.540000000000001%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="ces_03_0066__p5380290449">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.730000000000004%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="ces_03_0066__p4175457395641">Specifies how often Cloud Eye aggregates data.</p>
|
|
<p id="ces_03_0066__p4024684495641">The value can be:</p>
|
|
<ul id="ces_03_0066__ul22530818141337"><li id="ces_03_0066__li1214416181388"><strong id="ces_03_0066__b1513714512233">0</strong>: Event alarms are triggered immediately.</li><li id="ces_03_0066__li1450776141337"><strong id="ces_03_0066__b112948554148">1</strong>: Cloud Eye performs no aggregation and displays raw data.</li></ul>
|
|
<ul id="ces_03_0066__ul5025435916374"><li id="ces_03_0066__li1144664916374"><strong id="ces_03_0066__b251514861411">300</strong>: Cloud Eye aggregates data every 5 minutes.</li><li id="ces_03_0066__li2310812316374"><strong id="ces_03_0066__b15041905156">1200</strong>: Cloud Eye aggregates data every 20 minutes.</li><li id="ces_03_0066__li1347195716374"><strong id="ces_03_0066__b118181013159">3600</strong>: Cloud Eye aggregates data every hour.</li><li id="ces_03_0066__li713876916374"><strong id="ces_03_0066__b257612151513">14400</strong>: Cloud Eye aggregates data every 4 hours.</li><li id="ces_03_0066__li6259003216374"><strong id="ces_03_0066__b132921038156">86400</strong>: Cloud Eye aggregates data every 24 hours.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row640473613588"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0066__p638009194412">unit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.37%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="ces_03_0066__p16304137114418">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.540000000000001%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="ces_03_0066__p4380890445">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.730000000000004%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="ces_03_0066__p2250132314195">Specifies the data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs.</p>
|
|
<p id="ces_03_0066__p6250122371920">Minimum: <strong id="ces_03_0066__b53455617074735">0</strong></p>
|
|
<p id="ces_03_0066__p1525042311917">Maximum: <strong id="ces_03_0066__b1884063708157">32</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row114041136115810"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0066__p938017919445">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.37%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="ces_03_0066__p20304437184417">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.540000000000001%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="ces_03_0066__p1038010915441">Double</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.730000000000004%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="ces_03_0066__p138011913441">Specifies the alarm threshold. Range: <strong id="ces_03_0066__b202544291362">0</strong> to <strong id="ces_03_0066__b1225412298616">Number. MAX_VALUE (1.7976931348623157e+108)</strong> For detailed thresholds, see the value ranges of metrics in <a href="ces_03_0059.html">Services Interconnected with Cloud Eye</a>. For example, you can set ECS <strong id="ces_03_0066__b312117119259">cpu_util</strong> to <strong id="ces_03_0066__b16121141113258">80</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row440463625811"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0066__p14380149104410">suppress_duration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.37%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="ces_03_0066__p7304103718447">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.540000000000001%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="ces_03_0066__p7380149154414">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.730000000000004%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="ces_03_0066__p138834211039">Specifies the interval for triggering an alarm if the alarm persists.</p>
|
|
<p id="ces_03_0066__p16216025836">Possible intervals are as follows:</p>
|
|
<p id="ces_03_0066__p175414301737"><strong id="ces_03_0066__b254143016312">0</strong>: Cloud Eye triggers the alarm only once.</p>
|
|
<p id="ces_03_0066__p6431933636"><strong id="ces_03_0066__b8431833937">300</strong>: Cloud Eye triggers the alarm every 5 minutes.</p>
|
|
<p id="ces_03_0066__p178746366316"><strong id="ces_03_0066__b128741736335">600</strong>: Cloud Eye triggers the alarm every 10 minutes.</p>
|
|
<p id="ces_03_0066__p118015418319"><strong id="ces_03_0066__b15808415316">900</strong>: Cloud Eye triggers the alarm every 15 minutes.</p>
|
|
<p id="ces_03_0066__p14694814316"><strong id="ces_03_0066__b84594812312">1800</strong>: Cloud Eye triggers the alarm every 30 minutes.</p>
|
|
<p id="ces_03_0066__p101321851339"><strong id="ces_03_0066__b2013219518312">3600</strong>: Cloud Eye triggers the alarm every hour.</p>
|
|
<p id="ces_03_0066__p14221551310"><strong id="ces_03_0066__b22219553317">10800</strong>: Cloud Eye triggers the alarm every 3 hours.</p>
|
|
<p id="ces_03_0066__p5189358537"><strong id="ces_03_0066__b51891958139">21600</strong>: Cloud Eye triggers the alarm every 6 hours.</p>
|
|
<p id="ces_03_0066__p479617113418"><strong id="ces_03_0066__b3796611545">43200</strong>: Cloud Eye triggers the alarm every 12 hours.</p>
|
|
<p id="ces_03_0066__p183321040173911"><strong id="ces_03_0066__b137591235104417">86400</strong>: Cloud Eye triggers the alarm every day.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="ces_03_0066__ul34750592184830"><li id="ces_03_0066__li44319877184830">Example request<pre class="screen" id="ces_03_0066__screen4738031718551">{
|
|
"template_name": "alarmTemplate-Test01",
|
|
"template_description": "Updating a custom alarm template",
|
|
"namespace": "SYS.ECS",
|
|
"dimension_name": "instance_id",
|
|
"template_items": [
|
|
{
|
|
"metric_name": "cpu_util",
|
|
"condition": {
|
|
"period": 1,
|
|
"filter": "average",
|
|
"comparison_operator": ">=",
|
|
"value": 90,
|
|
"unit": "%",
|
|
"count": 3,
|
|
"suppress_duration": 300
|
|
},
|
|
"alarm_level": 2
|
|
},
|
|
{
|
|
"metric_name": "mem_util",
|
|
"condition": {
|
|
"period": 1,
|
|
"filter": "average",
|
|
"comparison_operator": ">=",
|
|
"value": 90,
|
|
"unit": "%",
|
|
"count": 3,
|
|
"suppress_duration": 600
|
|
},
|
|
"alarm_level": 2
|
|
}
|
|
]
|
|
}
|
|
</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="ces_03_0066__section41088852184830"><h4 class="sectiontitle">Response</h4><p id="ces_03_0066__p132804207613">The response has no message body.</p>
|
|
</div>
|
|
<div class="section" id="ces_03_0066__section55124147184830"><h4 class="sectiontitle">Returned Values</h4><ul id="ces_03_0066__ul35870885184830"><li id="ces_03_0066__li54402515184830">Normal<p id="ces_03_0066__p19860588184830"><a name="ces_03_0066__li54402515184830"></a><a name="li54402515184830"></a>204</p>
|
|
</li><li id="ces_03_0066__li44527571184830">Abnormal
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0066__table9852173623812" frame="border" border="1" rules="all"><thead align="left"><tr id="ces_03_0066__row985213612382"><th align="left" class="cellrowborder" valign="top" width="32.1%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="ces_03_0066__p1849030182924">Returned Values</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="67.9%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="ces_03_0066__p15553712182924">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ces_03_0066__row4852193611387"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0066__p581987519168">400 Bad Request</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0066__p164784039168">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row188531636193819"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0066__p2691669168">401 Unauthorized</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0066__p218024949168">The authentication information is not provided or is incorrect.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row118531636123816"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0066__p563264059168">403 Forbidden</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0066__p661449719168">Access to the requested page is forbidden.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row4853436123812"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0066__p355199299168">408 Request Timeout</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0066__p585420329168">The request timed out.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row1285303673812"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0066__p630127129168">429 Too Many Requests</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0066__p37560249168">Concurrent requests are excessive.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row1853336203811"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0066__p537873819168">500 Internal Server Error</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0066__p618106189168">Failed to complete the request because of an internal service error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ces_03_0066__row38537365385"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0066__p298930079168">503 Service Unavailable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0066__p54144829168">The service is currently unavailable.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="ces_03_0066__section1618385104615"><h4 class="sectiontitle">Error Codes</h4><p id="ces_03_0066__en-us_topic_0171212585_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_0026.html">Alarm Rules</a></div>
|
|
</div>
|
|
</div>
|
|
|