cloudwatch_exporter icon indicating copy to clipboard operation
cloudwatch_exporter copied to clipboard

custom namespace metrics don't show up?

Open winshenting opened this issue 3 years ago • 5 comments

Hi, I try to get custom namespace metrics from AWS by CloudWatch Exporter. But it does not work.

  • aws_namespace: /aws/sagemaker/Endpoints aws_metric_name: DiskUtilization aws_dimensions: [EndpointName, VariantName] aws_statistics: [Sum, Average, Maximum, Minimum] However, I can get metrics through AWS CLI aws cloudwatch get-metric-statistics --metric-name DiskUtilization --start-time 2021-05-20T00:18:00Z --end-time 2021-05-21T04:00:00Z --period 3600 --namespace /aws/sagemaker/Endpoints --dimensions Name=EndpointName,Value=SageMakerInferenceEBMFOEndpoint Name=VariantName,Value=AllTraffic --statistics Maximum --region us-west-2 I wonder how I can get metrics through cloudwatch exporter

winshenting avatar May 25 '21 08:05 winshenting

Having the same issue. Anybody here?

setevoy2 avatar Jun 15 '21 10:06 setevoy2

I am only the janitor here 😬 At the moment, the CloudWatch exporter relies heavily on the community (you) to support it and investigate issues. Please document what you find here, and if you have a fix, open a PR.

matthiasr avatar Jun 15 '21 10:06 matthiasr

Hi @setevoy2 , I see in the cli there is a parameter --region us-west-2 but not in the exporter's configuration. I suspect the aws SDK picks up the default region that is not us-west-2, could you try to specify the region in the exporter's configuration and see how it works?

neinatu avatar Jul 13 '21 08:07 neinatu

same issue, please help

pikodd avatar Sep 16 '21 19:09 pikodd

Hey @winshenting, @setevoy2 and @pikodd, I know the namespace for custom metrics does not follow the default aws namespace conversion. An example of this is the namespace for billing metrics is "AWS/Billing" where as the namespace for a custom metric CWAgent is only "CWAgent") So my suggestion would be to check the namespace.

If you have access to the aws cli you can simply list all the metrics in the namespace with this command: aws --region=<your-region> cloudwatch list-metrics --namespace <your-custom-namespce> This command should return all metrics within that namespace.

Another way to check the custom metric namespace is in the cloudwatch ui. To do this simply go to the cloudwatch ui, select all metrics and then select the desired custom namespace. Select and graph a metric within the custom namespace then view the graph by selecting the graphed metrics tab. Within this tab click the metrics details to view the correct namespace.

I hope this helps everyone!

djloude avatar Dec 15 '21 21:12 djloude