IoTWireless / Client / get_metrics
get_metrics#
- IoTWireless.Client.get_metrics(**kwargs)#
Get the summary metrics for this AWS account.
See also: AWS API Documentation
Request Syntax
response = client.get_metrics( SummaryMetricQueries=[ { 'QueryId': 'string', 'MetricName': 'DeviceRSSI'|'DeviceSNR'|'DeviceUplinkCount'|'DeviceDownlinkCount'|'DeviceUplinkLostCount'|'DeviceUplinkLostRate'|'DeviceJoinRequestCount'|'DeviceJoinAcceptCount'|'DeviceRoamingUplinkCount'|'DeviceRoamingDownlinkCount'|'GatewayUpTime'|'GatewayDownTime'|'GatewayRSSI'|'GatewaySNR'|'GatewayUplinkCount'|'GatewayDownlinkCount'|'GatewayJoinRequestCount'|'GatewayJoinAcceptCount'|'AwsAccountUplinkCount'|'AwsAccountDownlinkCount'|'AwsAccountUplinkLostCount'|'AwsAccountUplinkLostRate'|'AwsAccountJoinRequestCount'|'AwsAccountJoinAcceptCount'|'AwsAccountRoamingUplinkCount'|'AwsAccountRoamingDownlinkCount'|'AwsAccountDeviceCount'|'AwsAccountGatewayCount'|'AwsAccountActiveDeviceCount'|'AwsAccountActiveGatewayCount', 'Dimensions': [ { 'name': 'DeviceId'|'GatewayId', 'value': 'string' }, ], 'AggregationPeriod': 'OneHour'|'OneDay'|'OneWeek', 'StartTimestamp': datetime(2015, 1, 1), 'EndTimestamp': datetime(2015, 1, 1) }, ] )
- Parameters:
SummaryMetricQueries (list) –
The list of queries to retrieve the summary metrics.
(dict) –
The summary metric query object.
QueryId (string) –
The id of the summary metric query.
MetricName (string) –
The name of the metric.
Dimensions (list) –
The dimensions of the summary metric.
(dict) –
The required list of dimensions for the metric.
name (string) –
The name of the dimension.
value (string) –
The dimension’s value.
AggregationPeriod (string) –
The aggregation period of the summary metric.
StartTimestamp (datetime) –
The start timestamp for the summary metric query.
EndTimestamp (datetime) –
The end timestamp for the summary metric query.
- Return type:
dict
- Returns:
Response Syntax
{ 'SummaryMetricQueryResults': [ { 'QueryId': 'string', 'QueryStatus': 'Succeeded'|'Failed', 'Error': 'string', 'MetricName': 'DeviceRSSI'|'DeviceSNR'|'DeviceUplinkCount'|'DeviceDownlinkCount'|'DeviceUplinkLostCount'|'DeviceUplinkLostRate'|'DeviceJoinRequestCount'|'DeviceJoinAcceptCount'|'DeviceRoamingUplinkCount'|'DeviceRoamingDownlinkCount'|'GatewayUpTime'|'GatewayDownTime'|'GatewayRSSI'|'GatewaySNR'|'GatewayUplinkCount'|'GatewayDownlinkCount'|'GatewayJoinRequestCount'|'GatewayJoinAcceptCount'|'AwsAccountUplinkCount'|'AwsAccountDownlinkCount'|'AwsAccountUplinkLostCount'|'AwsAccountUplinkLostRate'|'AwsAccountJoinRequestCount'|'AwsAccountJoinAcceptCount'|'AwsAccountRoamingUplinkCount'|'AwsAccountRoamingDownlinkCount'|'AwsAccountDeviceCount'|'AwsAccountGatewayCount'|'AwsAccountActiveDeviceCount'|'AwsAccountActiveGatewayCount', 'Dimensions': [ { 'name': 'DeviceId'|'GatewayId', 'value': 'string' }, ], 'AggregationPeriod': 'OneHour'|'OneDay'|'OneWeek', 'StartTimestamp': datetime(2015, 1, 1), 'EndTimestamp': datetime(2015, 1, 1), 'Timestamps': [ datetime(2015, 1, 1), ], 'Values': [ { 'Min': 123.0, 'Max': 123.0, 'Sum': 123.0, 'Avg': 123.0, 'Std': 123.0, 'P90': 123.0 }, ], 'Unit': 'string' }, ] }
Response Structure
(dict) –
SummaryMetricQueryResults (list) –
The list of summary metrics that were retrieved.
(dict) –
The result of the summary metrics aggregation operation.
QueryId (string) –
The ID of the summary metric results query operation.
QueryStatus (string) –
The status of the summary metric query result.
Error (string) –
The error message for the summary metric query result.
MetricName (string) –
The name of the summary metric query result.
Dimensions (list) –
The dimensions of the metric.
(dict) –
The required list of dimensions for the metric.
name (string) –
The name of the dimension.
value (string) –
The dimension’s value.
AggregationPeriod (string) –
The aggregation period of the metric.
StartTimestamp (datetime) –
The start timestamp for the summary metric query.
EndTimestamp (datetime) –
The end timestamp for the summary metric query.
Timestamps (list) –
The timestamp of each aggregation result.
(datetime) –
Values (list) –
The list of aggregated summary metric query results.
(dict) –
The aggregated values of the metric.
Min (float) –
The minimum of the values of all data points collected during the aggregation period.
Max (float) –
The maximum of the values of all the data points collected during the aggregation period.
Sum (float) –
The sum of the values of all data points collected during the aggregation period.
Avg (float) –
The average of the values of all data points collected during the aggregation period.
Std (float) –
The standard deviation of the values of all data points collected during the aggregation period.
P90 (float) –
The 90th percentile of the values of all data points collected during the aggregation period.
Unit (string) –
The units of measurement to be used for interpreting the aggregation result.
Exceptions
IoTWireless.Client.exceptions.ValidationException
IoTWireless.Client.exceptions.ResourceNotFoundException
IoTWireless.Client.exceptions.AccessDeniedException
IoTWireless.Client.exceptions.ConflictException
IoTWireless.Client.exceptions.InternalServerException
IoTWireless.Client.exceptions.ThrottlingException