Files
doc-exports/docs/ces/api-ref/ces_03_0062.html
qiujiandong1 e9265fb6b0 CES API Update -20250521 version
Reviewed-by: Ziuzko, Alevtina <alevtina.ziuzko@t-systems.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2025-12-05 10:48:24 +00:00

352 lines
29 KiB
HTML

<a name="ces_03_0062"></a><a name="ces_03_0062"></a>
<h1 class="topictitle1">Creating a Custom Alarm Template</h1>
<div id="body1604373162219"><div class="section" id="ces_03_0062__section690717184830"><h4 class="sectiontitle">Function</h4><p id="ces_03_0062__p55948112184830">This API is used to create a custom alarm template to add alarm rules for one or more metrics.</p>
</div>
<div class="section" id="ces_03_0062__section33770965184830"><h4 class="sectiontitle">URI</h4><p id="ces_03_0062__p44943671184830">POST /V1.0/{project_id}/alarm-template</p>
<ul id="ces_03_0062__ul51093634184830"><li id="ces_03_0062__li1839861184830">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0062__table16558749184830" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="ces_03_0062__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_0062__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_0062__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_0062__p16282939184830">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0062__row43849684184830"><td class="cellrowborder" valign="top" width="19.39%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="ces_03_0062__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_0062__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_0062__p42316702175455">Specifies the project ID.</p>
<p id="ces_03_0062__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_0062__en-us_topic_0000001646899046_p18100524114814">Minimum: <strong id="ces_03_0062__b200056381043812">1</strong></p>
<p id="ces_03_0062__en-us_topic_0000001646899046_p81001524104817">Maximum: <strong id="ces_03_0062__b203180349783219">64</strong></p>
<p id="ces_03_0062__p4697184133915"><strong id="ces_03_0062__b11623540282502">Regular expression matching</strong>: ^[a-zA-Z0-9-]{1,64}$</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="ces_03_0062__ul42264495184830"><li id="ces_03_0062__li44836139184830">Example<pre class="screen" id="ces_03_0062__screen1381185164515">POST https://{Cloud Eye endpoint}/V1.0/{project_id}/alarm-template</pre>
</li></ul>
</div>
<div class="section" id="ces_03_0062__section7848679184830"><h4 class="sectiontitle">Request</h4><ul id="ces_03_0062__ul31763230184830"><li id="ces_03_0062__li17433620184830">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0062__table22684858184830" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="ces_03_0062__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_0062__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_0062__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_0062__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_0062__p40967438184830">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0062__row30028143184830"><td class="cellrowborder" valign="top" width="22.77777777777778%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__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_0062__row6976698184830"><td class="cellrowborder" valign="top" width="22.77777777777778%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p162124314343">Provides supplementary information about the custom alarm template. The description can contain 0 to 256 characters.</p>
</td>
</tr>
<tr id="ces_03_0062__row55869026184830"><td class="cellrowborder" valign="top" width="22.77777777777778%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__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_0062__b2111743918">namespace</strong> is <strong id="ces_03_0062__b1832312142212">SYS.ECS</strong>.</p>
<div class="notice" id="ces_03_0062__note3732125118544"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><p id="ces_03_0062__p3732155115545">If you select OS monitoring, <strong id="ces_03_0062__b14780151133916">namespace</strong> must be <strong id="ces_03_0062__b34601599397">SYS.ECS</strong>.</p>
</div></div>
</td>
</tr>
<tr id="ces_03_0062__row52573824184830"><td class="cellrowborder" valign="top" width="22.77777777777778%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p192123318349">Specifies the dimension corresponding to the resource type. If ECS is selected, the dimension is ECS and <strong id="ces_03_0062__b13346258102210">dimension_name</strong> is <strong id="ces_03_0062__b1639193112315">instance_id</strong>.</p>
</td>
</tr>
<tr id="ces_03_0062__row33885327184830"><td class="cellrowborder" valign="top" width="22.77777777777778%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="ces_03_0062__p11212031103419"><a href="#ces_03_0062__table1358724013016">template_items</a></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_0062__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_0062__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_0062__p3212193173414">Specifies the alarm rules that you add to the custom alarm template. You can add up to 20 alarm rules.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ces_03_0062__table1358724013016"></a><a name="table1358724013016"></a><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0062__table1358724013016" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="ces_03_0062__b210117241297">template_items</strong> data structure description</caption><thead align="left"><tr id="ces_03_0062__row9586104013016"><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_0062__p1858674016307">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_0062__p16694057179">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_0062__p1958684013306">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_0062__p16586840173017">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0062__row058694020301"><td class="cellrowborder" valign="top" width="22.73%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p134510173395">Specifies the metric you add to the custom alarm template. For example, you can add ECS <strong id="ces_03_0062__b720233862516">cpu_util</strong>. To view metrics of each resource, see <a href="ces_03_0059.html">Services Interconnected with Cloud Eye</a>.</p>
</td>
</tr>
<tr id="ces_03_0062__row35879403303"><td class="cellrowborder" valign="top" width="22.73%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p17345217183913">Specifies the alarm policy you created for the custom alarm template.</p>
<p id="ces_03_0062__p17455442193019">For details, see <a href="#ces_03_0062__table159417407300">Table 4</a>.</p>
</td>
</tr>
<tr id="ces_03_0062__row1866844315406"><td class="cellrowborder" valign="top" width="22.73%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p18837102672914">Specifies the alarm severity.</p>
<p id="ces_03_0062__p20858155082915">Possible severities are <strong id="ces_03_0062__b9858125010299">1 </strong>(critical), <strong id="ces_03_0062__b616624510313">2</strong> (major), <strong id="ces_03_0062__b11756352143113">3</strong> (minor), and <strong id="ces_03_0062__b2057375493112">4</strong> (informational).</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ces_03_0062__table159417407300"></a><a name="table159417407300"></a><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0062__table159417407300" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="ces_03_0062__b18203928152617">condition</strong> data structure description</caption><thead align="left"><tr id="ces_03_0062__row175923401303"><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_0062__p8592184020306">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_0062__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_0062__p13313142015416">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_0062__p1592124010305">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0062__row859212406308"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p942345612547">Specifies the alarm threshold operator, which can be <strong id="ces_03_0062__b187281651543632">&gt;</strong>, <strong id="ces_03_0062__b183465696543632">=</strong>, <strong id="ces_03_0062__b179687173243632">&lt;</strong>, <strong id="ces_03_0062__b154285477443632">&gt;=</strong>, <strong id="ces_03_0062__b87150143443632">&lt;=</strong>, or <strong id="ces_03_0062__b19653639743632">!=</strong>.</p>
</td>
</tr>
<tr id="ces_03_0062__row12593134013307"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p638018917444">Specifies the number of consecutive occurrence times that the alarm policy was met. Supported range: <strong id="ces_03_0062__b84235270615719">1</strong> to <strong id="ces_03_0062__b84235270615722">5</strong></p>
</td>
</tr>
<tr id="ces_03_0062__row11593174014301"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p52371724163711">Specifies the data aggregation method. The value can be:</p>
<ul id="ces_03_0062__ul223742413373"><li id="ces_03_0062__li11237202412378"><strong id="ces_03_0062__b20857580982336">average</strong>: average value of metric data within an aggregation period.</li><li id="ces_03_0062__li923712417378"><strong id="ces_03_0062__b15812367152340">max</strong>: maximum value of metric data in an aggregation period.</li><li id="ces_03_0062__li22371124183718"><strong id="ces_03_0062__b117903727624328">min</strong>: minimum value of metric data within an aggregation period.</li><li id="ces_03_0062__li16237824143715"><strong id="ces_03_0062__b17415814623225">sum</strong>: sum of metric data within an aggregation period.</li><li id="ces_03_0062__li623782415379"><strong id="ces_03_0062__b113097245733226">variance</strong>: variance value of metric data within an aggregation period.</li></ul>
</td>
</tr>
<tr id="ces_03_0062__row1593040153018"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p646983144720">Specifies the period during which Cloud Eye determines whether to trigger an alarm. </p>
<p id="ces_03_0062__p9439143854617">Unit: second</p>
<p id="ces_03_0062__p192692544616">Possible periods are <strong id="ces_03_0062__b142617311211">0</strong>, <strong id="ces_03_0062__b84235270614561">1</strong>, <strong id="ces_03_0062__b84235270614566">300</strong>, <strong id="ces_03_0062__b842352706145610">1200</strong>, <strong id="ces_03_0062__b842352706145615">3600</strong>, <strong id="ces_03_0062__b842352706145619">14400</strong>, and <strong id="ces_03_0062__b842352706145623">86400</strong>.</p>
<div class="note" id="ces_03_0062__note155112964620"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="ces_03_0062__p88116158465">If you set <strong id="ces_03_0062__b1152125212418">period</strong> to <strong id="ces_03_0062__b1153165217418">1</strong>, Cloud Eye uses raw data to determine whether to trigger an alarm. You can set this parameter to <strong id="ces_03_0062__b169431399437">0</strong> when you set <strong id="ces_03_0062__b69440919438">alarm_type</strong> to <strong id="ces_03_0062__b59445911439">(EVENT.SYS| EVENT.CUSTOM)</strong>.</p>
</div></div>
</td>
</tr>
<tr id="ces_03_0062__row25941440173013"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p184675599185">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_0062__p14468165951811">Minimum: <strong id="ces_03_0062__b20984794674731">0</strong></p>
<p id="ces_03_0062__p13468115971811">Maximum: <strong id="ces_03_0062__b6715258858152">32</strong></p>
</td>
</tr>
<tr id="ces_03_0062__row35945402309"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p138011913441">Specifies the alarm threshold, which ranges from <strong id="ces_03_0062__b84235270615612">0</strong> to <strong id="ces_03_0062__b84235270615617">Number. MAX_VALUE (1.7976931348623157e+108)</strong>. For detailed thresholds, see the value range of each metric in <a href="ces_03_0059.html">Services Interconnected with Cloud Eye</a>. For example, you can set ECS <strong id="ces_03_0062__b4625152014214">cpu_util</strong> to <strong id="ces_03_0062__b15626102064216">80</strong>.</p>
</td>
</tr>
<tr id="ces_03_0062__row142736157280"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="ces_03_0062__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_0062__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_0062__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_0062__p91943140810">Specifies the interval for triggering an alarm if the alarm persists. Possible intervals are as follows:</p>
<p id="ces_03_0062__p818581713811"><strong id="ces_03_0062__b191851171581">0</strong>: Cloud Eye triggers the alarm only once.</p>
<p id="ces_03_0062__p76963512090"><strong id="ces_03_0062__b169665114912">300</strong>: Cloud Eye triggers the alarm every 5 minutes.</p>
<p id="ces_03_0062__p61625313102"><strong id="ces_03_0062__b5162131161012">600</strong>: Cloud Eye triggers the alarm every 10 minutes.</p>
<p id="ces_03_0062__p94731262820"><strong id="ces_03_0062__b677619271292">900</strong>: Cloud Eye triggers the alarm every 15 minutes.</p>
<p id="ces_03_0062__p4358630383"><strong id="ces_03_0062__b138193289185">1800</strong>: Cloud Eye triggers the alarm every 30 minutes.</p>
<p id="ces_03_0062__p6877143214810"><strong id="ces_03_0062__b6931146101911">3600</strong>: Cloud Eye triggers the alarm every 1 hour.</p>
<p id="ces_03_0062__p74515381289"><strong id="ces_03_0062__b2542172202213">10800</strong>: Cloud Eye triggers the alarm every 3 hours.</p>
<p id="ces_03_0062__p2078244112814"><strong id="ces_03_0062__b2765133262214">21600</strong>: Cloud Eye triggers the alarm every 6 hours.</p>
<p id="ces_03_0062__p1637612451486"><strong id="ces_03_0062__b19496337172214">43200</strong>: Cloud Eye triggers the alarm every 12 hours.</p>
<p id="ces_03_0062__p1538010984416"><strong id="ces_03_0062__b6694188172320">86400</strong>: Cloud Eye triggers the alarm every day.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="ces_03_0062__ul34750592184830"><li id="ces_03_0062__li44319877184830">Example request<pre class="screen" id="ces_03_0062__screen4738031718551">{
"template_name": "alarmTemplate-Test01",
"template_description": "Creating a custom alarm template",
"namespace": "SYS.ECS",
"dimension_name": "instance_id",
"template_items": [
{
"metric_name": "cpu_util",
"condition": {
"period": 1,
"filter": "average",
"comparison_operator": "&gt;=",
"value": 90,
"unit": "%",
"count": 3,
"suppress_duration": 300
},
"alarm_level": 2
},
{
"metric_name": "mem_util",
"condition": {
"period": 1,
"filter": "average",
"comparison_operator": "&gt;=",
"value": 90,
"unit": "%",
"count": 3,
"suppress_duration": 600
},
"alarm_level": 2
}
]
}
</pre>
</li></ul>
</div>
<div class="section" id="ces_03_0062__section41088852184830"><h4 class="sectiontitle">Response</h4><ul id="ces_03_0062__ul39862682184830"><li id="ces_03_0062__li23219822184830">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0062__table7651809184830" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response parameters</caption><thead align="left"><tr id="ces_03_0062__row11265298184830"><th align="left" class="cellrowborder" valign="top" width="16.919999999999998%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="ces_03_0062__p40073906184830">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.04%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="ces_03_0062__p59478015184830">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="70.04%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="ces_03_0062__p52989949184830">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0062__row64327487184830"><td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="ces_03_0062__p43143982184830">template_id</p>
</td>
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="ces_03_0062__p15981046115616">String</p>
</td>
<td class="cellrowborder" valign="top" width="70.04%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="ces_03_0062__p66697365184830">Specifies the ID of the custom alarm template.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="ces_03_0062__ul33777478184830"><li id="ces_03_0062__li35561846184830">Example response<pre class="screen" id="ces_03_0062__screen2358389810228">{
"template_id":"at1603252280799wLRyGLxnz"
}</pre>
</li></ul>
</div>
<div class="section" id="ces_03_0062__section55124147184830"><h4 class="sectiontitle">Returned Values</h4><ul id="ces_03_0062__ul35870885184830"><li id="ces_03_0062__li54402515184830">Normal<p id="ces_03_0062__p19860588184830"><a name="ces_03_0062__li54402515184830"></a><a name="li54402515184830"></a>201</p>
</li><li id="ces_03_0062__li44527571184830">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0062__table46793998" frame="border" border="1" rules="all"><thead align="left"><tr id="ces_03_0062__row65573909"><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_0062__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_0062__p15553712182924">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0062__row37564172"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0062__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_0062__p164784039168">Request error.</p>
</td>
</tr>
<tr id="ces_03_0062__row66248115"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0062__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_0062__p218024949168">The authentication information is not provided or is incorrect.</p>
</td>
</tr>
<tr id="ces_03_0062__row44282627"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0062__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_0062__p661449719168">Access to the requested page is forbidden.</p>
</td>
</tr>
<tr id="ces_03_0062__row1815156"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0062__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_0062__p585420329168">The request timed out.</p>
</td>
</tr>
<tr id="ces_03_0062__row25675773"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0062__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_0062__p37560249168">Concurrent requests are excessive.</p>
</td>
</tr>
<tr id="ces_03_0062__row47530006"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0062__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_0062__p618106189168">Failed to complete the request because of an internal service error.</p>
</td>
</tr>
<tr id="ces_03_0062__row20561848"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0062__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_0062__p54144829168">The service is currently unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="ces_03_0062__section1618385104615"><h4 class="sectiontitle">Error Codes</h4><p id="ces_03_0062__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>