tb_pulumi.cloudwatch¶
Infrastructural patterns related to AWS CloudWatch.
- class tb_pulumi.cloudwatch.AlbAlarmGroup(name: str, project: ThunderbirdPulumiProject, resource: LoadBalancer, monitoring_group: CloudWatchMonitoringGroup, opts: ResourceOptions = None, **kwargs)¶
 Bases:
AlarmGroupPulumi Type:
tb:cloudwatch:AlbAlarmGroupA set of alarms for Application Load Balancers. Contains the following configurable alarms:
alb_5xx: Alarms on the number of HTTP responses sourced within the load balancer with status codes in the 500-599 range, indicating a count of internal server errors. This metric concerns the load balancer itself, and does not contain any response codes generated by the targets. Defaults to alarming on 10 errors in 1 minute.target_5xx: Alarms on the number of HTTP responses sourced within the load balancer’s targets with status codes in the 500-599 range, indicating a count of internal server errors. This metric concerns the applications the load balancer points to, and does not contain any response codes generated by the load balancer itself. Defaults to alarming on 10 errors in 1 minute.response_time: Alarms on the average response time of HTTP requests. Defaults to alarming if the average response time over a minute is longer than 1 second.
Further detail on these metrics and others can be found within Amazon’s ALB metrics documentation.
- Parameters:
 name (str) – The name of the the
AlbAlarmGroupresource.project (tb_pulumi.ThunderbirdPulumiProject) – The
ThunderbirdPulumiProjectbeing monitored.resource (aws.lb.load_balancer.LoadBalancer) – The
aws.lb.load_balancer.LoadBalancerbeing monitored.monitoring_group (CloudWatchMonitoringGroup) – The
CloudWatchMonitoringGroupthis alarm group belongs to.opts (pulumi.ResourceOptions, optional) – Additional
pulumi.ResourceOptionsto apply to this resource. Defaults to None.kwargs – Any other keyword arguments which will be passed as inputs to the
tb_pulumi.monitoring.AlarmGroupsuperconstructor.
- class tb_pulumi.cloudwatch.CloudFrontDistributionAlarmGroup(name: str, project: ThunderbirdPulumiProject, resource: Distribution, monitoring_group: CloudWatchMonitoringGroup, opts: ResourceOptions = None, **kwargs)¶
 Bases:
AlarmGroupPulumi type:
tb:cloudwatch:CloudFrontDistributionAlarmGroupA set of alarms for CloudFront distributions. Contains the following configurable alarms:
distro_4xx: Alarms on the rate of HTTP responses with status codes in the 400-499 range, indicating an elevated number of calls to invalid files. This value is reported as a percentage of all responses. Defaults to alarm on at least 10% 4xx codes in 1 minute.
Further details about these metrics and more can be found in Amazon’s CloudFront distribution documentation.
- Parameters:
 name (str) – The name of the
CloudFrontDistributionAlarmGroupresource.project (tb_pulumi.ThunderbirdPulumiProject) – The
ThunderbirdPulumiProjectbeing monitored.resource (aws.cloudfront.Distribution) – The
aws.cloudfront.Distributionbeing monitored.monitoring_group (CloudWatchMonitoringGroup) – The
CloudWatchMonitoringGroupthis alarm group belongs to.opts (pulumi.ResourceOptions, optional) – Additional
pulumi.ResourceOptionsto apply to this resource. Defaults to None.kwargs – Any other keyword arguments which will be passed as inputs to the
tb_pulumi.monitoring.AlarmGroupsuperconstructor.
- class tb_pulumi.cloudwatch.CloudFrontFunctionAlarmGroup(name: str, project: ThunderbirdPulumiProject, resource: Function, monitoring_group: CloudWatchMonitoringGroup, opts: ResourceOptions = None, **kwargs)¶
 Bases:
AlarmGroupPulumi Type:
tb:cloudwatch:CloudFrontFunctionAlarmGroupA set of alarms for CloudFront functions. Contains the following configurable alarms:
cpu_utilization: Alarms when the function’s compute utilization is excessive. This value is reported as a percentage of its allotted CPU. Defaults to alarm when the function’s CPU usage has been over 80% on average for 1 minute.
Further details about these metrics and more can be found in Amazon’s CloudFront Functions documentation.
- Parameters:
 name (str) – The name of the the
