2 Answers
- Newest
- Most votes
- Most comments
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.
answered 2 years ago
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
.
answered 2 years ago
Relevant content
- Accepted Answerasked 4 years ago
- asked 7 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
How we can stop CloudWatch agent running on instances and sending custom metrics. any commands or docs related them ?