AWS - EC2, is there application health check like ELB?

[Edited]

How do I check my application(web server)'s health check in EC2?

Say, I have 2 ec2 instances, ec2-webApp1 and ec2-webApp2. Both of them are listening to port 80. webApp1 is connected with ELB which I can use "health check" whether if the application is running or not. http://webApp1.internal.ip/myApp:80 ==> send a Get request, and the application returns 200 OK response. I put this URL as health check URL in ELB setting.

whereas ec2-webApp2 is not connected with ELB and I want to set up monitoring alarm so when the app is not running, I can get the notification.

In the ec2-webApp2 instance, I checked "Status Checks" tab / "Monitoring" tab -> "Create Alarm," but I couldn't find like one in ELB status check where I can configure custom URL to tell AWS how to check if myApp is running.

I wonder how other people setup application monitoring.

TIA

2 answers

  • answered 2018-10-12 02:51 John Rotenstein

    The Amazon EC2 service provides a virtual machine that can run Linux or Windows. You can then install whatever software you like on that computer. Amazon EC2 never 'knows' what you are running on an instance — it could be a web application, a database, a Bitcoin miner, etc.

    The EC2 status checks merely check that the virtual machine is working, such as whether it has network access and whether it has RAM. It does not know anything about your application. So, it will detect a failure of the virtual machine, but not of your application.

    Amazon Route 53 Health Checks can monitor a web page to determine the health of an application. This is primarily done to redirect traffic to an alternate server in case of failure, but can also be used to trigger an alert via Amazon CloudWatch.

  • answered 2018-10-12 12:40 Sagar Mallick

    See this link there describe How to Use Amazon CloudWatch to Monitor Application Health without EBL.

    https://aws.amazon.com/blogs/security/how-to-use-amazon-cloudwatch-events-to-monitor-application-health/