CloudFrontFunctionAlarmGroupresource.project (tb_pulumi.ThunderbirdPulumiProject) – The
ThunderbirdPulumiProjectbeing monitored.resource (aws.cloudfront.Function) – The
aws.cloudfront.Functionbeing monitored.monitoring_group (CloudWatchMonitoringGroup) – The
CloudWatchMonitoringGroupthis alarm group belongs to.opts (pulumi.ResourceOptions, optional) – Additional
pulumi.ResourceOptionsto apply to this resource. Defaults to None.kwargs – Any other keyword arguments which will be passed as inputs to the
tb_pulumi.monitoring.AlarmGroupsuperconstructor.
- class tb_pulumi.cloudwatch.CloudWatchMonitoringGroup(name: str, project: ThunderbirdPulumiProject, config: dict = {}, notify_emails: list[str] = [], opts: ResourceOptions = None, tags: dict = {})¶
 Bases:
MonitoringGroupPulumi Type:
tb:cloudwatch:CloudWatchMonitoringGroupA
MonitoringGroupthat monitors AWS-based resources using AWS’s CloudWatch service and sends alerts using SNS-to-email.Produces the following
resources:sns_topic - aws.sns.Topic to notify when an alarm in this monitoring group is triggered.
sns_subscriptions - A list of aws.sns.TopicSubscription <https://www.pulumi.com/registry/packages/aws/api-docs/sns/topicsubscription/>`_s, one for each entry in ``notify_emails`.
alarms - A list of alarms contained in this monitoring group. These may be any kind of alarm in the aws.cloudwatch library.
- Parameters:
 name (str) – The name of the
CloudWatchMonitoringGroupresource.project (tb_pulumi.ThunderbirdPulumiProject) – The
ThunderbirdPulumiProjectto build monitoring resources for.config (dict, optional) – A configuration dictionary for this monitoring group. Documentation for
tb_pulumi.monitoring.MonitoringGroupdefines the overall structure of this dict. The monitors are defined as CloudWatch Metric Alarms and can be configured with the inputs documented here. Defaults to {}.notify_emails (list, optional) – A list of email addresses to notify when an alarm activates.
opts (pulumi.ResourceOptions, optional) – Additional
pulumi.ResourceOptionsto apply to this resource. Defaults to None.tags (dict, optional) – Key/value pairs to merge with the default tags which get applied to all resources in this group. Defaults to {}.
- monitor()¶
 This function gets called only after all outputs in the project have been resolved into values. It constructs all monitors for the resources in this project.
- class tb_pulumi.cloudwatch.Ec2InstanceAlarmGroup(name: str, project: ThunderbirdPulumiProject, resource: Service, monitoring_group: CloudWatchMonitoringGroup, opts: ResourceOptions = None, **kwargs)¶
 Bases:
AlarmGroupPulumi Type:
tb:cloudwatch:Ec2InstanceAlarmGroupA set of alarms for EC2 instances. Contains the following configurable alarms:
cpu_credit_balance: Alarms if your instance is low on CPU credits.cpu_utilization: Alarms on the percentage of CPU time the instance is using.ebs_status_failed: Alarms if the EBS volume status check fails.instance_status_failed: Alarms if the EC2 instance status check fails.system_status_failed: Alarms if the system status check fails.
Further detail on these metrics and more can be found on Amazon’s documentation.
- Parameters:
 name (str) – The name of the
Ec2InstanceAlarmGroupresource.project (tb_pulumi.ThunderbirdPulumiProject) – The
ThunderbirdPulumiProjectbeing monitored.resource (aws.ecs.Service) – The Pulumi resource being monitored.
monitoring_group (CloudWatchMonitoringGroup) – The
CloudWatchMonitoringGroupthis is a member of.opts (pulumi.ResourceOptions, optional) – Additional
pulumi.ResourceOptionsto apply to this resource. Defaults to None.kwargs – Any other keyword arguments which will be passed as inputs to the
tb_pulumi.monitoring.AlarmGroupsuperconstructor.
- class tb_pulumi.cloudwatch.EcsServiceAlarmGroup(name: str, project: ThunderbirdPulumiProject, resource: Service, monitoring_group: CloudWatchMonitoringGroup, opts: ResourceOptions = None, **kwargs)¶
 Bases:
