From ad00e3a52a3ba465f80fc39c7af2e604b4015b68 Mon Sep 17 00:00:00 2001 From: Hangdong Zhang Date: Mon, 17 Jul 2017 09:18:29 +0800 Subject: [PATCH] Update aodh commands in doc There were some commands in doc out of date and can not work now. By the way, I also unified "ALARM*"->"ALARM_*" in a command. PS: It seems someone have done partial works for the bug Change-Id: Id854b4bc787c5c036da9045736ce3f37b0d83ce4 Closes-Bug: #1704251 --- doc/source/admin/telemetry-alarms.rst | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/doc/source/admin/telemetry-alarms.rst b/doc/source/admin/telemetry-alarms.rst index 1637bcd9..584d6106 100644 --- a/doc/source/admin/telemetry-alarms.rst +++ b/doc/source/admin/telemetry-alarms.rst @@ -237,13 +237,15 @@ state of two underlying alarms: .. code-block:: console - $ aodh alarm create --name meta --type composite \ - --composite-rule '{"or": [{"threshold": 0.8,"metric": "cpu_util", \ - "type": "gnocchi_resources_threshold", "resource_id": INSTANCE_ID1, \ - "aggregation_method": "last", "resource_type": "instance"}, {"threshold": \ - 0.8, "metric": "cpu_util", "type": "gnocchi_resources_threshold", \ - "resource_id": INSTANCE_ID2, "aggregation_method": "last", \ - "resource_type": "instance"}]}' \ + $ aodh alarm create \ + --name meta \ + --type composite \ + --composite-rule '{"or": [{"threshold": 0.8, "metric": "cpu_util", \ + "type": "gnocchi_resources_threshold", "resource_id": INSTANCE_ID1, \ + "resource_type": "instance", "aggregation_method": "last"}, \ + {"threshold": 0.8, "metric": "cpu_util", \ + "type": "gnocchi_resources_threshold", "resource_id": INSTANCE_ID2, \ + "resource_type": "instance", "aggregation_method": "last"}]}' \ --alarm-action 'http://example.org/notify' This creates an alarm that will fire when either one of two underlying @@ -260,8 +262,10 @@ can contain nested conditions: .. code-block:: console - $ aodh alarm create --name meta --type composite \ - --composite-rule '{"or":[ALARM_1, {"and":[ALARM2, ALARM3]}]}' + $ aodh alarm create \ + --name meta \ + --type composite \ + --composite-rule '{"or": [ALARM_1, {"and": [ALARM_2, ALARM_3]}]}' \ --alarm-action 'http://example.org/notify' @@ -423,7 +427,7 @@ longer actively evaluated: .. code-block:: console - $ aodh alarm update --enabled False -a ALARM_ID + $ aodh alarm update --enabled False ALARM_ID or even deleted permanently (an irreversible step):