Create Alarm in AWS

Create Alarm for Auto Scaling Activity

Introduction:

 

AWS Alarm monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real time. With help of alarm we will monitor Auto Scaling setups load. For that we have to Create Alarm for AutoScaling Activity


Why we have to create alarm:

  • You can create a cloud watch alarm that monitors cloud watch metrics for one of your instances.
  • A new notification sent when it reach a threshold you specify.

To Create Alarm for AutoScaling Activity:

  • Go to the EC2 dashboard.
  • At the end of the left side margin, you will find a Load Balancer.

Create Alarm for AutoScaling Activity

Fig. EC2 dashboard.

Click on the Load Balancer.

Create Load Balancer for Create Alarm for AutoScaling Activity

Fig. Load balancer page.

Now create a Load balancer by clicking Create Load balancer.

Define Load Balancer

Fig. Define the Load balancer page.

Give the Load balancer name and Click on Next.

Add Security Group

Fig. Assign the Security groups page.

If u have an existing security group select that group
However, you can create a new security group and
Click on Next.

Configure Health Check

Fig. Configure the Health Check page.

Check the details and click on Next.

Add EC2

Fig. Add the EC2 instances page.

 

 

F:\Screenshots\Screenshot (238).png

Fig. Add tags page.

Give key names as you want and click on Review and create.

F:\Screenshots\Screenshot (239).png

Fig. Review page.


Check the details that you have given and if you have any corrections click on edit and modify and Click on Create.

Load balancer creation

Fig. A load balancer has created.

How to create Launch Configuration:

  • In the EC2 dashboard, you will find Auto scaling at the bottom of the left side menu.

Launch Configuration Fig. EC2 dashboard showing auto-scaling.

Click on Launch Configuration.

Launch Configuration

Fig. Launch configuration page.


Click on Create Launch Configuration.

F:\Screenshots\Screenshot (304).png

Fig. Choose the AMI page.


Select Amazon Linux 64 bit.

F:\Screenshots\Screenshot (243).png

Fig. Create a Launch Configuration page.

 

Select type t2.micro and Click on Next.

F:\Screenshots\Screenshot (305).png

Fig. Configure the details page.

Give Name- Click on Next.

F:\Screenshots\Screenshot (244).png

Fig. Create a Launch Configuration page.


Click on Next
.

F:\Screenshots\Screenshot (245).png

Fig. configure the security group.

 

We have to assign a security group if it is already existing.
If it is not present create a new security group.
Select the security groups that already exist.
Click on Review.

F:\Screenshots\Screenshot (246).png Fig. Review of Page.


Verify the details and click on Create Launch Configuration.

F:\Screenshots\Screenshot (307).png

Fig. Key pair selection.

  • Select the existing key pair or create a new key pair.
  • Click on Create Launch Configuration.

F:\Screenshots\Screenshot (247).png

Fig. Launch configuration created page.

How to Create Auto Scaling:

  • In launch configuration created page click on Create an Auto Scaling group.

F:\Screenshots\Screenshot (250).png

Fig. Auto Scaling Group Page.

 

  • Give the Group Name.
  • Select all the subnets that are present.
  • Click on Advanced Details.

F:\Screenshots\Screenshot (251).png

Fig. Advanced Details Page.

 

  • Select the Load balancers which you want balance.
  • Select Heath check type EC2.
  • Click on Next configure scaling policies.

F:\Screenshots\Screenshot (310).png

Fig. Autoscaling Group.

 

  • Select the use of scaling policies for the auto-scaling group.
  • The scale should be between 1 and 2 instances.
  • Click on the scale of the auto-scaling group at the bottom of the page.

F:\Screenshots\Screenshot (312).png

Fig. Increase the group size page.

 

Now execute policy create an alarm-

Fig. Create an Alarm Page.

 

  • Give the name which you want to send a notification to.
  • In with these recipients give the mail ID.
  • It gives> the number which you want.
  • Change in alarm name

F:\Screenshots\Screenshot (255).png

Fig. Alarm page.

 

  • Click on Create Alarm.

F:\Screenshots\Screenshot (314).png

Fig. Decrease Group Size page.

 

  • Click on Add Alarm.

F:\Screenshots\Screenshot (256).png

Fig. Add the Alarm page.

 

  • A default notification will be selected as we have already created for the increase.
  • In IS we have to select <=.
  • Change increase and decrease
  • Click on create alarm.

F:\Screenshots\Screenshot (257).png

In decrease group size take the action from 1, not from  and Click on Next.

F:\Screenshots\Screenshot (258).png

Fig. Configure Notifications page.

  • Send the notification to the default topic.
  • Click on Next.

F:\Screenshots\Screenshot (259).png

Fig. Configure the Tags page.

  • Give a name to the key.
  • Click on Review.

Create Alarm for AutoScaling Activity

Fig. Auto-scaling details.

F:\Screenshots\Screenshot (261).png

Fig. scaling policies and remaining details page.

  • Check the details and click on Create Auto Scaling Group.

F:\Screenshots\Screenshot (262).png

Fig. The Autoscaling group has created

.

Conclusion:

By this, we know how to create a Load balancer, Launch Configuration, and Auto Scaling Groups.

Leave a Reply

%d bloggers like this: