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>
223 lines
18 KiB
HTML
223 lines
18 KiB
HTML
<a name="as_06_0103"></a><a name="as_06_0103"></a>
|
|
|
|
<h1 class="topictitle1">Recording AS Resource Operations</h1>
|
|
<div id="body1481793911599"><div class="section" id="as_06_0103__section2495449014355"><h4 class="sectiontitle">Scenarios</h4><p id="as_06_0103__p12289145174811">AS can use the Cloud Trace Service (CTS) to record resource operations. CTS can record operations performed on the management console, operations performed by calling APIs, and operations triggered within the cloud system.</p>
|
|
<p id="as_06_0103__p17638144035811">If you have enabled CTS, when a call is made to the AS API, the operation will be reported to CTS which will then deliver the operation record to a specified OBS bucket for storage. With CTS, you can record operations associated with AS for later query, audit, and backtrack operations.</p>
|
|
</div>
|
|
<div class="section" id="as_06_0103__section43859717155214"><h4 class="sectiontitle">Obtaining AS Information in CTS</h4><p id="as_06_0103__p60324991154939">After you enable CTS in the application system, the system logs the API calling operations performed on AS resources. On the <strong id="as_06_0103__b84235270615130">Cloud Trace Service</strong> console, you can view operation records for the last 7 days. To obtain more operation records, you can enable the Object Storage Service (OBS) and synchronize operation records to the OBS in real time.</p>
|
|
<div class="p" id="as_06_0103__p6736852174116"><a href="#as_06_0103__table11766471458">Table 1</a> lists the AS operations that can be recorded by CTS.
|
|
<div class="tablenoborder"><a name="as_06_0103__table11766471458"></a><a name="table11766471458"></a><table cellpadding="4" cellspacing="0" summary="" id="as_06_0103__table11766471458" frame="border" border="1" rules="all"><caption><b>Table 1 </b>AS operations that can be recorded by CTS</caption><thead align="left"><tr id="as_06_0103__row17179104774518"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.2.4.1.1"><p id="as_06_0103__en-us_topic_0100240378_p56684903152351">Operation</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="32%" id="mcps1.3.2.3.2.2.4.1.2"><p id="as_06_0103__en-us_topic_0100240378_p28074446152351">Resource Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="48%" id="mcps1.3.2.3.2.2.4.1.3"><p id="as_06_0103__en-us_topic_0100240378_p59437682152351">Trace Name</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="as_06_0103__row4180154711454"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p21801547184515">Creating an AS group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p131351545125316">scaling_group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p201511126195812">createScalingGroup</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row21801747104512"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p0180124719451">Modifying an AS group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p1318044764510">scaling_group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p2141172410586">modifyScalingGroup</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row181801547134516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p91801847124511">Deleting an AS group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p31801947164516">scaling_group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p15135202375816">deleteScalingGroup</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row1518064784517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p7180134774517">Enabling an AS group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p7180104744517">scaling_group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p1852632112589">enableScalingGroup</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row518018476452"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p81803474459">Disabling an AS group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p818013471450">scaling_group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p1225112005814">disableScalingGroup</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row1318110472454"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p11181174754512">Creating an AS configuration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p2018174714516">scaling_configuration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p1918115477454">createScalingConfiguration</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row1181247194512"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p111811747164516">Deleting an AS configuration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p11811447144514">scaling_configuration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p971310174588">deleteScalingConfiguration</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row2181047194519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p1118111478458">Deleting AS configurations in batches</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p17181124711457">scaling_configuration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p14435141655811">batchDeleteScalingConfiguration</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row518119477455"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p1418174715457">Creating an AS policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p1181104774517">scaling_policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p6120159587">createScalingPolicy</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row218164744519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p7181134714518">Modifying an AS policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p1118114477455">scaling_policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p594913185818">modifyScalingPolicy</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row818194719454"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p141811147134520">Deleting an AS policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p618154720451">scaling_policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p4181104744514">deleteScalingPolicy</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row1418114715457"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p7181164719455">Enabling an AS policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p1018104717454">scaling_policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p31836479452">enableScalingPolicy</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row18183104704519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p18183144724514">Disabling an AS policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p318314474450">scaling_policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p1767021018587">disableScalingPolicy</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row131831447174513"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p9183204784515">Executing an AS policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p1218312470450">scaling_policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p17059918581">executeScalingPolicy</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row13183144713454"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p20183174774519">Removing an instance</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p15183174714513">scaling_instance</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p1518317825817">removeInstance</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row11183164724520"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p12183164724511">Removing instances in batches</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p1118317472452">scaling_instance</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p4270187145819">batchRemoveInstances</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row101831747164520"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p17183104784520">Adding instances in batches</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p4183847144510">scaling_instance</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p697015595810">batchAddInstances</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row1618317474459"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p11831247174511">Enabling instance protection in a batch</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p81839472453">scaling_instance</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p554844145820">batchProtectInstances</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row81831047174517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p2184347124514">Disabling instance protection in a batch</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p20184174714511">scaling_instance</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p42379265818">batchUnprotectInstances</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row192564352517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p1425611318259">Deleting a tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p18256183172516">scaling_tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p42561535256">deleteScalingTag</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0103__row1950914617255"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="as_06_0103__p17509106182514">Creating or Updating a tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="as_06_0103__p950916172514">scaling_tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="as_06_0103__p150417563254">updateScalingTag</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="as_06_0103__section1953623116339"><h4 class="sectiontitle">Viewing Audit Logs</h4><ol id="as_06_0103__en-us_topic_0030598499_ol3001478295238"><li id="as_06_0103__en-us_topic_0118498861_l67f1c4bb070b4f3d9b83021e83da345b">Log in to the management console.</li><li id="as_06_0103__en-us_topic_0030598499_li34647912162648">Click <span><img id="as_06_0103__image14718102764410" src="en-us_image_0142360107.png"></span> in the upper left corner to select a region and a project.</li><li id="as_06_0103__en-us_topic_0030598499_li3694304795238">Click <strong id="as_06_0103__b842352706104116">Service List</strong>. Choose <strong id="as_06_0103__b2921183022715">Management & Deployment</strong> > <strong id="as_06_0103__b842352706183814">Cloud Trace Service</strong>.</li><li id="as_06_0103__en-us_topic_0030598499_li4560416895238">Click <strong id="as_06_0103__b42162954165740">Trace List</strong> in the navigation pane on the left.</li><li id="as_06_0103__en-us_topic_0030598499_li877858395238">You can use filters to query traces. The following filters are available:<ul class="subitemlist" id="as_06_0103__en-us_topic_0030598499_ul4173195016221"><li id="as_06_0103__en-us_topic_0030598499_li25120207165721"><strong id="as_06_0103__b88681429142">Trace Type</strong>, <strong id="as_06_0103__b138693297414">Trace Source</strong>, <strong id="as_06_0103__b587072917413">Resource Type</strong>, and <strong id="as_06_0103__b1687062912417">Search By</strong>: Select a filter from the drop-down list.<p class="subitemlist" id="as_06_0103__p97391173920">If you select <strong id="as_06_0103__b14168171802617">Resource ID</strong> for <strong id="as_06_0103__b016961852615">Search By</strong>, specify a resource ID.</p>
|
|
<p id="as_06_0103__p1026210519920">If you select <strong id="as_06_0103__b20260162552616">Data</strong> for <strong id="as_06_0103__b202602025112618">Trace Type</strong>, you can only filter traces by tracker.</p>
|
|
</li><li id="as_06_0103__en-us_topic_0030598499_li16990144143538"><strong id="as_06_0103__b14623728173313">Operator</strong>: Select one or more specific operators from the drop-down list.</li><li id="as_06_0103__en-us_topic_0030598499_li2227630716221"><strong id="as_06_0103__b162414723316">Trace Status</strong>: Select <strong id="as_06_0103__b116258793315">All trace statuses</strong>, <strong id="as_06_0103__b10625167123311">Normal</strong>, <strong id="as_06_0103__b1762517163314">Warning</strong>, or <strong id="as_06_0103__b1662597113317">Incident</strong>.</li><li id="as_06_0103__en-us_topic_0030598499_li2484476616221">Time range: In the upper right corner, choose <strong id="as_06_0103__b10156172719411">Last 1 hour</strong>, <strong id="as_06_0103__b1773402994119">Last 1 day</strong>, or <strong id="as_06_0103__b1883233310415">Last 1 week</strong>, or specify a custom time range.</li></ul>
|
|
</li><li id="as_06_0103__en-us_topic_0030598499_li944262995238">Click <span><img id="as_06_0103__image182428913289" src="en-us_image_0108911462.jpg"></span> to the left of the required trace to expand its details.</li><li id="as_06_0103__en-us_topic_0030598499_li344192371514">Locate the required trace and click <strong id="as_06_0103__b842352706154059">View Trace</strong> in the <strong id="as_06_0103__b842352706142520">Operation</strong> column. The trace details are displayed.</li></ol>
|
|
</div>
|
|
<div class="section" id="as_06_0103__section54032088155336"><h4 class="sectiontitle">CTS Log Entries</h4><p id="as_06_0103__p952755010112">Each log entry consists of a trace in JSON format. A log entry indicates an AS API request, including the requested operation, the operation date and time, operation parameters, and information about the user who sends the request. The user information is obtained from the Identity and Access Management (IAM) service.</p>
|
|
<div class="p" id="as_06_0103__p12973340154939">The following example shows CTS log entries for the <strong id="as_06_0103__b842352706172418">CreateScalingPolicy</strong> action:<pre class="screen" id="as_06_0103__screen66016507175144">{
|
|
"time": "2016-12-15 15:27:40 GMT+08:00",
|
|
"user": {
|
|
"name": "xxxx",
|
|
"id": "62ff83d2920e4d3d917e6fa5e31ddebe",
|
|
"domain": {
|
|
"name": "xxx",
|
|
"id": "30274282b09749adbe7d9cabeebcbe8b"
|
|
}
|
|
},
|
|
"request": {
|
|
"scaling_policy_name": "as-policy-oonb",
|
|
"scaling_policy_action": {
|
|
"operation": "ADD",
|
|
"instance_number": 1
|
|
},
|
|
"cool_down_time": "",
|
|
"scheduled_policy": {
|
|
"launch_time": "2016-12-16T07:27Z"
|
|
},
|
|
"scaling_policy_type": "SCHEDULED",
|
|
"scaling_group_id": "ec4051a7-6fbd-42d2-840f-2ad8cdabee34"
|
|
},
|
|
"response": {
|
|
"scaling_policy_id": "6a38d488-664b-437a-ade2-dc45f96f7f4c"
|
|
},
|
|
"code": 200,
|
|
"service_type": "AS",
|
|
"resource_type": "scaling_policy",
|
|
"resource_name": "as-policy-oonb",
|
|
"resource_id": "6a38d488-664b-437a-ade2-dc45f96f7f4c",
|
|
"source_ip": "10.190.205.233",
|
|
"trace_name": "createScalingPolicy",
|
|
"trace_rating": "normal",
|
|
"trace_type": "ConsoleAction",
|
|
"api_version": "1.0",
|
|
"record_time": "2016-12-15 15:27:40 GMT+08:00",
|
|
"trace_id": "f627062b-c297-11e6-a606-eb2c0f48bec5"
|
|
}</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="as_06_0100.html">AS Group and Instance Monitoring</a></div>
|
|
</div>
|
|
</div>
|
|
|