Infra validation and Monitoring

Hi Team,

I need your support to to setup two things.

  1. How to know peak and average memory and CPU usage of my ec2 instance for the past one month ?
    Newrelic agent already installed in every my ec2 instances.
  2. Is there any API that I can simply hit/curl to get/fetch data about the CPU and Memory usage for a particular ec2 instace in a given timeframe ?

Really need support to guide me in correct direction.

Regards,
Mayank Sinha

Hi,
New Relic team.

can you please help set this up ?

Hi Team,

I need your support to to set up two things.

  1. How to know peak and average memory and CPU usage of my ec2 instance for the past one month ? Currently, I can not see Peak utilization.
    Newrelic agent already installed in every my ec2 instances.
  2. Is there any API that I can simply hit/curl to get/fetch data about the CPU and Memory usage for a particular ec2 instance in a given timeframe ?

Really need support to guide me .

Regards,
Mayank Sinha

Hey @mayank8,

Thanks for reaching out.

You may use NRQL to query, aggregate, and display Infrastructure data. I’ve included a few resources to help you get started:

Regards

Hi @sbetea ,

Thanks for sharing the links.
I will try to utilise the links shared and come back with what I find.

Regards,
Mayank SInha

Keep us posted @mayank8! Very interested to hear your findings!

Hi, @nmcnamara @sbetea .

I was able to use the NRQL query , but the problem is , it is not giving me all the ec2 instances details.

SELECT max(cpuPercent),average(cpuPercent),max(memoryUsedPercent),average(memoryUsedPercent) FROM SystemSample FACET ec2PrivateIpAddress,ec2InstanceId,label.Name where label.ENVIRONMENT=‘PROD’ LIMIT MAX SINCE ‘2021-07-01 00:00:00’ UNTIL ‘2021-08-04 00:00:00’

=> This returns output for 97 ec2instances , I was expecting 140.

This query somehow does not give out all the ec2 details.

I tried using LIMIT 200 , OR editing the where clause as

"where ec2PrivateIpAddress IN ( 'IP address ’ , ‘IP address’ ) "

I was expecting an output corresponding to 140 IP addresses but it returns only 52.

Am I missing anything? Is there a way to work around this ?

Regards,
Mayank Sinha