16

As with any outage communications, a non-technical reader will be primarily looking to understand: How long was it? How bad was it? Amazon CloudWatch metrics provides the following metrics for SQS queues that can help answer these questions: NumberOfMessagesSent: The number of messages added to a queue. NumberOfMessagesReceived: The number of messages ...


9

As far as I know, it is not possible. The the offcial AWS Lambda documentation says it support CloudWatch Events, but no mention of CloudWatch Alarms (and CW Events != CW Alarms) What you are currently doing, sending the alarms on a SNS and using listening on a topic seems the way to go. In fact, CloudWatch Alarms only outputs to SNS so far.


8

Recently AWS just announced CloudWatch Metric Math which should be suitable for your use case. References:- Amazon CloudWatch Adds Metric Math to Enable Custom Operations on Metrics Create a CloudWatch Alarm Based on a Metric Math Expression


8

For the last overall goal, I would set the alarm on ApproximateNumberOfMessagesVisible from Cloudwatch documentation on SQS this is: The number of messages available for retrieval from the queue. Units: Count Valid Statistics: Average, Minimum, Maximum, Sum, Data Samples (displays as Sample Count in the Amazon SQS console) For the more ...


8

I believe you will need to do this programmatically using the AWS SDK as described in Sending a Message (AWS SDKs). Here is a quote a from it: To send an SMS message by using one of AWS SDKs, use the action in that SDK that corresponds to the Publish request in the Amazon SNS API. With this request, you can send an SMS message directly to a phone ...


7

That's on my backlog but still on early stage, I just surfaced the idea, so here's are my findings so far: Using Trusted Advisor as a Web Service Mainly: Poll a Trusted Advisor Check for Status Changes This documentation example can be implemented with aws cli with the support subset of commands and targetting the 'us-east-1' region, you'll then have to ...


5

There are a few ways to approach deleting unused resources, perhaps tagging items that are part of some trusted or known group, as some have suggested here and then manually monitoring for resources that isn’t tagged appropriately. You could then extend this to a python script that you run every so often to ID and delete these resources. However, there ...


3

I created such a tool, it is called AWS Inventory and eventually, it will cover all available resources in your account. While it is still a work in progress, should be very easy to add the items you might be missing just by adding the API name to a list. The tool is just a single HTML file that uses aws-sdk.js to query all the different list... and ...


3

I used this post to get our Guard Duty alerts working, thanks! But a recent change at AWS caused us to stop getting any alerts. Turns out we needed to add the integer values along with floating point numbers. We used a CLI command like the following to do that: aws events put-rule --name Test --event-pattern "{\"source\":[\"aws.guardduty\"],\"detail-type\"...


3

If you wish to do it purely with AWS provided tools, try this: figure out a tagging scheme that works for you tag all the resources you provision, make sure nothing is left untagged for stuff you provision outside of the terraform and are not always tagged correctly by your tagging scheme, use AWS Config service to enforce the tagging scheme After you have ...


3

Within the CloudWatch integration in PagerDuty, you can change the "Derive name from" field to something like "Alarm Description".


2

Based on the PagerDuty documentation on Cloudwatch, it doesn't look like it's configurable: https://www.pagerduty.com/docs/guides/aws-cloudwatch-integration-guide/


2

Autoscaling is a good case for machine learning This is a hard problem to do well. What you really want is something like Nest Thermostat for your EC2 infrastructure. There are (aforementioned) multiple dimensions of resource demand/limitations. CPU memory disk space disk IO network IO concurrency/latency/queue depth There are multiple indicators of ...


2

Example in AWS cli that should work to get the ASG name a=curl 'http://169.254.169.254/latest/meta-data/instance-id'; aws autoscaling describe-auto-scaling-instances --instance-ids $a --query 'AutoScalingInstances[*].AutoScalingGroupName'


2

CloudWatch metrics contain "dimensions" that loosely match InfluxDB's concept of "tags". The list of dimensions available for EC2 metrics is available in the AWS documentation. Instances tags are not available and I'm not sure what you mean by env_variables but since all that is supported is AutoScalingGroupName ImageId InstanceId InstanceType the answer ...


2

That would be one way of doing, using just the AWS console. I have been using TotalCloud for many other things but this is very easily possible on the platform. It seems to be free for now. I have been using it with two large AWS accounts for 3 months now. It shows everything in a single view with visual topological view which makes it fairly easy to ...


2

Follow these steps to fix InvalidCiphertextException: Open the Lambda function in AWS console. Scroll down to the Environment Variables section & click Edit: Delete the value of kmsEncryptedCustomerToken & replace it with the customer token you got from https://<your-company>.loggly.com/tokens. The token looks like this: 72cf6d64-256e-449d-...


2

Here's the answer I got from AWS Support, slightly edited. (I would downvote them, if I could). By design, CloudWatch events do not support ranges, so you need to explicitly set the values that are in that range. Additionally, the console has an issue that we are currently addressing, regarding the .0 values. So, the way to achieve this at the moment is ...


1

There are several ways for exporting logs from CloudWatch in searchable text format: The easiest way of downloading logs in text format is to go to a log group -> Select a log stream -> go to Actions and select Download search results as CSV: This will download the logs in a .csv format which may or may not be what we want, nevertheless I think it is ...


1

My current understanding is that it is not possible to avoid false positives. At least not if traffic comes from different time zones around the world (as in the context of this question). AWS operates on UTC times, but this is irrelevant for the anomaly detection. It does play a role if you set timers, but it is not taking into account for the predictions ...


1

I don't think any database services "internal traffic" is available to AWS services directly. That being said, you should be able to dump all sql queries to a log file on S3 and also extract all database/table combinations to a text file as well. It then becomes a text processing exercise that you can possibly solve with AWS Athena


1

You can get all used User accounts with Cloudtrail, it would then be a text processing exercise to find the unused ones.


1

Memory consumption is a metric that has to be reported from inside the guest (EC2 instance). You can use a CloudWatch agent to collect metrics from the guest directly. The agent also supports custom metrics now. Alternatively, install a third party monitoring system. Which also means that you'll have to get an agent running on the EC2 instance. There are ...


1

AWS have a CloudWatch agent which will submit a number of useful (configurable) metrics, including inodes_free, inodes_used, and inodes_total. They'll appear, by default, under the CWAgent namespace in CloudWatch metrics from where you can view them, add them to dashboards, create alarms etc. For the full details, these links will be useful: installing the ...


1

AWS have published a plugin for collectd which allows to send metrics collected using collectd to CloudWatch. https://github.com/awslabs/collectd-cloudwatch The collectd monitoring tool runs on the server and can be configured to collect various metrics, among them metrics on disks and filesystems using their DF plugin. https://collectd.org/wiki/index.php/...


1

From what I know of AWS Config there's no way at the moment to directly publish a metric from which you can base an alarm. If the notification has to come from a Cloudwatch alarm then AWS Config will let you execute Lambda based on rules set up in AWS Config - link. If you want a simpler option AWS Config also lets you publish directly to an SNS topic when ...


1

To be able to scale in with confidence on ECS, there's a few strategies: Create a 3rd custom metric which tracks the greater of the two metrics. For example, if CPU allocation is at 60% and memory allocation is at 70%, the metric should be set to 70%. Choose one of the two resources (CPU or memory), and always allocate a higher percentage of it to each ...


Only top voted, non community-wiki answers of a minimum length are eligible