AlarmGroupPulumi Type:
tb:cloudwatch:EcsServiceAlarmGroupA set of alarms for ECS services. Contains the following configurable alarms:
cpu_utilization: Alarms on the overall CPU usage of the entire service, all tasks combined. Threshold is a percentage.memory_utilization: Alarms on the overall memory usage of the entire service, all tasks combined. Threshold is a percentage.
Further detail on these metrics and more can be found on Amazon’s documentation <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/available-metrics.html>_.
- Parameters:
 name (str) – The name of the
EcsServiceAlarmGroupresource.project (tb_pulumi.ThunderbirdPulumiProject) – The
ThunderbirdPulumiProjectbeing monitored.resource (aws.ecs.Service) – The Pulumi resource being monitored.
monitoring_group (CloudWatchMonitoringGroup) – The
CloudWatchMonitoringGroupthis is a member of.opts (pulumi.ResourceOptions, optional) – Additional
pulumi.ResourceOptionsto apply to this resource. Defaults to None.kwargs – Any other keyword arguments which will be passed as inputs to the
tb_pulumi.monitoring.AlarmGroupsuperconstructor.
- class tb_pulumi.cloudwatch.LbTargetGroupAlarmGroup(name: str, project: ThunderbirdPulumiProject, resource: TargetGroup, monitoring_group: CloudWatchMonitoringGroup, opts: ResourceOptions = None, **kwargs)¶
 Bases:
AlarmGroupPulumi Type:
tb:cloudwatch:LbTargetGroupAlarmGroupA set of alarms for EC2 load balancer target groups. Contains the following configurable alarms:
unhealthy_hosts: Alarms on the number of unhealthy hosts in a target group. Defaults to alarm when the average of unhealthy hosts is over 1 in 1 minute.
Further detail on these metrics and others can be found within Amazon’s Target Group metric documentation.
- Parameters:
 name (str) – The name of the the
LbTargetGroupAlarmGroupresource.project (tb_pulumi.ThunderbirdPulumiProject) – The
ThunderbirdPulumiProjectbeing monitored.resource (aws.lb.target_group.TargetGroup) – The
aws.lb.target_group.TargetGroupbeing monitored.monitoring_group (CloudWatchMonitoringGroup) – The
CloudWatchMonitoringGroupthis alarm group belongs to.opts (pulumi.ResourceOptions, optional) – Additional
pulumi.ResourceOptionsto apply to this resource. Defaults to None.kwargs – Any other keyword arguments which will be passed as inputs to the
tb_pulumi.monitoring.AlarmGroupsuperconstructor.
- class tb_pulumi.cloudwatch.LoadBalancerAlarmGroup(name: str, project: ThunderbirdPulumiProject, resource: LoadBalancer, monitoring_group: CloudWatchMonitoringGroup, opts: ResourceOptions = None, **kwargs)¶
 Bases:
AlarmGroupIn AWS, a load balancer can have a handful of types:
application,gateway, ornetwork. The metrics emitted by the load balancer - and therefore the kinds of alarms we can build - depend on which type it is. However, all types are represented by the same class,aws.lb.load_balancer.LoadBalancer. This necessitates a class for disambiguation. Theload_balancer_typeis an Output, so here we wait until we can determine that type, then build the appropriate AlarmGroup class for the resource.- Parameters:
 name (str) – The name of the alarm group resource.
monitoring_group (MonitoringGroup) – The
MonitoringGroupthat thisAlarmGroupbelongs to.project (tb_pulumi.ThunderbirdPulumiProject) – The
ThunderbirdPulumiProjectwhose resources are being monitored.resource (pulumi.Resource) – The Pulumi
Resourceobject thisAlarmGroupis building alarms for.opts (pulumi.ResourceOptions, optional) – Additional
pulumi.ResourceOptionsto apply to this resource. Defaults to None.kwargs – Any other keyword arguments which will be passed as inputs to the
tb_pulumi.monitoring.AlarmGroupsuperconstructor.