prometheus / cloudwatch_exporter

Metrics exporter for Amazon AWS CloudWatch
Apache License 2.0
906 stars 325 forks source link

custom namespace metrics don't show up? #349

Open winshenting opened 3 years ago

winshenting commented 3 years ago

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

setevoy2 commented 3 years ago

Having the same issue. Anybody here?

matthiasr commented 3 years ago

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.

neinatu commented 3 years ago

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?

pikodd commented 3 years ago

same issue, please help

djloude commented 2 years ago

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!