Check the alarm history

Execute the show alarm history API to check the action execution state of the alarm.

Example format


curl -s -H "X-Auth-Token: . . ." "https://telemetry.jp-east-1.cloud.global.fujitsu.com/v2/alarms/alarmId/history?q.field=timestamp&q.op=ge&q.value=startDatetime&q.field= timestamp&q.op=lt&q.value=endDatetime       
     
  • Replace alarmId with the ID of the alarm.
  • Specify the datetimes using the format "YYYY-MM-DDThh%3Amm%3Ass".
    • YYYY: Year, MM: Month, DD: Day, hh: Hour, mm: minutes, ss: seconds. The first half of the query concerns the start datetime, and the latter half concerns the end datetime (startDatetime <= timestamp < endDatetime). Specify the timeframe to be checked (in UTC).
    • "%3A" is the encoded value for ":". Specify it as is.
  • Refer to "Show alarm history (GET /v2/alarms/{alarm_id}/history)" for details on the parameters.

Example of request

The example below retrieves the history entries for the alarm "2a5d914d-ac5c-474d-8550-58098f668a66" recorded on July 18, 2015 between 00:00:00 and 01:00:00(UTC):


curl -s -H "X-Auth-Token: . . ." "https://telemetry.jp-east-1.cloud.global.
fujitsu.com/v2/alarms/2a5d914d-ac5c-474d-8550-58098f668a66/history?q.field=
timestamp&q.op=ge&q.value=2015-07-18T00%3A00%3A00&q.field=timestamp&q.op=
lt&q.value=2015-07-18T01%3A00%3A00"       
     

Example of response


[
    {
        "alarm_id": "2a5d914d-ac5c-474d-8550-58098f668a66",
        "detail": "{\"notification_resource\": \"\", \"region\": 
\"jp-east-1\", \"action_state\": \"Succeeded\", \"reason\": \"Remaining as 
alarm due to 1 samples outside threshold, most recent: 0.0\", \"error\": \"
\", \"action\": \"http://orchestration-cfn.jp-east-1.internal.cloud.global.
fujitsu.com/v1/signal/arn%3Aopenstack%3Aheat%3A%3Acd1e2866ebda406bb16b81960
22e2692%3Astacks%2Faz1_test_stack_vm3%2F548ae98a-a0bc-43bd-aff5-a4146f78358
5%2Fresources%2Fscalein_policy?Timestamp=2015-07-17T05%3A34%3A21Z&Signature
Method=HmacSHA256&AWSAccessKeyId=cab5efa3009b4f00817b354b0744601e&Signature
Version=2&Signature=FKLe2NApryuVZUCybV%2F%2Ffmd21xw%2BYApUSridiKE5M%2FE
%3D\", \"alarm\": {\"alarm_actions\": [\"http://orchestration-cfn.jp-east-1.
internal.cloud.global.fujitsu.com/v1/signal/arn%3Aopenstack%3Aheat%3A
%3Acd1e2866ebda406bb16b8196022e2692%3Astacks%2Faz1_test_stack_vm3%2F548ae98
a-a0bc-43bd-aff5-a4146f783585%2Fresources%2Fscalein_policy?Timestamp=2015-
07-17T05%3A34%3A21Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=
cab5efa3009b4f00817b354b0744601e&SignatureVersion=2&Signature=
FKLe2NApryuVZUCybV%2F%2Ffmd21xw%2BYApUSridiKE5M%2FE%3D\"], \"ok_actions\":
[], \"description\": \"Scale-in if the average CPU < 15% for 1 minutes\",
\"state \": \"alarm\", \"timestamp\": \"2015-07-17T05:34:28.674867\", 
\"enabled\": true, \"state_timestamp\": \"2015-07-17T05:35:52.188434\", 
\"rule\": {\"meter_name\": \"fcx.compute.cpu_util\", \"evaluation_
periods\": 1,\"period\": 60, \"statistic\": \"avg\", \"threshold\": 15.0,
\"query\": [{\"field\": \"metadata.user_metadata.groupname\", \"value\":
\"az1_test_stack_vm3-auto_scaling_group- h5ve5jiy5pbf\", \"op\": \"eq\"},
{\"field\":\"project_id\", \"value\": \"c52b2f54d96a4c28ba9a318eae9c843c\",
\"op\": \"eq\"}],  \"comparison_operator\": \"lt\", \"exclude_outliers\":
false}, \"alarm_id\": \"2a5d914d-ac5c-474d-8550-58098f668a66\", \"time_
constraints \": [], \"insufficient_data_actions\": [], \"repeat_actions\":
true, \"user_id\": \"2cc0568f5daf4ac694a49f3b32a42dfc\", \"project_id\":  
\"c52b2f54d96a4c28ba9a318eae9c843c\", \"type\": \"threshold\", \"name\":
\"az1_test_stack_vm3-scalein_alarm-fzps2blpsiql \"}, \"previous\": \"alarm\"}",
        "event_id": "02c06d0e-f78d-463c-a775-c63b337e771d",
        "on_behalf_of": "c52b2f54d96a4c28ba9a318eae9c843c",
        "project_id": "c52b2f54d96a4c28ba9a318eae9c843c",
        "timestamp": "2015-07-18T00:01:00.182820",
        "type": "action",
        "user_id": "2cc0568f5daf4ac694a49f3b32a42dfc"
    },
    . . .
]       
     
  • The action execution history is shown for items with "action" set for the "type" value.
  • If the "action" history exists, check the "action_state" value inside the "detail" values.
    • If "action_state" is "Succeeded", this indicates that the action was executed successfully.
    • If "action_state" is "Failed", this indicates that the action was executed but ended in error. Check the "error" and "error_message" values inside the "detail" values, then refer to "Action execution errors" and address the error accordingly.
    • If the "action" history does not exist, the action has not been executed. Perform the steps below to check if the alarm threshold has been exceeded.