Check the meter statistics
Execute the show meter statistics API to retrieve sample statistics, and check if the conditions exceed the threshold.
Example format
curl -s -H "X-Auth-Token: $TOKEN" "https://telemetry.jp-east-1.cloud.global.
fujitsu.com/v2/meters/meterSpecifiedInThresholdRule/statistics?period=
periodSpecifiedInThresholdRule&q.field=timestamp&q.op=ge&q.value=
YYYY-MM-DDThh%3Amm%3Ass&q.field=timestamp&q.op=lt&q.value=
YYYY-MM-DDThh%3Amm%3Ass&q.field=fieldSpecifiedInThresholdRule&q.op=
opSpecifiedInThresholdRule&q.value=valueSpecifiedInThresholdRule
- Specify the values of each item of "threshold_rule" obtained when checking the alarm details.
- Specify the query ("q") fields "field", "op", and "value", for each condition in the threshold rule.
- 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 meter statistics (GET /v2/meters/{meter_name}/statistics)" for details on the parameters.
Example of request
The example below retrieves meter statistics based on the parameters specified for the threshold alarm:
curl -s -H "X-Auth-Token: . . ." "https://telemetry.jp-east-1.cloud.global.
fujitsu.com/v2/meters/fcx.compute.cpu_util/statistics?period=60&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&q.field=metadata.user_metadata.groupname
&q.op=eq&q.value=az1_test_stack_vm3-auto_scaling_group-h5ve5jiy5pbf"
Example of response
[
{
"avg": 0.0,
"count": 1,
"duration": 0.0,
"duration_end": "2015-07-18T00:14:49",
"duration_start": "2015-07-18T00:14:49",
"groupby": null,
"max": 0.0,
"min": 0.0,
"period": 60,
"period_end": "2015-07-18T00:01:00",
"period_start": "2015-07-18T00:00:00",
"sum": 0.0,
"unit": "%"
},
. . .
{
"avg": 0.40000000000000002,
"count": 1,
"duration": 0.0,
"duration_end": "2015-07-18T00:41:54",
"duration_start": "2015-07-18T00:41:54",
"groupby": null,
"max": 0.40000000000000002,
"min": 0.40000000000000002,
"period": 60,
"period_end": "2015-07-18T01:00:00",
"period_start": "2015-07-18T00:59:00",
"sum": 0.40000000000000002,
"unit": "%"
}
]
- Check if there are sample statistics that satisfy the threshold conditions (specified in "threshold" and "comparison_operator" items of "threshold_rule") of the alarm in the specified timeframe.