Questions tagged [amazon-cloudwatch]

Amazon CloudWatch provides monitoring for AWS cloud resources and the applications customers run on AWS. Use this tag when asking about CW features such as metrics or alarms. Use amazon-cloudwatchlogs instead when asking about log groups, log streams, and metric filters.

From the web site:

Developers and system administrators can use it to collect and track metrics, gain insight, and react immediately to keep their applications and businesses running smoothly. Amazon CloudWatch monitors AWS resources such as Amazon EC2 and Amazon RDS DB instances, and can also monitor custom metrics generated by a customer’s applications and services.

Usage Guidance

  • Use this tag when asking about CW metrics or CW alarms, the CW API, etc.
  • Do not use this tag when asking only about log groups, log streams, metric filters, etc; use instead.
  • Use both if asking about both (for example, if asking about a CW Logs metric filter that aggregates in a CW custom metric that triggers a CW alarm)

Resources

4155 questions
10
votes
2 answers

Use cloudwatch to determine if linux service is running

Suppose I have an ec2 instance with service /etc/init/my_service.conf with contents script exec my_exec end script How can I monitor that ec2 instance such that if my_service stopped running I can act on it?
mingxiao
  • 1,712
  • 4
  • 21
  • 33
9
votes
4 answers

AWS Custom CloudWatch metrics - Aggregate by Auto-Scaling group

I'm trying to set some custom AWS CloudWatch metrics using the Java SDK. I can't seem to find anything in the documentation describing how to get certain pieces of data, nor what data I need to include. MetricDatum datum = new MetricDatum() …
Tinclon
  • 967
  • 11
  • 18
9
votes
1 answer

Why is "Free Storage Space" in AWS RDS measured in MB/Sec?

I'm trying to set up a cloudwatch trigger to send me an email when my RDS database (MySQL) capacity is low, but when I'm configuring (and also monitoring) the Free Storage Space metric, it's measured in MB/Sec. The current max capacity is 20,000…
9
votes
1 answer

How to parse Prometheus data

I have been able to obtain the metrices by sending an HTTP GET as follows: # TYPE net_conntrack_dialer_conn_attempted_total untyped net_conntrack_dialer_conn_attempted_total{dialer_name="federate",instance="localhost:9090",job="prometheus"} 1…
Sijan Bhattarai
  • 570
  • 2
  • 6
  • 25
9
votes
1 answer

Cloudwatch Logs Insights working with multiple @messages

I have the following query with the following output: Query: filter @message like /A:|B:/ Output: [INFO] 2020-07-28T09:20:48.406Z requestid A: [{'Delivery': OK, 'Entry': 12323 }] [INFO] 2020-07-28T09:20:48.407Z requestid B: {'MyValue':0} I would…
9
votes
1 answer

"Logs can only be viewed for the account logged in" in AWS CloudWatch Logs console

After enabling cross-account, cross-region access (in AWS CloudWatch Settings) in both the monitoring account and the sharing account, I receive an error in the CloudWatch Logs console upon selecting the sharing account from the drop-down at the top…
9
votes
5 answers

"Unable to determine aws-region" when running on-premises Cloudwatch agent

I'm trying to configure the AWS Cloudwatch agent to run on vanilla Ubuntu 18.04, outside of AWS. Every time I run it, I get this error: # /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m onPremise -c…
Kevin Burke
  • 61,194
  • 76
  • 188
  • 305
9
votes
2 answers

Cloudwatch Insights search in multiline logs

Example log: REQUEST-ID:123 Video id=444 REQUEST-ID:123 Request=error REQUEST-ID:534 Video id=555 REQUEST-ID:534 Request=ok Question, how to find Video id of all requests with an error?
9
votes
1 answer

cloudwatch metric filter OR and exclude

I am wondering if it is possible to use both OR and exclude syntax in cloudwatch metric filter. I have been reading the documentation and trying different combination with no luck. Here is my test data: [ABC] - ERROR 2020-01 [ABC] - ERROR…
void
  • 345
  • 3
  • 13
9
votes
2 answers

Export existing AWS CloudWatch alarms to CloudFormation template

How to export existing, configured and tested AWS CloudWatch alarms to Cloudformation template? I know about CloudFormer tool, but it supports limited number of AWS services (Amazon VPC, DynamoDB, etc) and don't supports some of services which we…
9
votes
3 answers

Terraform - How to enable API Gateway execution logging?

Question How to setup API Gateway stage level execution logging with Terraform? Is it not supported yet? Background API Gateway stage editor has the execution logging configurations. However, it seems there is no parameter to set them in…
mon
  • 18,789
  • 22
  • 112
  • 205
9
votes
3 answers

Cloudformation Cloudwatch InputTemplate Formatting

I'm attempting to use a cloudformation template to create a cloudwatch event rule that matches a glue event and targets an SNS topic to send a message to, I can create it in the cloudwatch console, but not via a cloud watch template. Here is my…
Tibberzz
  • 541
  • 1
  • 10
  • 23
9
votes
2 answers

Setting the same timezone everywhere in CloudWatch

I am using CloudWatch and I find that timezones appear in either UTC or the local timezone variously in different contexts. For example, when I look at one right now, in CloudWatch > Logs I see Log Streams shown in local time. In Metrics, they…
Alex Harvey
  • 14,494
  • 5
  • 61
  • 97
9
votes
1 answer

AWS Cloudwatch setup with Winston

I have been reading various articles/docs and watching some videos on this topic. My issue is that they all conflict in one way or another. My goal is to use winston to send all console.logs/error messages from my ec2 server to Cloudwatch so that no…
9
votes
1 answer

How to set aws cloudwatch retention via Terraform

Using Terraform to deploy API Gateway/Lambda and already have the appropriate logs in Cloudwatch. However I can't seem to find a way to set the retention on the logs via Terraform, using my currently deployed resources (below). It looks like the…
LHK
  • 91
  • 1
  • 2