aws cloudwatch custom metrics

0

I want to stop sending custom mertrics in cloudwatch, because my cost occur form aws custom metrics, so how can I disable custom metrics or stop sending data in cloudwatch. in my cloudwatch dashboard nothing is there I clean all alram logs everting but cost occur, that cost is related custom metrics we can't delete custom metrics in cloudwatch, but cost is occurs, so how can I stop using cloudwacth custom metrics. can we can remove cwagent from machine level or we can stop sending metrics from machine ?
Thanks

2 Answers
1

Hi, if you are being charged for custom metrics, it can come from one of the following sources:

  • you have activated Detailed Monitoring for some resources (e.g. EC2 or Lambda) - you can check if that is the case by looking at the cost explorer and filtering on the CloudWatch service, group by operation. If you get metrics with an operation that includes "EC2" or "Lambda" in its name, it is a sign that your metrics come from detailed monitoring for the corresponding service. You would need to turn off detailed monitoring.
  • you have code sending logs in EMF format, or you are sending logs and have set a metrics filter on the log group. Those can also be identified from the cost explorer by looking at the operation (the operation will mention logs). You would need to stop sending logs in EMF format or delete the metric filter.
  • you have activated Container Insights. You would need to turn it off.
  • you have a CloudWatch agent running on one of your instances and sending custom metrics. You would need to stop the agent.
  • you have code running and sending metrics. You would need to stop your program and modify your code.
profile pictureAWS
answered 2 years ago
  • How we can stop CloudWatch agent running on instances and sending custom metrics. any commands or docs related them ?

1

Hello, the command to stop the CloudWatch Agent depends on which operating system you use. In all likelihood, the CloudWatch Agent is certainly installed as a service. So the first thing you can do is stop the service. Then, depending on your needs, you can modify the service configuration so that it doesn't start automatically when the environment starts, or uninstall it. Again, the commands for such actions will depend on your operating system.

For example, assuming you are under Linux, you should be able to stop the service with a command like systemctl stop amazon-cloudwatch-agent.service.

profile pictureAWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions