doc-exports/docs/aom/api-ref/aom_04_1016.html
Hasko, Vladimir bbf8757cdf AOM API 0929 (recreate of #275)
Reviewed-by: gtema <artem.goncharov@gmail.com>
Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com>
Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
2022-11-29 12:44:31 +00:00

264 lines
17 KiB
HTML

<a name="aom_04_1016"></a><a name="aom_04_1016"></a>
<h1 class="topictitle1">Querying a Threshold Rule</h1>
<div id="body1606983050329"><div class="section" id="aom_04_1016__section51399305"><h4 class="sectiontitle">Function</h4><p class="msonormal" id="aom_04_1016__p39250474">This API is used to query a threshold rule.</p>
</div>
<div class="section" id="aom_04_1016__section59940568"><h4 class="sectiontitle">URI</h4><p class="msonormal" id="aom_04_1016__p25171793">GET /v2/{project_id}/ams/alarms/{alarm_id}</p>
</div>
<div class="section" id="aom_04_1016__section2594204"><h4 class="sectiontitle">Request</h4><p class="msonormal" id="aom_04_1016__p25649373"><strong id="aom_04_1016__b29517773">Request parameters</strong></p>
<p class="msonormal" id="aom_04_1016__p64333366"><a href="#aom_04_1016__d0e3305">Table 1</a> describes the request parameters.</p>
<div class="tablenoborder"><a name="aom_04_1016__d0e3305"></a><a name="d0e3305"></a><table cellpadding="4" cellspacing="0" summary="" id="aom_04_1016__d0e3305" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="aom_04_1016__row19042640"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.6.1.1"><p id="aom_04_1016__p66058841">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.3.4.2.6.1.2"><p id="aom_04_1016__p49165866">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.3.4.2.6.1.3"><p id="aom_04_1016__p23012204">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26%" id="mcps1.3.3.4.2.6.1.4"><p id="aom_04_1016__p52049222">Value Range</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.3.4.2.6.1.5"><p id="aom_04_1016__p55237473">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="aom_04_1016__row45050341"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.6.1.1 "><p id="aom_04_1016__p25198968">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.3.4.2.6.1.2 "><p id="aom_04_1016__p27850565">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.3.4.2.6.1.3 "><p id="aom_04_1016__p41303282">String</p>
</td>
<td class="cellrowborder" valign="top" width="26%" headers="mcps1.3.3.4.2.6.1.4 "><p id="aom_04_1016__p57231527">-</p>
</td>
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.4.2.6.1.5 "><p id="aom_04_1016__p5242125">Project ID obtained from IAM. Generally, a project ID contains 32 characters.</p>
</td>
</tr>
<tr id="aom_04_1016__row47179130"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.6.1.1 "><p id="aom_04_1016__p63413163">alarm_id</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.3.4.2.6.1.2 "><p id="aom_04_1016__p36192610">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.3.4.2.6.1.3 "><p id="aom_04_1016__p45920260">String</p>
</td>
<td class="cellrowborder" valign="top" width="26%" headers="mcps1.3.3.4.2.6.1.4 "><p id="aom_04_1016__p28553595">Non-null value that can be converted to a value of the <strong id="aom_04_1016__b201921752105423">long</strong> type.</p>
</td>
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.4.2.6.1.5 "><p id="aom_04_1016__p31139887">Threshold rule ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="aom_04_1016__p13501584343"><strong id="aom_04_1016__b1024195414120">Request headers</strong></p>
<p class="msonormal" id="aom_04_1016__p19248500157"><a href="#aom_04_1016__table17428844137">Table 2</a> describes the request headers.</p>
<div class="tablenoborder"><a name="aom_04_1016__table17428844137"></a><a name="table17428844137"></a><table cellpadding="4" cellspacing="0" summary="" id="aom_04_1016__table17428844137" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request headers</caption><thead align="left"><tr id="aom_04_1016__row1542824171318"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.7.2.4.1.1"><p id="aom_04_1016__p18428241134">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.7.2.4.1.2"><p id="aom_04_1016__p1142819412139">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.3.7.2.4.1.3"><p id="aom_04_1016__p1742816441311">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="aom_04_1016__row1942834191319"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.4.1.1 "><p id="aom_04_1016__p166451516193818">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.4.1.2 "><p id="aom_04_1016__p464591643812">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.7.2.4.1.3 "><p id="aom_04_1016__p156451416173813">User token obtained from IAM.</p>
</td>
</tr>
<tr id="aom_04_1016__row2428124181313"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.4.1.1 "><p id="aom_04_1016__p464641619384">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.4.1.2 "><p id="aom_04_1016__p464631663813">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.7.2.4.1.3 "><p id="aom_04_1016__p1464691683810">Content type, which is <strong id="aom_04_1016__b634093868105423">application/json</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="aom_04_1016__section23347838"><h4 class="sectiontitle">Response</h4><p class="msonormal" id="aom_04_1016__p39302919"><strong id="aom_04_1016__b18181956">Response parameters</strong></p>
<p class="msonormal" id="aom_04_1016__p29419884"><a href="#aom_04_1016__d0e3376">Table 3</a> describes the response parameters.</p>
<div class="tablenoborder"><a name="aom_04_1016__d0e3376"></a><a name="d0e3376"></a><table cellpadding="4" cellspacing="0" summary="" id="aom_04_1016__d0e3376" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="aom_04_1016__row3122427"><th align="left" class="cellrowborder" valign="top" width="29.592959295929592%" id="mcps1.3.4.4.2.4.1.1"><p id="aom_04_1016__p51590031">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="36.733673367336735%" id="mcps1.3.4.4.2.4.1.2"><p id="aom_04_1016__p18043012">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.673367336733676%" id="mcps1.3.4.4.2.4.1.3"><p id="aom_04_1016__p52197890">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="aom_04_1016__row170672"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.4.4.2.4.1.1 "><p id="aom_04_1016__p13824438">errorCode</p>
</td>
<td class="cellrowborder" valign="top" width="36.733673367336735%" headers="mcps1.3.4.4.2.4.1.2 "><p id="aom_04_1016__p46037693">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.673367336733676%" headers="mcps1.3.4.4.2.4.1.3 "><p id="aom_04_1016__p38065644">Response code.</p>
</td>
</tr>
<tr id="aom_04_1016__row7046483"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.4.4.2.4.1.1 "><p id="aom_04_1016__p33894226">errorMessage</p>
</td>
<td class="cellrowborder" valign="top" width="36.733673367336735%" headers="mcps1.3.4.4.2.4.1.2 "><p id="aom_04_1016__p61077774">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.673367336733676%" headers="mcps1.3.4.4.2.4.1.3 "><p id="aom_04_1016__p48352622">Response message.</p>
</td>
</tr>
<tr id="aom_04_1016__row32520415"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.4.4.2.4.1.1 "><p id="aom_04_1016__p16907953">thresholds</p>
</td>
<td class="cellrowborder" valign="top" width="36.733673367336735%" headers="mcps1.3.4.4.2.4.1.2 "><p id="aom_04_1016__p27366939">JSON array</p>
</td>
<td class="cellrowborder" valign="top" width="33.673367336733676%" headers="mcps1.3.4.4.2.4.1.3 "><p id="aom_04_1016__p2129606">Threshold rule list.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="msonormal" id="aom_04_1016__p19166459"><strong id="aom_04_1016__b38280410">Example response</strong></p>
<pre class="screen" id="aom_04_1016__screen8979370">{
"errorCode": "AOM.0200",
"errorMessage": "success",
"thresholds":
[
{
"id": "2137",
"alarmName": "aaaaaaaa",
"alarmDescription": "",
"actionEnabled": false,
"okActions": [],
"alarmActions": [],
"insufficientDataActions": [],
"stateValue": "alarm",
"stateReason": "",
"stateUpdatedTimestamp": null,
"metricName": "cpuCoreLimit",
"namespace": "PAAS.CONTAINER",
"statistic": "average",
"dimensions": [
{
"name": "appName",
"value": "rhm-broker"
}
],
"period": 60000,
"evaluationPeriods": 1,
"unit": "Core",
"threshold": "0",
"comparisonOperator": "&gt;=",
"alarmAdvice": "",
"alarmLevel": 3
}
]
}</pre>
</div>
<div class="section" id="aom_04_1016__section8803951"><h4 class="sectiontitle">Status Code</h4><ul id="aom_04_1016__ul47291083"><li id="aom_04_1016__li22966569">Success response<p id="aom_04_1016__p5372535"><a name="aom_04_1016__li22966569"></a><a name="li22966569"></a><a href="#aom_04_1016__table86491459125016">Table 4</a> describes the status code.</p>
<div class="tablenoborder"><a name="aom_04_1016__table86491459125016"></a><a name="table86491459125016"></a><table cellpadding="4" cellspacing="0" summary="" id="aom_04_1016__table86491459125016" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status code</caption><thead align="left"><tr id="aom_04_1016__row58979846"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="aom_04_1016__p12638194">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="aom_04_1016__p18261589486">Message</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="aom_04_1016__p17060819">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="aom_04_1016__row39749137"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="aom_04_1016__p65563539">200</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="aom_04_1016__p115208125323">OK</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="aom_04_1016__p19579466497">The request has succeeded.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="aom_04_1016__ul21085174"><li id="aom_04_1016__li55548840">Error response<p id="aom_04_1016__p30177520"><a name="aom_04_1016__li55548840"></a><a name="li55548840"></a><a href="#aom_04_1016__table939134985614">Table 5</a> describes the status codes. For more information, see <a href="aom_04_0018.html">Status Codes</a>.</p>
<div class="tablenoborder"><a name="aom_04_1016__table939134985614"></a><a name="table939134985614"></a><table cellpadding="4" cellspacing="0" summary="" id="aom_04_1016__table939134985614" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Status codes</caption><thead align="left"><tr id="aom_04_1016__row44141239"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.5.3.1.2.2.4.1.1"><p id="aom_04_1016__p18670586">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.5.3.1.2.2.4.1.2"><p id="aom_04_1016__p47075245288">Message</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.5.3.1.2.2.4.1.3"><p id="aom_04_1016__p35922469">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="aom_04_1016__row24038881"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.3.1.2.2.4.1.1 "><p id="aom_04_1016__p992341">400</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.3.1.2.2.4.1.2 "><p id="aom_04_1016__p126271018112520">Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.5.3.1.2.2.4.1.3 "><p id="aom_04_1016__p2431727192515">The request is invalid.</p>
<p id="aom_04_1016__p34352717254">The client should not repeat the request without modifications.</p>
</td>
</tr>
<tr id="aom_04_1016__row52328576"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.3.1.2.2.4.1.1 "><p id="aom_04_1016__p10756297">401</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.3.1.2.2.4.1.2 "><p id="aom_04_1016__p195759466253">Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.5.3.1.2.2.4.1.3 "><p id="aom_04_1016__p1371123810254">The authorization information provided by the client is incorrect or invalid.</p>
</td>
</tr>
<tr id="aom_04_1016__row56712700"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.3.1.2.2.4.1.1 "><p id="aom_04_1016__p30325987">403</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.3.1.2.2.4.1.2 "><p id="aom_04_1016__p15185125614254">Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.5.3.1.2.2.4.1.3 "><p id="aom_04_1016__p10447844263">The request is rejected.</p>
<p id="aom_04_1016__p20447941267">The server has received the request and understood it, but the server is refusing to respond to it. The client should not repeat the request without modifications. </p>
</td>
</tr>
<tr id="aom_04_1016__row28828553"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.3.1.2.2.4.1.1 "><p id="aom_04_1016__p53411432">500</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.3.1.2.2.4.1.2 "><p id="aom_04_1016__p2945812153211">Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.5.3.1.2.2.4.1.3 "><p id="aom_04_1016__p1815584516269">The server is able to receive the request but unable to understand the request.</p>
</td>
</tr>
<tr id="aom_04_1016__row13793060"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.3.1.2.2.4.1.1 "><p id="aom_04_1016__p43496037">503</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.5.3.1.2.2.4.1.2 "><p id="aom_04_1016__p205675500263">Service Unavailable</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.5.3.1.2.2.4.1.3 "><p id="aom_04_1016__p4668115672614">The requested service is invalid. </p>
<p id="aom_04_1016__p14669256182611">The client should not repeat the request without modifications.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="aom_04_1016__section180881121217"><h4 class="sectiontitle">Error Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="aom_04_1016__table4880211161220" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Error codes</caption><thead align="left"><tr id="aom_04_1016__row58767117124"><th align="left" class="cellrowborder" valign="top" width="33.333333333333336%" id="mcps1.3.6.2.2.4.1.1"><p id="aom_04_1016__p1287611131219">Error Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.333333333333336%" id="mcps1.3.6.2.2.4.1.2"><p id="aom_04_1016__p14876141115124">Message</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.333333333333336%" id="mcps1.3.6.2.2.4.1.3"><p id="aom_04_1016__p1687631110123">Solution</p>
</th>
</tr>
</thead>
<tbody><tr id="aom_04_1016__row1687961171220"><td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.6.2.2.4.1.1 "><p id="aom_04_1016__p20954103981711">AOM.0115</p>
</td>
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.6.2.2.4.1.2 "><p id="aom_04_1016__p8830450134519">Invalid request parameter.</p>
</td>
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.6.2.2.4.1.3 "><p id="aom_04_1016__p7954113941718">Check whether the parameter meets requirements.</p>
</td>
</tr>
<tr id="aom_04_1016__row16880411161212"><td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.6.2.2.4.1.1 "><p id="aom_04_1016__p495453931711">AOM.0501</p>
</td>
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.6.2.2.4.1.2 "><p id="aom_04_1016__p78312505457">The Cassandra session is null.</p>
</td>
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.6.2.2.4.1.3 "><p id="aom_04_1016__p79541039101711">Contact technical support.</p>
</td>
</tr>
<tr id="aom_04_1016__row199791311201315"><td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.6.2.2.4.1.1 "><p id="aom_04_1016__p2954133991712">AOM.0502</p>
</td>
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.6.2.2.4.1.2 "><p id="aom_04_1016__p1883145024517">The Cassandra execution is abnormal.</p>
</td>
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.6.2.2.4.1.3 "><p id="aom_04_1016__p16954183941711">Contact technical support.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="aom_04_1045.html">Monitoring APIs</a></div>
</div>
</div>