Missing Metrics for Load balancer server errors monitored (AWS) Test

  • Updated

When attempting to remediate the Load balancer server errors monitored (AWS), administrators may notice that the metrics listed do not appear as selectable options when creating an Alarm.  This is a blocker for creating the alarm, but the good news is administrators can get around this by adding the metric via JSON.  This article will provide steps on how to do this for Applications and Classic load balancers. 

 

Steps for Application Load Balancers

  • Head into EC2 and click Load Balancers on the left-hand menu


mceclip4.png

  • Click into the load balancer you want to remediate


mceclip6.png


  • You should be taken to the details page for the selected load balancer, now copy the full name of the load balancer starting from 'app/' from under the Details drop-down box


mceclip5.png


  • Also, make note of the region the load balancer exists in; if you are not sure about this, you can always check the test page, as we show the region the load balancer exists in


mceclip7.png


  • Now please open your text editor of choice and paste in the following JSON text:

    {

    "metrics": [

    [ "AWS/ApplicationELB", "HTTPCode_Target_5XX_Count", "LoadBalancer", "NAME", { "stat": "Average" } ]

    ],

    "view": "timeSeries",

    "stacked": false,

    "period": 300,

    "region": "REGION"

    }


  • Replace 'NAME' with the name of the load balancer you copied from the details section, and replace 'REGION' with the region the load balancer exists in:

    mceclip8.png


  • Once that is complete, now head back into AWS and go to Cloudwatch to create a new alarm
  • Click Select Metric


mceclip9.png

  •  Then select the  'Source' tab:


mceclip10.png


  • Now Paste in the JSON from the text file with your load balancer name and region updated



mceclip11.png

  • Now click Update on the top right under Add query


mceclip12.png


  • Then click Select Metric on the bottom right


mceclip13.png


  • You will be taken to a screen where you can now customize the statistic AWS will monitor by clicking the looking glass and choosing your desired stat


mceclip15.png

mceclip16.png


You can also change the period, but the metric name and load balancer name should not be modified!


  • You can scroll down and also specify the conditions to your liking and click next to finish


mceclip14.png

  • You can finish creating the alarm as normal (provide name, description, and configure notifications settings).  Once the alarm is created, Vanta should pick this up in an hour, and the load balancer should no longer be flagged on the test page.

 

Steps for Classic Load Balancer 

  • Head into EC2 and click Load Balancers on the left-hand menu


mceclip4.png


  • Click into the load balancer you want to remediate


mceclip17.png


  • You should be taken to the details page for the selected load balancer, now copy the full name of the load balancer:

    mceclip18.png



  • Also, make a note of the region the load balancer exists in; if you are not sure about this, you can always check the test page, as we show the region the load balancer exists in

    mceclip19.png
  • then, please open your text editor of choice and paste in the following JSON text

{

"metrics": [

[ "AWS/ELB", "HTTPCode_Backend_5XX", "LoadBalancerName", "ENTER_NAME_HERE", { "stat": "Average" } ]

],

"view": "timeSeries",

"stacked": false,

"period": 300,

"region": "ENTER_REGION_HERE"

}



  • Replace 'ENTER_NAME_HERE' with the name of the load balancer you copied from the details section, and replace 'ENTER_REGION_HERE' with the region the load balancer exists in



mceclip20.png


  • Once that is complete, now head back into AWS and go to Cloudwatch to create a new alarm
  • Click Select Metric


mceclip9.png

  •  Then select the  Source tab


mceclip10.png


  • Paste in the JSON from the text file with your load balancer name and region updated



mceclip22.png

  • Click Update on the top right under Add query



mceclip21.png

  • Then click Select Metric on the bottom right



mceclip23.png


  • You will be taken to a screen where you can now customize the statistic AWS will monitor by clicking the looking glass and choosing your desired stat



mceclip24.png

mceclip16.png

  • You can also change the period, but the metric and load balancer names should not be modified
  • You can scroll down and also specify the conditions to your liking and click next to finish



mceclip14.png

  • You can finish creating the alarm as normal (provide name, description, and configure notifications settings).  Once the alarm is created, Vanta should pick this up in an hour, and the load balancer should no longer be flagged on the test page.

 

How Can I Change the Metric in The JSON?

If you prefer to use a different metric, then you can replace the metric name in the JSON (highlighted below)

mceclip25.png

With one of the other supported metrics listed on the test page How to fix section: 

mceclip26.png