monitor alarm update

コマンド概要

アラームを更新します。 このAPIのパフォーマンスは“OpenStack Telemetry API: PUT /v2/alarms/{alarm_id}”.と同様の機能です。


必須パラメーター

パラメーター名 データ形式 デフォルト値 パラメーター説明
alarm_id 文字列 なし アラームID
name 文字列 なし アラームの名前
--alarm_actions URL なし アラーム状態に変更する際の措置。 ','によって異なるURLを区切ります。例 http://example.com,http://example2.com
--ok_actions URL なし アラームの状態を正常に変更する際の措置。','によって異なるURLを区切ります。例 http://example.com,http://example2.com
--field 文字列 なし クエリデータでのフィールドの名前。クエリデータのオペレーターは'eq'。
--value 文字列 なし クエリデータでのフィールド値。クエリデータの'type'は'string'。
--type 文字列 string 準じる規則を選択するための型指定子。「閾値」のみ選択可能です。
--meter_name 文字列 なし 閾値の規則. 作成されたアラームに対応するメーターの名前

任意パラメーター

パラメーター名 データ形式 デフォルト値 パラメーター説明
--threshold int 1 閾値の規則。 計算された統計に基づいてアラームが発動する際の説明
--period int 300 閾値の規則 クエリを超えた時間範囲。
--statistic 文字列 max 閾値の規則。閾値と比較するための統計 'max', 'min', 'avg', 'sum', もしくは 'count'を入力する
--evaluation_periods int 1 閾値の規則。閾値を評価するための履歴の数
--comparison_operator 文字列 gt 閾値の規則。アラーム閾値に対する比較。'lt', 'le', 'eq', 'ne', 'ge'もしくは 'gt'を入力する
--description 文字列 なし アラームの説明
--enabled bool True アラームの使用可否
--state 文字列 alarm アラームの状態。 'ok' もしくは'alarm'を入力する
--severity 文字列 moderate アラームの度合い。'low', 'moderate'もしくは'critical'を入力する
--project_id 文字列 なし アラームを所有しているテナント
--user_id 文字列 なし アラームを作成したユーザー

コマンド使用例

ecl monitor alarm create <alarm_id> --name <name> --type <type> --alarm_actions <alarm_actions> --ok_actions <ok_actions> --description <description> --field <field> --value <value> --meter_name <meter_name> --threshold <threshold> --period <period> --statistic <statistic> --evaluation_periods <evaluation_periods> --comparison_operator <comparison_operator> --description <description> --enabled <enabled> --state <state> --severity <severity> --project_id <project_id> --user_id <user_id>

$ ecl monitor alarm update c9d1b87f-7961-4b62-92ff-a8a6cb0467e6 --name updatedName --type threshold  --field resource_id --alarm_actions http://example.com --ok_actions http://example.com --description update_description --value baremetal-server_752aac2e-4b82-4d47-a7c7-fcbd0cbc86e2 --meter_name baremetal-server.chassis-power.status.bool

+---------------------------+-------------------------------------------------------------------------------------+
| Field                     | Value                                                                               |
+---------------------------+-------------------------------------------------------------------------------------+
| alarm_actions             | http://example.com                                                                  |
| alarm_id                  | c9d1b87f-7961-4b62-92ff-a8a6cb0467e6                                                |
| deleted                   | False                                                                               |
| description               | update_description                                                                  |
| enabled                   | True                                                                                |
| insufficient_data_actions |                                                                                     |
| name                      | updatedName                                                                         |
| ok_actions                | http://example.com                                                                  |
| project_id                | 72ab9350a47a4173966ad02dc51b32a1                                                    |
| repeat_actions            | False                                                                               |
| resource_name             | Bare-SDK-TEST                                                                       |
| severity                  | moderate                                                                            |
| state                     | ok                                                                                  |
| state_timestamp           |                                                                                     |
| threshold_rule            | meter_name: baremetal-server.chassis-power.status.bool                              |
|                           | evaluation_periods: 1                                                               |
|                           | evaluation_type: 0                                                                  |
|                           | period: 300                                                                         |
|                           | statistic: max                                                                      |
|                           | threshold: 1.0                                                                      |
|                           | query: [field: resource_id, type: string, value: baremetal-server_752aac2e-         |
|                           | 4b82-4d47-a7c7-fcbd0cbc86e2, op: eq]                                                |
|                           | comparison_operator: gt                                                             |
|                           | exclude_outliers: False                                                             |
| time_constraints          |                                                                                     |
| timestamp                 | 2016-09-27T11:09:50+00:00                                                           |
| type                      | threshold                                                                           |
| user_id                   | 26c0876cc25942849acfc822d7378046                                                    |
+---------------------------+-------------------------------------------------------------------------------------+