We help IT Professionals succeed at work.

Amazon Ec2 cloud application monitoring

qutbud asked

We have a custom java application running on Amazon EC2 cloud. This is our production environment and we would like a monitoring solution which can send us alerts if any page of the website is running slow or not working. In addition any necessary monitoring for application server and key configurations.

Based on the above scenario we have the following two questions

1) Can Amazon Cloud watch (monitoring solution from Amazon) help us to achieve these requirements

2) What parameters are recommended to monitor on the application server side. We are currently running our application on JBOSS server

Any help will be really appreciated
Watch Question

Exec Consultant
Distinguished Expert 2019
1) Cloud watch is more of instance health checks instead of drilling into pages as stated. It does not have that granularity as far as I understand of the native offering.

The closest which is still good for health monitor is via the Route 53 - see this
We can create the health checks for HTTP/HTTPS/TCP based protocol services and choose the Request Interval, failure threshold and then create a cloud watch alarm to alert us in case of failure. If we have a custom response for any URL other than standard 200 or 302, we can provide the “Search String” and if the results match to that string, it will be considered as a success one.
Ref from AWS on R53
- http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-simple-configs.html

For info, you can also monitor Log files with Amazon CloudWatch Logs. Common use case include you can configure the EC2Config service to send a variety of data and log files to CloudWatch including: custom text logs, Event (Application, Custom, Security, System) logs, Event Tracing (ETW) logs, and Performance Counter (PCW) data.  http://aws.amazon.com/cloudwatch/faqs/

2) Instead I was thinking to use load balancing (e.g. ELB) for HTTP to better the alarm situation contextually. It is also good practice for HA augmenting AWS readily redundancy in built with auto scaling instances etc. The metric to use can include latency and the HTTP error codes and the no of time as threshold before declaring the health state of up or down..

Ref from AWS on metric

You may want to check out Pingdom
Check type:

HTTP(S) - Monitor a web page. A basic uptime check, this check performs a GET request to the site you’ve specified. Works on both HTTP and HTTPs and can include POST data as well as custom headers and looking for a particular string in the HTML of the site. The HTTP check is performed by a single GET request, which fetches the HTML code and header of your website. The HTTP check does not fetch any dynamic content, no images, Flash, JavaScript etc.

HTTP Custom - Connect Pingdom with scripts on your server and set it up to Alert you in case of issues as well as collect data for reports in Pingdom.

Transaction Monitor - Multi-step transaction monitoring to monitor website functionality. See the dedicated section of our FAQ here for more details. Compared to the HTTP check this check type does fetch dynamic content.
Phil PhillipsSenior Platform Engineer

As far as application monitoring goes (especially for Java), New Relic is a really good tool.  You basically embed a jar into your application, and stats on how long requests take (and where the time is being spent) are sent over to New Relic.  They do a pretty good job of presenting the information, and you can set it up so you get alerts.

New Relic also has some instance-level monitoring included (CPU, RAM, etc).  If you want something a little more specialized as far as monitoring the system level stuff, Datadog is a good service.
btanExec Consultant
Distinguished Expert 2019

Just to add even, taking other EC2 instance like Beanstalk (java app, .war)
An Elastic Beanstalk application is a logical collection of Elastic Beanstalk components, including environments, versions, and environment configurations. In Elastic Beanstalk an application is conceptually similar to a folder.
, by default, only basic Amazon CloudWatch metrics are enabled; they will return data in 5mins periods. You can go for more granular like 1min CloudWatch metrics (e.g select 1 min for the Monitoring Interval in the Server - under Configuration tab in the AWS Toolkit for Eclipse). It seems to tag to URL but it is rather to apps as mentioned -
To check application health status, every minute or two Elastic Load Balancing sends a request to the application health check URL. By default, Elastic Load Balancing uses TCP:80 for nonlegacy configurations and HTTP:80 for legacy configurations. (If you are unsure if you are running a legacy configuration, check the Elastic Beanstalk console. For instructions, see To check if you are using a legacy container type.) You can choose to override this setting by specifying an existing resource in your application. If you specify a path like /myapp/index.jsp, the health check URL is set to http:80//myapp/index.jsp. (The exact port number depends on your environment's configuration.) However, you can also specify a different protocol and port, such as UDP:8888. For instructions on modifying your health check URL using the AWS Management Console, see Health Checks.
see also http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.healthstatus.html

So far, did not see any off the box from CloudWatch by default though. So customisation with interface or ext svc (as shared previously) into your critical page likely the route for such monitoring. Another svc is site24x7
Mihai CorbuleacAzure/AWS consultant

New Relic is good, but after we started using Unigma we realized there was a massive need for a Unified Cloud Management platform, as it make things much easier and simpler.

We use Unigma because it is more than just a control panel: we manage multiple AWS, Azure customers, departments and projects under a single pane of glass, it allows us to control our cloud spend (it helps us save 10% - 40% on Public Cloud costs), and we can issue customized reports, and much more.