Metabase Up and Running
上QQ阅读APP看书,第一时间看更新

Monitoring app performance

On the Elastic Beanstalk dashboard, we can see the overall health of our environment. Most of the time it should have the green checkmark, as in Figure 2.11. If you deploy using the smaller t2.micro EC2 instances, it may occasionally be in the Warning state (although I've noticed the actual app works fine in those cases):

Figure 2.12 -

In addition to the overall health check, we can drill into specific performance-related statistics around the resources we've deployed. Let's learn how to do that.

From the Elastic Beanstalk dashboard, click Monitoring on the left rail. This will bring up the performance monitoring overview, where you can view several high-level statistics about your app.

Rather than going over all the statistics presented on the dashboard, let's just learn how to create a chart of the average NetworkOut for our EC2 Instances. Recall that in the Scaling Triggers section of our environment configuration, we created rules based on this metric to decide whether or not we should add additional compute instances to handle increased traffic:

  1. In the Monitoring section, click Edit. An Add Graph section will appear on the screen. In this section, choose the following:

    a. AWSEBAutoScalingGroup as Resource.

    b. Average as Statistic.

    c. NetworkOut as CloudWatch metric.

  2. Click Add.
  3. Next, scroll back down to the Monitoring section and click Save.

Now your metric should appear in the Monitoring section of the page. To drill down into it, click the chart.

The chart presents you with a time series of the average NetworkOut value. In the upper right-hand corner of the page, you can adjust the period. Recall that we set out autoscaling rules based on a 5-minute period, and we chose 2 MB as the threshold value. Now you can monitor this statistic and see how close it gets to that threshold value based on the number of users using your Metabase instance.