get_container_service_metric_data
async
¶
get_container_service_metric_data(
service_name: ContainerServiceName,
metric_name: ContainerServiceMetricName,
start_time: IsoDate,
end_time: IsoDate,
period: MetricPeriod,
statistics: MetricStatisticList,
*,
config_overrides: Optional[AsyncLightsailClientConfig] = None,
) -> GetContainerServiceMetricDataResult
Returns the data points of a specific metric of your Amazon Lightsail container service.
Metrics report the utilization of your resources. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.
Parameters:
-
service_name(ContainerServiceName) –The name of the container service for which to get metric data.
-
metric_name(ContainerServiceMetricName) –The metric for which you want to return information.
Valid container service metric names are listed below, along with the most useful statistics to include in your request, and the published unit value.
-
CPUUtilization- The average percentage of compute units that are currently in use across all nodes of the container service. This metric identifies the processing power required to run containers on each node of the container service.Statistics: The most useful statistics are
MaximumandAverage.Unit: The published unit is
Percent. -
MemoryUtilization- The average percentage of available memory that is currently in use across all nodes of the container service. This metric identifies the memory required to run containers on each node of the container service.Statistics: The most useful statistics are
MaximumandAverage.Unit: The published unit is
Percent.
-
-
start_time(IsoDate) –The start time of the time period.
-
end_time(IsoDate) –The end time of the time period.
-
period(MetricPeriod) –The granularity, in seconds, of the returned data points.
All container service metric data is available in 5-minute (300 seconds) granularity.
-
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 ofSum/SampleCountduring the specified period. By comparing this statistic with theMinimumandMaximumvalues, you can determine the full scope of a metric and how close the average use is to theMinimumandMaximumvalues. 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.
-
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.
-
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
5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 | |