List custom and automatic cloudwatch metrics

1

Hi Team,

Could you please let me know how to get the list of

  1. Automatic cloudwatch metrics
  2. Custom cloudwatch metrics

Regards, Rajesh B

demandé il y a 10 mois794 vues
1 réponse
1

Hi, you can distinguish between AWS-standard and custom metric via their namespace Namespace definition: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace

Namespaces starting with "AWS/service" are reserved for official AWS services.

Example of an AWS standard/automatic metric:

 {
            "Namespace": "AWS/Usage",
            "MetricName": "CallCount",
            "Dimensions": [
                {
                    "Name": "Type",
                    "Value": "API"
                },
                {
                    "Name": "Resource",
                    "Value": "DescribeSubnets"
                },
                {
                    "Name": "Service",
                    "Value": "EC2"
                },
                {
                    "Name": "Class",
                    "Value": "None"
                }
            ]
        },

So, if you use CLI "aws cloudwatch list-metrics", you will get a list of all metrics. Those with Namespace "AWS/xxx" belong to AWS. The others are custom that you create or that a 3rd-party component that you use implement.

CLI for List metrics : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudwatch/list-metrics.html

profile pictureAWS
EXPERT
répondu il y a 10 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions