get_relational_database_metric_data
async
¶
get_relational_database_metric_data(
relational_database_name: ResourceName,
metric_name: RelationalDatabaseMetricName,
period: MetricPeriod,
start_time: IsoDate,
end_time: IsoDate,
unit: MetricUnit,
statistics: MetricStatisticList,
*,
config_overrides: Optional[AsyncLightsailClientConfig] = None,
) -> GetRelationalDatabaseMetricDataResult
Returns the data points of the specified metric for a database in Amazon Lightsail.
Metrics report the utilization of your resources, and the error counts generated by them. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.
Parameters:
-
relational_database_name(ResourceName) –The name of your database from which to get metric data.
-
metric_name(RelationalDatabaseMetricName) –The metric for which you want to return information.
Valid relational database metric names are listed below, along with the most useful
statisticsto include in your request, and the publishedunitvalue. All relational database metric data is available in 1-minute (60 seconds) granularity.-
CPUUtilization- The percentage of CPU utilization currently in use on the database.Statistics: The most useful statistics areMaximumandAverage.Unit: The published unit isPercent. -
DatabaseConnections- The number of database connections in use.Statistics: The most useful statistics areMaximumandSum.Unit: The published unit isCount. -
DiskQueueDepth- The number of outstanding IOs (read/write requests) that are waiting to access the disk.Statistics: The most useful statistic isSum.Unit: The published unit isCount. -
FreeStorageSpace- The amount of available storage space.Statistics: The most useful statistic isSum.Unit: The published unit isBytes. -
NetworkReceiveThroughput- The incoming (Receive) network traffic on the database, including both customer database traffic and AWS traffic used for monitoring and replication.Statistics: The most useful statistic isAverage.Unit: The published unit isBytes/Second. -
NetworkTransmitThroughput- The outgoing (Transmit) network traffic on the database, including both customer database traffic and AWS traffic used for monitoring and replication.Statistics: The most useful statistic isAverage.Unit: The published unit isBytes/Second.
-
-
period(MetricPeriod) –The granularity, in seconds, of the returned data points.
All relational database metric data is available in 1-minute (60 seconds) granularity.
-
start_time(IsoDate) –The start of the time interval from which to get metric data.
Constraints:
-
Specified in Coordinated Universal Time (UTC).
-
Specified in the Unix time format.
For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, then you input
1538424000as the start time.
-
-
end_time(IsoDate) –The end of the time interval from which to get metric data.
Constraints:
-
Specified in Coordinated Universal Time (UTC).
-
Specified in the Unix time format.
For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, then you input
1538424000as the end time.
-
-
unit(MetricUnit) –The unit for the metric data request. Valid units depend on the metric data being requested. For the valid units with each available metric, see the
metricNameparameter. -
statistics(MetricStatisticList) –The statistic for the metric.
The following statistics are available:
-
Minimum- The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application. -
Maximum- The highest value observed during the specified period. Use this value to determine high volumes of activity for your application. -
Sum- All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric. -
Average- The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources. -
SampleCount- The count, or number, of data points used for the statistical calculation.
-
Raises:
-
AccessDeniedException–Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.
-
AccountSetupInProgressException–Lightsail throws this exception when an account is still in the setup in progress state.
-
InvalidInputException–Lightsail throws this exception when user input does not conform to the validation rules of an input field.
Domain and distribution APIs are only available in the N. Virginia (
us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration tous-east-1to create, view, or edit these resources. -
NotFoundException–Lightsail throws this exception when it cannot find a resource.
-
OperationFailureException–Lightsail throws this exception when an operation fails to execute.
-
RegionSetupInProgressException–Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up.
-
ServiceException–A general service exception.
-
UnauthenticatedException–Lightsail throws this exception when the user has not been authenticated.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lightsail/_services/async_lightsail.py
7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 | |