Want to track the uptime and downtime of EC2 Instance on Slack? - amazon-web-services

I want to get the uptime and downtime alerts of ec2 Instances on slack, I have tried SNS topics creating and Alarm, but would like to get notifications on Slack so can anyone help me with this, can add SNS or any other service with slack or any third party service.
Looking forward to an answer. Thanks in advance.

Related

SQS Health check

Since SQS is one of the AWS managed service, I do not have to worry about the availability.
But how about monitoring the health of the SQS? Any way we could gain some visibility over the SQS service to be a error free component? We have quite many lambdas connected to it and I want to monitor to ensure there is no error/latency/timeout etc..
From What is AWS Health? - AWS Health:
AWS Health provides ongoing visibility into your resource performance and the availability of your AWS services and accounts. You can use AWS Health events to learn how service and resource changes might affect your applications running on AWS. AWS Health provides relevant and timely information to help you manage events in progress. AWS Health also helps you be aware of and to prepare for planned activities. The service delivers alerts and notifications triggered by changes in the health of AWS resources, so that you get near-instant event visibility and guidance to help accelerate troubleshooting.

Send AWS EC2 metrics to AWS Elasticsearch Service Domain for monitoring in Kibana

I am stuck on one point I have created one EC2 Linux based instance in Aws.
Now I want to send the EC2 metrics data to the managed Elasticsearch domain for monitoring purposes in Kiban, I go through the cloud watch console and check the metric is present of instance but didn't get how to connect with the Elasticsearch domain that I have created.
Can anyone please help me with this situation?
There is no build in mechanism for extraction/streaming of metrics data points in real time. You have to develop a custom solution for that. For example, by having a lambda function which is invoked every minute and which reads data points using get_metric_data. The the lambda would inject the points into your ES.
To invoke a lambda function periodically, e.g. every 1 minute you would have to setup CloudWatch Event rule with schedule Expressions. Lambda function would also need to have permissions granted to interact with CloudWatch metrics.
Welcome to SO :)
An alternative to the solution suggested by Marcin is to install metricbeat on the EC2 Instance and configure the metricbeat config file to send metrics to your Managed AWS ES Domain.
This is pretty simple and you should be able to do this fairly quickly.

AWS Config query to track changes

I am implementing AWS Config and trying to figure out how to run a query which will tell us if there are any changes to the security groups or firewalls. I've setup a SNS topic and played with some existing rules such as ec2-security-group-attached-to-eni but I didn't find preexisting rules to alert the team if there were any changes in a security group. I did not find much online, would appreciate any guidance.
I know this is old so I assume you found a solution?
https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-cis-controls.html#cis-3.10-remediation
Security Hub has a solution for this, and you do not need to actually use Security Hub to setup the Alarm. So this is using CloudTrail and a CloudWatch metric and alarm and then SNS.

AWS Cloud Watch Alarm script

I need to create script which should make sending email notifications from AWS Cloudwatch whenever instance is unhealthy or down. I am new in the AWS world, so can someone help me with this? Thank you in advance!

Do AWS instances raise events that can directed onto SNS/SQS?

We have several workflows in xaml that detach instances from load balancers, backup databases etc. currently this involves polling via a rest api to check the status of an instance or RDS or example. We would prefer to subscribe to a SNS topic and get notified via a message when the state of an instance changes. Any guidance on how to setup something like this up appreciated
Cheers!
If you're using autoscaling, the new AutoScaling Lifecycle Management events sound like exactly what you want:
http://aws.amazon.com/blogs/aws/auto-scaling-update-lifecycle-standby-detach/
You can configure SNS or SQS notifications when servers are added or removed from your autoscaling groups.