Monitoring Flashcards
Differences between the CloudWatch applications? (Logs, Alarms, Events)
Logs: cotains log files, can set alarm and react to changes in AWS resources - can be viewed in real time
Alarms: Monitors a single metric and perfoms actions of it
Events: near real time stream of system events
What is free of charge in monitoring?
3 Dashboards Basic monitoring for EC2 instances Metrics for EBS, ELB and RDS 50 metrics, 10 alarms 1 mio. API requests 5min Refresh Rate
Is CloudWatch inter-regional?
Metrics are only available for one region
Ways to create custom metrics
PutMetricData API
monitoring scripts for Win. / Linux
Applications from the AWS Partner Network
How is the retention for the metrics (outside of Cloudwatch Logs)
1 min for 15 days
5 min for 63 days
1 hr for 455 days
Metrics cannot be deleted - they expire after 15month if no data is incoming
What are the reasons for a system status checks to fail?
Loss of network connectivity
Loss of system power
Software issues of host system
Hardware issues of the host
What are the reasons for instance status failures?
Network configuration issues Incorrect configurations of the OS Exhausted memory Corrupt file system Kernel issues
What is the purpose of CloudWatch Alarms?
Initiate automatic action in response to a predefined condition of a single metric
What are the status of CloudWatch Alarms?
OK
ALARM
INSUFFICIENT_DATA
When are events created?
Change in AWS resource status (for example EC2 instance stopping)
Events sent by CloudTrail, user login e.g.
Issued by a scheduled (cron) basis
What is the Cost Explorer?
Review of the costs of the last 13 month and a forecast of the next 3
It also generates detailed CSV reports
How are inter-regional Trails managed?
All trails are applied to all regions by default, but it is not one trail but a copy to all regions
What can be done with AWS Config?
Create snapshot of current environments
Historical configurations
Notifications then resources change
See relations between resources
What is the maximum number of months of history that AWS Cost Explorer displays?
13 months
What are the basic metrics of EC2?
CPUCreditBalace
CPUUtilization
Network In / Network Out
What are the basic metrics of EBS?
Volume IdleTime
V. ReadBytes / ReadOps
V WriteByte / WriteOps
What are the basic metrics of an ALB?
Active Connections Rejected Connections (Un)HealthyHostCounts Status Codes RequestCounts
What are the basic metrics of RDS?
CPUUtilization
ReadIOPS / WriteIOPS
Free Space
Active DB Connections
What is the definition of a custom metric?
- Anything generated inside the OS
- Coming from outside the resources - as long as it has access to the CloudWatch Service API
- Application Metrics like RAM or Disk Space
What is needed to push custom metrics?
CloudWatch Agent or scripts/SDK
Appropriate IAM access
What action should be taken if an EC2 instance (behind a ASG) is in an alarm state?
Terminate the instance - the auto scaling group will boot another one
What are the EBS Volume Status Checks? (non prov. IOPS)
oka
warning
impared
insufficient-data
What are (some) RDS status checks?
Available Backing Up Creating / Deleting Failed Mainenance Rebooting
Which arichtectural choice improve network performance?
Single AZ
Placement Groups
Enhances Networking
Keeping Traffic in the VPC
What can be performance bottlenecks and how to get notified?
Undersized NAT instances Undersized RDS instances Undersized EC2 instances Old EC2 instance types Underprovisioned EBS volumes Static assets from EC2
The Trusted Advisor report can locate bottlenecks
List Cloud Watch Event Targets
SNS Topics EC2 Instances Lambda functions Kinesis Data Streams ECS tasks System Manager commands AWS Batch jobs CodePipeline for deployments Inspector for assessments
What services have built-in CloudWatch Log support? (Store the logs in CW)
Route53
CloudTrail
Lambda
API Gateway
What are services for CloudWatch Logs Custom Sources?
EC2 Applications
On-Premis Service
Other cloud resources
What are the steps to install the CloudWatch Logs Agent
Single command install
Configure configureation file
Take and push the Metric
What are the options to automate the install of the CloudWatch Logs Agent?
Include in AMI
Include in EC2 user-data
Include in configuration management tool like Ansible or Chef
Via the AWS Systems Manager Agent command
What services log in S3 Buckets
S3
CloudFront
ELB
In what logs can CloudTrail put its logs?
Logs in S3 and CloudWatch Logs
What are the intervals for tracking metrics in Cloudwatch?
5min for basic
1min for details
What are the host level metrics tracked in Cloudwatch?
CPU
Network
Disk
Status Checks
What the general difference between basic and custom metric?
basis: AWS has knowledge
custom: AWS has no knowledge
How long are metrics kept in CLoudWatch Logs?
Indefinitely or a custom duration
What are ELB access logs?
Optional loggin for load balancers. Stores logging information in S3.
Captures IP, latency, requests and Server response.
It can be used for example to trace requests to ec2 instances that have been terminated in the meantime.
What should be monitored for ElastiCache?
CPU Utilization
Evictions
Swap Usage
Concurrent Connections
How to create a CloudWatch dashboard across regions?
Just create it in one region, it will be available in other regions as well (with the data from the region the widget is created from)
What is the purpose of AWS Organizations?
- Manage policies across accounts
- Control access to Services (Using SCPs)
- Account management (Creation and Managing)
- Consolidate Billing
What has precedence: an SCP or IAM policy?
A deny in an SCP will overrule an allow in an IAM Policy
What is the tree structure of AWS Organizations?
Root
Organizational Unit(s)
AWS Accounts
What are Resource Groups?
AWS Service to group resources based on tags.
Those can be used for example to automate / bulk tasks with the AWS System Manager
What are Cost Allocations Tags and how to use them?
You can select the Tags that are relevant for Billing such as Department or Team.
These can be used in the Cost Explorer and Billing/Cost Management Console
What are the three parts of configurations in AWS Config?
Configuration Items: Point in time attributes
Configuration Snapshots: Collection of the Items
Configuration Streams: Stream of Item changes
Is AWS Config inter-regional?
No, every region has its own data
But you can aggregate the resgions/accounts
AWS Config: What are compliance checks and how to use them?
Config can check against a set of rules (about 40), for example, if unrestricted ssh access is allowed somewhere.
The check can be triggered periodically or when a configuration has changed.
To enable AWS config to do these checks it needs a role with read access to the resources and write access to S3 and SNS
Where can you find the Service Health Dashboard?
status.aws.amazon.com
What is the Personal Health Dashboard?
Global Dashboard to indicate how problems in AWS would affect services in the own account
What is needed for metrics to be tracked on On-Premise servers?
SSM agent
CloudWatch agent
What is the AWS FlowLog?
- All VPCs monitored must be in the same account
- Not monitored: Metadata, DHCP, traffic to reserved IPs
- Data logged in CloudWatch (FlowLog needs permission to write)
- Can be streamed to Lambda or ElasticSearch
What are AWS Config Rules?
Checks for (non) compliant settings in services, for example open SSH ports in Security Groups or cloudtrail being enabled
Does AWS Config span multiple regions?
No, they need to be configured separately
or include global services like S3
How are logs from AWS Config stored?
In a S3 bucket (same or different account)
[BUCKET]/[OPTIONAL PREFIX]/AWSlogs/[ID]/config/[REGION]
How to get notified when a AWS Config rule is broken?
Create and subscribe to an SNS topic
What permissions are needed for AWS Config to work?
Config needs a role that has read-only access to the ressources and write access to the S3 bucket
What are the (two) trigger types in AWS Config?
Perioc (duration can be set - per default 24h)
on configuration change
NOTE: some rules cannot be set to on or both of the trigggers
How to install the CloudWatch Logging Agent?
1) Create a role and attach it to the instance
2) Download and install the agent on the instance
3) Configure and start the agent
How can a second account assume a role in another account?
- Create the role in the primary account
- In the secondary account create a policy with the action sts:AssumeRole and link the first role as the Resource
What are S3 Access Logs?
Logs events made for the buckets and its objects.
Not enabled per default.
What is the standard bucket name strucutre for CloudFront Logs?
[bucketname].s3.amazonaws.com/[optionalprefix]/[distributionid]/[YYY-MM-DD-HH].[uniqueid].gz
What are the limitations of VPC Flow Logs?
- You can only see VPC from your own account (if peered)
- Flow logs cannot be edited after creation