forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
163 lines
20 KiB
HTML
163 lines
20 KiB
HTML
<a name="as_03_0102"></a><a name="as_03_0102"></a>
|
|
|
|
<h1 class="topictitle1">Creating an AS Policy</h1>
|
|
<div id="body1548143445104"><div class="section" id="as_03_0102__section2495449014355"><h4 class="sectiontitle">Scenarios</h4><p id="as_03_0102__p8060118">You can manage instances in an AS group through AS policies. This section describes how to create an AS policy.</p>
|
|
</div>
|
|
<div class="section" id="as_03_0102__section28492877113953"><h4 class="sectiontitle">Creating an Alarm Policy</h4><ol id="as_03_0102__ol62220677"><li id="as_03_0102__en-us_topic_0118498861_l67f1c4bb070b4f3d9b83021e83da345b">Log in to the management console.</li></ol><ol start="2" id="as_03_0102__ol4757637585112"><li id="as_03_0102__li5914166211049">Click <span><img id="as_03_0102__image1451516261459" src="en-us_image_0210485079.png"></span> in the upper left corner to select a region and a project.</li><li id="as_03_0102__li139251229183015">Under <strong id="as_03_0102__b1154116537263">Computing</strong>, click <strong id="as_03_0102__b155315372615">Auto Scaling</strong>. In the navigation pane on the left, choose <strong id="as_03_0102__b3554453132613">Instance Scaling</strong>.</li><li id="as_03_0102__li3783188785112">Locate the row containing the target AS group and click <strong id="as_03_0102__b31654637192252">View AS Policy</strong> in the <strong id="as_03_0102__b16456283192252">Operation</strong> column.</li><li id="as_03_0102__li494266385112">On the <strong id="as_03_0102__b1970315231919">AS Policies</strong> page, click <strong id="as_03_0102__b1338710525475">Add AS Policy</strong>.</li><li id="as_03_0102__li17918738115940">Set the parameters listed in <a href="#as_03_0102__table442371481205">Table 1</a>.
|
|
<div class="tablenoborder"><a name="as_03_0102__table442371481205"></a><a name="table442371481205"></a><table cellpadding="4" cellspacing="0" summary="" id="as_03_0102__table442371481205" frame="border" border="1" rules="all"><caption><b>Table 1 </b>AS policy parameters</caption><thead align="left"><tr id="as_03_0102__row577295371205"><th align="left" class="cellrowborder" valign="top" width="22.81%" id="mcps1.3.2.3.5.2.2.4.1.1"><p id="as_03_0102__p75748481205">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="43.480000000000004%" id="mcps1.3.2.3.5.2.2.4.1.2"><p id="as_03_0102__p95829881205">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.71%" id="mcps1.3.2.3.5.2.2.4.1.3"><p id="as_03_0102__p380245311205">Example Value</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="as_03_0102__row66764651205"><td class="cellrowborder" valign="top" width="22.81%" headers="mcps1.3.2.3.5.2.2.4.1.1 "><p id="as_03_0102__p39228151205">Policy Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.480000000000004%" headers="mcps1.3.2.3.5.2.2.4.1.2 "><p id="as_03_0102__p493125731205">Specifies the name of the AS policy to be created.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.71%" headers="mcps1.3.2.3.5.2.2.4.1.3 "><p id="as_03_0102__p348954431205">as-policy-p6g5</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_03_0102__row456235351205"><td class="cellrowborder" valign="top" width="22.81%" headers="mcps1.3.2.3.5.2.2.4.1.1 "><p id="as_03_0102__p45188451205">Policy Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.480000000000004%" headers="mcps1.3.2.3.5.2.2.4.1.2 "><p id="as_03_0102__p4986700115224">Select <strong id="as_03_0102__b842352706171152">Alarm</strong>.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.71%" headers="mcps1.3.2.3.5.2.2.4.1.3 "><p id="as_03_0102__p531365191205">Alarm Policy</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_03_0102__row84666261205"><td class="cellrowborder" valign="top" width="22.81%" headers="mcps1.3.2.3.5.2.2.4.1.1 "><p id="as_03_0102__p147080751205">Alarm Rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.480000000000004%" headers="mcps1.3.2.3.5.2.2.4.1.2 "><p id="as_03_0102__p505033881205">Specifies whether a new alarm rule is to be created (<strong id="as_03_0102__b16955153314166">Create</strong>) or an existing alarm rule will be used (<strong id="as_03_0102__b99568335160">Use existing</strong>).</p>
|
|
<div class="p" id="as_03_0102__p2787840394913">To create an alarm rule, configure the following parameters:<ul id="as_03_0102__ul340997094947"><li id="as_03_0102__li2774219594947">Rule Name<p id="as_03_0102__p2649132795040"><a name="as_03_0102__li2774219594947"></a><a name="li2774219594947"></a>Specifies the name of the new alarm rule, for example, <strong id="as_03_0102__b842352706172220">as-alarm-7o1u</strong>.</p>
|
|
</li><li id="as_03_0102__li22625889502">Trigger Condition<p id="as_03_0102__p182080359512"><a name="as_03_0102__li22625889502"></a><a name="li22625889502"></a>Specifies a monitoring metric and condition for triggering a scaling action. For example, when CPU Usage becomes higher than 70%, AS automatically triggers a scaling action.</p>
|
|
</li><li id="as_03_0102__li2578691895017">Monitoring Interval<p id="as_03_0102__p3466834095116"><a name="as_03_0102__li2578691895017"></a><a name="li2578691895017"></a>Specifies the interval (such as five minutes) at which the alarm status is updated based on the alarm rule.</p>
|
|
</li><li id="as_03_0102__li4453899495026">Consecutive Occurrences<p id="as_03_0102__p4052459495128"><a name="as_03_0102__li4453899495026"></a><a name="li4453899495026"></a>Specifies the number of sampling points when an alarm is triggered. If <strong id="as_03_0102__b842352706164722">Occurrences</strong> is set to <strong id="as_03_0102__b569758072164351">n</strong>, the sampling points of the alarm rule are the sampling points in n consecutive sampling periods. Only if all the sampling points meet the threshold configured for the alarm rule will the alarm rule status be refreshed as the <strong id="as_03_0102__b412799387164351">Alarm</strong> status.</p>
|
|
</li></ul>
|
|
</div>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.71%" headers="mcps1.3.2.3.5.2.2.4.1.3 "><p id="as_03_0102__p642426221205">N/A</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_03_0102__row413126881205"><td class="cellrowborder" valign="top" width="22.81%" headers="mcps1.3.2.3.5.2.2.4.1.1 "><p id="as_03_0102__p579934701205">Scaling Action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.480000000000004%" headers="mcps1.3.2.3.5.2.2.4.1.2 "><p id="as_03_0102__p669595041205">Specifies an action and the number or percentage of instances.</p>
|
|
<div class="p" id="as_03_0102__p36260748141218">The following scaling action options are available:<ul id="as_03_0102__ul30641360141052"><li id="as_03_0102__li35122401141052">Add<p id="as_03_0102__p2001153810029"><a name="as_03_0102__li35122401141052"></a><a name="li35122401141052"></a>Adds instances to an AS group when the scaling action is performed.</p>
|
|
</li><li id="as_03_0102__li1507790614110">Reduce<p id="as_03_0102__p5844171910128"><a name="as_03_0102__li1507790614110"></a><a name="li1507790614110"></a>Removes instances from an AS group when the scaling action is performed.</p>
|
|
</li><li id="as_03_0102__li4547399314114">Set to<p id="as_03_0102__p6129265410320"><a name="as_03_0102__li4547399314114"></a><a name="li4547399314114"></a>Sets the expected number of instances in an AS group to a specified value.</p>
|
|
</li></ul>
|
|
</div>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.71%" headers="mcps1.3.2.3.5.2.2.4.1.3 "><ul id="as_03_0102__ul38301652103420"><li id="as_03_0102__li27289816103420">Add 1 instance</li><li id="as_03_0102__li2034559103420">Add 10% instances<div class="p" id="as_03_0102__p36309970101916"><a name="as_03_0102__li2034559103420"></a><a name="li2034559103420"></a>The number of instances to be added is 10% of the current number of instances in the AS group. If the product of the current number of instances and the percentage is not an integer, AS automatically rounds the value up or down:<ul id="as_03_0102__ul25878962102313"><li id="as_03_0102__li5160457102313">If the value is greater than 1, it is rounded down. </li></ul>
|
|
<ul id="as_03_0102__ul13699143102321"><li id="as_03_0102__li57233975102321">If the value is greater than 0 but less than 1, it is rounded up to 1. </li></ul>
|
|
</div>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_03_0102__row253348581205"><td class="cellrowborder" valign="top" width="22.81%" headers="mcps1.3.2.3.5.2.2.4.1.1 "><p id="as_03_0102__p388576551205">Cooldown Period</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.480000000000004%" headers="mcps1.3.2.3.5.2.2.4.1.2 "><p id="as_03_0102__p6166644141214">To prevent an alarm policy from being repeatedly invoked by the same event, you can set a cooldown period.</p>
|
|
<p id="as_03_0102__p118187578527">A cooldown period specifies how long any alarm-triggered scaling action will be disallowed after a previous scaling action is complete.</p>
|
|
<p id="as_03_0102__p21343661141258">The cooldown period does not apply to scheduled or periodic scaling actions. However, AS recounts the cooling duration after a scheduled or periodic scaling action is complete.</p>
|
|
<p id="as_03_0102__p18764141012532">For example, suppose that the cooldown period is set to 300 seconds (5 minutes), and a scheduled policy is specified to trigger a scaling action at 10:32, and a previous scaling action triggered by an alarm policy ends at 10:30. Any alarm-triggered scaling action will then be denied during the cooldown period from 10:30 to 10:35, but the scaling action scheduled for 10:32 will still take place. If the scheduled scaling action ends at 10:36, a new cooldown period starts at 10:36 and ends at 10:41.</p>
|
|
<div class="note" id="as_03_0102__note57875228141258"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="as_03_0102__ul51115008141258"><li id="as_03_0102__li57381890141258">If a scaling action is triggered by an AS policy, the cooldown period is whatever configured for that AS policy.</li><li id="as_03_0102__li46674963141258">If a scaling action is triggered by manually changing the expected number of instances or by other actions, the cooldown period is whatever configured for the AS group.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.71%" headers="mcps1.3.2.3.5.2.2.4.1.3 "><p id="as_03_0102__p31638772">300</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="as_03_0102__li21342203111444">Click <strong id="as_03_0102__b2532821161711">OK</strong>.<p id="as_03_0102__p9013280111540">The newly added AS policy is displayed on the <strong id="as_03_0102__b842352706181654">AS Policy</strong> tab. In addition, the AS policy is in <strong id="as_03_0102__b842352706181723">Enabled</strong> state by default.</p>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="as_03_0102__section72110321079"><h4 class="sectiontitle">Creating a Scheduled or Periodic Policy</h4><ol id="as_03_0102__ol2414341458"><li id="as_03_0102__li14147411359">Log in to the management console.</li></ol><ol start="2" id="as_03_0102__ol1621511321574"><li id="as_03_0102__li7220932076">Click <span><img id="as_03_0102__image1888652915810" src="en-us_image_0210485079.png"></span> in the upper left corner to select a region and a project.</li><li id="as_03_0102__li76833718322">Under <strong id="as_03_0102__b5404484274">Computing</strong>, click <strong id="as_03_0102__b5421484272">Auto Scaling</strong>. In the navigation pane on the left, choose <strong id="as_03_0102__b15431548172719">Instance Scaling</strong>.</li><li id="as_03_0102__li1222815321077">Locate the row containing the target AS group and click <strong id="as_03_0102__b2035152142114">View AS Policy</strong> in the <strong id="as_03_0102__b1035552182111">Operation</strong> column.</li><li id="as_03_0102__li162327321714">On the <strong id="as_03_0102__b883314602617">AS Policies</strong> page, click <strong id="as_03_0102__b384044620267">Add AS Policy</strong>.</li><li id="as_03_0102__li1523843214714">Configure the parameters listed in <a href="#as_03_0102__table1342892013">Table 2</a>.
|
|
<div class="tablenoborder"><a name="as_03_0102__table1342892013"></a><a name="table1342892013"></a><table cellpadding="4" cellspacing="0" summary="" id="as_03_0102__table1342892013" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="as_03_0102__row143361091114"><th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.3.3.5.2.2.4.1.1"><p id="as_03_0102__p9335898117">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44%" id="mcps1.3.3.3.5.2.2.4.1.2"><p id="as_03_0102__p83351897116">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33%" id="mcps1.3.3.3.5.2.2.4.1.3"><p id="as_03_0102__p123361897115">Example Value</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="as_03_0102__row2336995116"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.5.2.2.4.1.1 "><p id="as_03_0102__p12336697112">Policy Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44%" headers="mcps1.3.3.3.5.2.2.4.1.2 "><p id="as_03_0102__p12336896119">Specifies the name of the AS policy to be created.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.3.3.5.2.2.4.1.3 "><p id="as_03_0102__p15336291118">as-policy-p6g5</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_03_0102__row18339191210"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.5.2.2.4.1.1 "><p id="as_03_0102__p10336690111">Policy Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44%" headers="mcps1.3.3.3.5.2.2.4.1.2 "><p id="as_03_0102__p12336990114">Select <strong id="as_03_0102__b842352706183028">Scheduled</strong> or <strong id="as_03_0102__b842352706183031">Periodic</strong> for expanding resources at a specified time.</p>
|
|
<p id="as_03_0102__p18336109216">If you select <strong id="as_03_0102__b26692513118313">Periodic</strong>, you are required to configure two more parameters:</p>
|
|
<ul id="as_03_0102__ul13337139415"><li id="as_03_0102__li16337193117">Period<ul id="as_03_0102__ul133370917116"><li id="as_03_0102__li153371691016">Day</li><li id="as_03_0102__li15337791119">Week</li><li id="as_03_0102__li19337199718">Month</li></ul>
|
|
</li></ul>
|
|
<ul id="as_03_0102__ul163381915111"><li id="as_03_0102__li203383912110">Time Range<p id="as_03_0102__p5338139916"><a name="as_03_0102__li203383912110"></a><a name="li203383912110"></a>Specifies the time range during which the AS policy can be triggered.</p>
|
|
</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.3.3.5.2.2.4.1.3 "><p id="as_03_0102__p29434348536">N/A</p>
|
|
<p id="as_03_0102__p4431162811510"></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_03_0102__row1133910915119"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.5.2.2.4.1.1 "><p id="as_03_0102__p1333919916113">Time Zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44%" headers="mcps1.3.3.3.5.2.2.4.1.2 "><p id="as_03_0102__p23391691611">The default value is <strong id="as_03_0102__b13903415115">GMT+08:00</strong>.</p>
|
|
<p id="as_03_0102__p5339159217">GMT+08:00 is 8:00 hours ahead of Greenwich Mean Time.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.3.3.5.2.2.4.1.3 "><p id="as_03_0102__p63392091617">GMT+08:00</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_03_0102__row0339209012"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.5.2.2.4.1.1 "><p id="as_03_0102__p1933915918119">Triggered At</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44%" headers="mcps1.3.3.3.5.2.2.4.1.2 "><p id="as_03_0102__p1733915910114">Specifies the time at which the AS policy is triggered.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.3.3.5.2.2.4.1.3 "><p id="as_03_0102__p12625813204612">N/A</p>
|
|
<p id="as_03_0102__p171591347134511"></p>
|
|
<p id="as_03_0102__p8166133944515"></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_03_0102__row5341896117"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.5.2.2.4.1.1 "><p id="as_03_0102__p163401493118">Scaling Action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44%" headers="mcps1.3.3.3.5.2.2.4.1.2 "><p id="as_03_0102__p4340995115">Specifies an action and the number of instances.</p>
|
|
<div class="p" id="as_03_0102__p5340893116">The following scaling action options are available:<ul id="as_03_0102__ul17340491212"><li id="as_03_0102__li434029819">Add<p id="as_03_0102__p19340291712"><a name="as_03_0102__li434029819"></a><a name="li434029819"></a>Adds instances to an AS group when the scaling action is performed.</p>
|
|
</li><li id="as_03_0102__li634059713">Reduce<p id="as_03_0102__p9340591117"><a name="as_03_0102__li634059713"></a><a name="li634059713"></a>Removes instances from an AS group when the scaling action is performed.</p>
|
|
</li><li id="as_03_0102__li4340796112">Set to<p id="as_03_0102__p1434013920119"><a name="as_03_0102__li4340796112"></a><a name="li4340796112"></a>Sets the expected number of instances in an AS group to a specified value.</p>
|
|
</li></ul>
|
|
</div>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.3.3.5.2.2.4.1.3 "><ul id="as_03_0102__ul183411291419"><li id="as_03_0102__li93407915117">Add 1 instance</li><li id="as_03_0102__li93411491116">Add 10% instances<p id="as_03_0102__p2340109514"><a name="as_03_0102__li93411491116"></a><a name="li93411491116"></a>The number of instances to be added is 10% of the current number of instances in the AS group. If the product of the current number of instances and the percentage is not an integer, AS automatically rounds the value up or down:</p>
|
|
<ul id="as_03_0102__ul1034019911115"><li id="as_03_0102__li16340398111">If the value is greater than 1, it is rounded down. </li></ul>
|
|
<ul id="as_03_0102__ul1341493110"><li id="as_03_0102__li83411191719">If the value is greater than 0 but less than 1, it is rounded up to 1. </li></ul>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_03_0102__row5342691114"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.5.2.2.4.1.1 "><p id="as_03_0102__p143418911111">Cooldown Period</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44%" headers="mcps1.3.3.3.5.2.2.4.1.2 "><p id="as_03_0102__p163411197112">To prevent an alarm policy from being repeatedly invoked by the same event, you can set a cooldown period.</p>
|
|
<p id="as_03_0102__p33411594118">Specifies how long any alarm-triggered scaling action will be disallowed after a previous scaling action is complete.</p>
|
|
<p id="as_03_0102__p93411496114">The cooldown period does not apply to scheduled or periodic scaling actions. However, AS recounts the cooling duration after a scheduled or periodic scaling action is complete.</p>
|
|
<p id="as_03_0102__p6341591310">For example, suppose that the cooldown period is set to 300 seconds (5 minutes), and a scheduled policy is specified to trigger a scaling action at 10:32, and a previous scaling action triggered by an alarm policy ends at 10:30. Any alarm-triggered scaling action will then be denied during the cooldown period from 10:30 to 10:35, but the scaling action scheduled for 10:32 will still take place. If the scheduled scaling action ends at 10:36, a new cooldown period starts at 10:36 and ends at 10:41.</p>
|
|
<div class="note" id="as_03_0102__note1934218920115"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="as_03_0102__ul1134119913119"><li id="as_03_0102__li19341591611">If a scaling action is triggered by an AS policy, the cooldown period is whatever configured for that AS policy.</li><li id="as_03_0102__li153411091412">If a scaling action is triggered by manually changing the expected number of instances or by other actions, the cooldown period is whatever configured for the AS group.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.3.3.5.2.2.4.1.3 "><p id="as_03_0102__p183424917113">300</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ol><ol start="7" id="as_03_0102__ol28193397152919"><li id="as_03_0102__li1636083214718">Click <strong id="as_03_0102__b1570856957172655">OK</strong>.<p id="as_03_0102__p2412469711411">The newly added AS policy is displayed on the <strong id="as_03_0102__b12910142182717">AS Policy</strong> tab. In addition, the AS policy is in <strong id="as_03_0102__b13911521162715">Enabled</strong> state by default.</p>
|
|
</li></ol>
|
|
<div class="note" id="as_03_0102__note1790191022217"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="as_03_0102__p2877560711390">If you have created scheduled or periodic AS policies that are invoked at the same time, AS will execute the one created later. This constraint does not apply to alarm-triggered AS policies.</p>
|
|
</div></div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="as_03_0100.html">AS Policy</a></div>
|
|
</div>
|
|
</div>
|
|
|