get_container_service_metric_data
¶
get_container_service_metric_data(
service_name: ContainerServiceName,
metric_name: ContainerServiceMetricName,
start_time: IsoDate,
end_time: IsoDate,
period: MetricPeriod,
statistics: MetricStatisticList,
*,
config_overrides: Optional[LightsailClientConfig] = 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/lightsail.py
5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 | |