Как мониторить (и рестартовать) сервисы на EC2 инстансе с помощью CloudWatch и SSM:
https://aws.amazon.com/blogs/mt/detecting-remediating-process-issues-on-ec2-instances-using-amazon-cloudwatch-aws-systems-manager/
#CloudWatch #SSM
https://aws.amazon.com/blogs/mt/detecting-remediating-process-issues-on-ec2-instances-using-amazon-cloudwatch-aws-systems-manager/
You can use the Amazon CloudWatch agent procstat plugin, which continuously watches specified processes and reports their metrics to Amazon CloudWatch. After the data is in Amazon CloudWatch, you can associate alarms to trigger actions like notifying teams or remediations like restarting the processes, resizing the instances, and so on.#CloudWatch #SSM
Amazon
Detecting and remediating process issues on EC2 instances using Amazon CloudWatch and AWS Systems Manager | Amazon Web Services
Customers want to have visibility into processes running inside their Amazon Elastic Compute Cloud (Amazon EC2) instances. Critical processes and services in these instances can crash unexpectedly and when they do, it’s crucial for customers to be notified…
CloudWatch Resource Health - мониторинг приложений, запущенных на EC2:
https://aws.amazon.com/blogs/mt/introducing-cloudwatch-resource-health-monitor-ec2-hosts/
#CloudWatch
https://aws.amazon.com/blogs/mt/introducing-cloudwatch-resource-health-monitor-ec2-hosts/
Resource Health provides a centralized view of your EC2 hosts by performance dimensions such as CPU or memory utilization. You can use Resource Health to slice and dice hosts using filters such as instance type, instance state, or security groups. It enables a side-by-side comparison of a group of EC2 hosts and provides granular insights into an individual host.#CloudWatch
Amazon CloudWatch Evidently – инструмент для A/B тестирования:
https://aws.amazon.com/blogs/aws/cloudwatch-evidently/
Тестировать можно не только front-end, но также back-end, мобильные и любые другие приложения. Поддерживаемые языки:
Цена на CloudWatch Evidently:
#CloudWatch
https://aws.amazon.com/blogs/aws/cloudwatch-evidently/
Тестировать можно не только front-end, но также back-end, мобильные и любые другие приложения. Поддерживаемые языки:
C++, Go, Java, JavaScript (and Typescript), .Net, NodeJS, PHP, Python, and Ruby.Цена на CloudWatch Evidently:
First time free trial includes 3 million Evidently events and 10 million Evidently analysis units per account#CloudWatch
Amazon
New – Amazon CloudWatch Evidently – Experiments and Feature Management | Amazon Web Services
Update Nov 29, 2021 – This post has been modified to provide more clarity on the new service. As a developer, I am excited to announce the availability of Amazon CloudWatch Evidently. This is a new Amazon CloudWatch capability that makes it easy for developers…
CloudWatch RUM (Real-User Monitoring):
https://aws.amazon.com/blogs/aws/cloudwatch-rum/
Такой себе вариант Google Analytics от AWS для отработки ошибок и производительности на клиентской стороне, т.е. у юзеров (потому Real-User).
#CloudWatch
https://aws.amazon.com/blogs/aws/cloudwatch-rum/
Такой себе вариант Google Analytics от AWS для отработки ошибок и производительности на клиентской стороне, т.е. у юзеров (потому Real-User).
#CloudWatch
How to send repeated notifications for CloudWatch Alarms:
https://aws.amazon.com/blogs/mt/how-to-enable-amazon-cloudwatch-alarms-to-send-repeated-notifications/
1️⃣
2️⃣
3️⃣
4️⃣
5️⃣
6️⃣
▫️
▫️
▫️
▫️
7️⃣
8️⃣
▫️
▫️
▫️
#CloudWatch
https://aws.amazon.com/blogs/mt/how-to-enable-amazon-cloudwatch-alarms-to-send-repeated-notifications/
1️⃣
CloudWatch alarm is triggered and goes into the ALARM state.2️⃣
CloudWatch alarm sends the first alarm notification to the associated SNS alarm actions.3️⃣
CloudWatch Alarms service sends an alarm state change event which triggers the EventBridge rule.4️⃣
With a match event, the EventBridge rule invokes the Step Function target.5️⃣
Once the Step Function starts execution, it first enters a Wait state.6️⃣
The Step Function enters the Lambda Invocation task. The Lambda invocation task:▫️
Checks if the alarm has the specific tag key and value (e.g., RepeatedAlarm:true). If not, the function exits▫️
Checks the alarm’s current state by performing a DescribeAlarms API with the alarm name.▫️
Publishes the existing alarm’s status returned from the DescribeAlarms API call to all the SNS topics subscribed on the alarm▫️
Returns the alarm’s current state together with the original received event back to the Step Function.7️⃣
The Choice state checks the alarm state returned by the Lambda function and directs the workflow to go back to the Wait state if the alarm state is ‘ALARM’ otherwise it ends the step function’s execution.8️⃣
The repeated notification for an alarm within the workflow above stops when:▫️
The alarm transitions to a non-ALARM state.▫️
The alarm is deleted.▫️
A specific tag is removed from the alarm.#CloudWatch
CloudWatch Container Insights for EKS Fargate using ADOT (AWS Distro for OpenTelemetry):
https://aws.amazon.com/blogs/containers/introducing-amazon-cloudwatch-container-insights-for-amazon-eks-fargate-using-aws-distro-for-opentelemetry/
▫️
▫️
▫️
#CloudWatch
https://aws.amazon.com/blogs/containers/introducing-amazon-cloudwatch-container-insights-for-amazon-eks-fargate-using-aws-distro-for-opentelemetry/
▫️
This blog presented an overview of the design of the ADOT Collector for EKS Fargate with support for CloudWatch Container Insights and demonstrated its deployment and metrics collection from workloads on an EKS Fargate cluster.▫️
A single collector instance is able to discover all the worker nodes in an EKS cluster through the use of Kubernetes service discovery and collect metrics from them by using the Kubernetes API server as a proxy for the kubelet on worker nodes.▫️
EKS customers will now be able to collect system metrics such as CPU, memory, disk, and network usage from workloads that are deployed to an EKS Fargate cluster and visualize them in CloudWatch dashboards, providing the same experience as CloudWatch agent.#CloudWatch
Amazon
Introducing Amazon CloudWatch Container Insights for Amazon EKS Fargate using AWS Distro for OpenTelemetry | Amazon Web Services
Introduction Amazon CloudWatch Container Insights helps customers collect, aggregate, and summarize metrics and logs from containerized applications and microservices. Metrics data is collected as performance log events using the embedded metric format. These…
👍2
Weekly Summary on AWS (
🔸 Amplify + The Authenticator UI Library for Flutter
🔸 AppSync + custom response headers
🔸 App Mesh + Agent for Envoy
🔸 App Runner + Java
🔸 Billing + Payment Profiles
🔸 CloudWatch Agent
➖ Configurable Log Group Retention
➖ NVIDIA GPU Metrics
🔸 Connect Customer Profiles + high-volume ingestion of customer data
🔸 EC2 Auto Scaling Warm Pools + hibernating and returning instances to Warm Pools on scale-in
🔸 Firewall Manager + AWS Network Firewall Centralized Deployment Model
🔸 Glue Job Run Insights
🔸 Glue DataBrew + choose single or multiple output files
🔸 Glue Schema Registry + Protobuf
🔸 Lambda + .NET 6
🔸 QuickSight’s new community hub
🔸 RDS for MariaDB + IAM authentication
🔸 Redshift + PIVOT and UNPIVOT SQL operators
🔸 S3 + additional checksum algorithms
🔸 SageMaker + 322 popular ML models
🔸 SAM CLI + TypeScript
🔸 Transfer Family + enhancements to workflows
🔹 NICE DCV version 2022.0 and Web Client SDK version 1.1.0
#AWS_week
February 20-26)🔸 Amplify + The Authenticator UI Library for Flutter
🔸 AppSync + custom response headers
🔸 App Mesh + Agent for Envoy
🔸 App Runner + Java
🔸 Billing + Payment Profiles
🔸 CloudWatch Agent
➖ Configurable Log Group Retention
➖ NVIDIA GPU Metrics
🔸 Connect Customer Profiles + high-volume ingestion of customer data
🔸 EC2 Auto Scaling Warm Pools + hibernating and returning instances to Warm Pools on scale-in
🔸 Firewall Manager + AWS Network Firewall Centralized Deployment Model
🔸 Glue Job Run Insights
🔸 Glue DataBrew + choose single or multiple output files
🔸 Glue Schema Registry + Protobuf
🔸 Lambda + .NET 6
🔸 QuickSight’s new community hub
🔸 RDS for MariaDB + IAM authentication
🔸 Redshift + PIVOT and UNPIVOT SQL operators
🔸 S3 + additional checksum algorithms
🔸 SageMaker + 322 popular ML models
🔸 SAM CLI + TypeScript
🔸 Transfer Family + enhancements to workflows
🔹 NICE DCV version 2022.0 and Web Client SDK version 1.1.0
#AWS_week
👍3👎1
🆕 CloudWatch Internet Monitor:
https://aws.amazon.com/blogs/aws/cloudwatch-internet-monitor-end-to-end-visibility-into-internet-performance-for-your-applications/
● Internet Monitor uses the connectivity data that we capture from our global networking footprint to calculate a baseline of performance and availability for internet traffic. This is the same data that we use at AWS to monitor our own internet uptime and availability. With Internet Monitor, you can gain awareness of problems that arise on the internet experienced by your end users in different geographic locations and networks.
● There is no need to instrument your application code. You can enable the service in the CloudWatch section of the AWS Management Console and start to use it immediately.
#CloudWatch
https://aws.amazon.com/blogs/aws/cloudwatch-internet-monitor-end-to-end-visibility-into-internet-performance-for-your-applications/
● Internet Monitor uses the connectivity data that we capture from our global networking footprint to calculate a baseline of performance and availability for internet traffic. This is the same data that we use at AWS to monitor our own internet uptime and availability. With Internet Monitor, you can gain awareness of problems that arise on the internet experienced by your end users in different geographic locations and networks.
● There is no need to instrument your application code. You can enable the service in the CloudWatch section of the AWS Management Console and start to use it immediately.
#CloudWatch
👍3
🆕 CloudWatch Cross-Account Observability:
https://aws.amazon.com/blogs/aws/new-amazon-cloudwatch-cross-account-observability/
To enable cross-account observability, CloudWatch has introduced the concept of monitoring and source accounts:
◘ A monitoring account is a central AWS account that can view and interact with observability data shared by other accounts.
◘ A source account is an individual AWS account that shares observability data and resources with one or more monitoring accounts.
You can configure multiple monitoring accounts with the level of visibility you need. CloudWatch cross-account observability is also integrated with Organizations.
💳 Cross-account observability in CloudWatch comes with no extra cost for logs and metrics, and the first trace copy is free. 👍
#CloudWatch
https://aws.amazon.com/blogs/aws/new-amazon-cloudwatch-cross-account-observability/
To enable cross-account observability, CloudWatch has introduced the concept of monitoring and source accounts:
◘ A monitoring account is a central AWS account that can view and interact with observability data shared by other accounts.
◘ A source account is an individual AWS account that shares observability data and resources with one or more monitoring accounts.
You can configure multiple monitoring accounts with the level of visibility you need. CloudWatch cross-account observability is also integrated with Organizations.
💳 Cross-account observability in CloudWatch comes with no extra cost for logs and metrics, and the first trace copy is free. 👍
#CloudWatch
🎉6👍1
6️⃣ CloudWatch Agent можно установить в виртуалку прямо из AWS Console. Но это не точно.
Коллеги, подскажите, у кого-то работает сие чудо?
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-and-configure-cloudwatch-agent-using-ec2-console.html#install-and-configure-cw-agent-procedure
Всю жизнь мечтал. Вопрос каждого первого начинающего работать с AWS — а где нагрузка по процессам и свободное место на диске? Неужели свершилось?
Кто пропустил, краткая история предыдущих серий CloudWatch Agent.
1️⃣ Ничего не было,выживали мониторили, как могли.
2️⃣ Скрипт на Perl, ура, спасибо, что не Fortran! Установка ручками через SSH.
3️⃣ Везде Docker. Вдеревне Гадюкино CloudWatch Agent — скрипт на Perl, установка через SSH.
4️⃣ Везде Kubernetes и Serverless, в CloudWatch Agent — скрипт на Perl, установка через CloudFormation.
5️⃣ CloudWatch Agent переписали на Go, установка через SSM.
#CloudWatch
Коллеги, подскажите, у кого-то работает сие чудо?
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-and-configure-cloudwatch-agent-using-ec2-console.html#install-and-configure-cw-agent-procedure
Всю жизнь мечтал. Вопрос каждого первого начинающего работать с AWS — а где нагрузка по процессам и свободное место на диске? Неужели свершилось?
Кто пропустил, краткая история предыдущих серий CloudWatch Agent.
1️⃣ Ничего не было,
2️⃣ Скрипт на Perl, ура, спасибо, что не Fortran! Установка ручками через SSH.
3️⃣ Везде Docker. В
4️⃣ Везде Kubernetes и Serverless, в CloudWatch Agent — скрипт на Perl, установка через CloudFormation.
5️⃣ CloudWatch Agent переписали на Go, установка через SSM.
#CloudWatch
Amazon
Install and configure the CloudWatch agent using the Amazon EC2 console to add additional metrics - Amazon Elastic Compute Cloud
To collect additional CloudWatch metrics beyond the basic default metrics, use the Amazon EC2 console to install the CloudWatch agent on your Amazon EC2 instances and configure the agent to emit selected metrics.
🔥5👏3❤1
AWS Notes
Количество метрик, обрабатываемых CloudWatch за последние пять лет выросло в 20 раз. С одной стороны, вот, как сложно обрабатывать такую увеличивающуюся нагрузку на CloudWatch. А с другой, на биллинг. 😃 #reInvent
С новыми фичами типа CloudWatch Logs Insights Observability нагрузка на биллинг CloudWatch увеличится ещё больше:
https://aws.amazon.com/blogs/aws/container-insights-with-enhanced-observability-now-available-in-amazon-ecs/
#CloudWatch #ECS #reinvent
https://aws.amazon.com/blogs/aws/container-insights-with-enhanced-observability-now-available-in-amazon-ecs/
#CloudWatch #ECS #reinvent
😁10
CloudWatch + OpenSearch = возможность запрашивать логи из OpenSearch
https://aws.amazon.com/blogs/aws/new-amazon-cloudwatch-and-amazon-opensearch-service-launch-an-integrated-analytics-experience/
#CloudWatch #OpenSearch #reInvent
https://aws.amazon.com/blogs/aws/new-amazon-cloudwatch-and-amazon-opensearch-service-launch-an-integrated-analytics-experience/
#CloudWatch #OpenSearch #reInvent
👍1💩1
Forwarded from Make. Build. Break. Reflect.
Есть база данных AWS RDS(
К базе подключено N клиентов-приложений. Допустим их 10. Все подключены через прокси.
Появилась задача понять "кто из приложений кушает больше всего коннекшнов и отобразить это на графике".
Большее обсервабилити, большая детализация. Больше SRE👏
Однако штатно таких метрик не существует(ну или же я просто не нашёл).
Вариант с лямбдой и
Мне показался туповатым.
❕Я не знаю как это делают правильные инженеры, опишу свой вариант решения, который сделал в выходные.
- создаем в базе данных 10 новых пользователей с нужными правами
- добавляем креды новых юзеров в secret manager
- добавляем аксесс этих юзеров на RDS proxy кредами из secret manager
- создаем новые rds proxy endpoint для каждого из приложений/юзера
- переключаем каждое из приложение на свой собственный RDS proxy endpoint через переменные окружения
Отлично, теперь у нас каждый микросервис подключен к отдельному RDS proxy endpoint с отдельными кредами.
Теперь идём в AWS CloudWatch в Dashboards.
У нас есть метрики и мы их можем смело раскинуть по каждому из RDS proxy Endpoint
Смело строим графики и видим все интересующие параметры по каждому пользователю/приложению.
Итог:
На выходе у нас дашборд, который показывает массу деталей по конкретно каждому юзеру/приложению, что очень важно понять например кто больше делает нагрузки на БД.
Дополнительно:
- перед реализацией не забывайте про ограничения:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html
- всё тоже самое можно сделать создав несколько RDS proxy для каждого приложения, но и платить придётся сильно больше
- есть вы подключили в своей Grafana datasource=CloudWatch, то он пока не умеет выводить метрики дименшна по endpoint, только по отдельным RDS proxy. Пока красивые графики только в CloudWatch Dashboard.
#AWS #observability #cloudwatch
8.0.mysql_aurora.3.08.0) + RDS Proxy.К базе подключено N клиентов-приложений. Допустим их 10. Все подключены через прокси.
Появилась задача понять "кто из приложений кушает больше всего коннекшнов и отобразить это на графике".
Большее обсервабилити, большая детализация. Больше SRE
Однако штатно таких метрик не существует(ну или же я просто не нашёл).
Вариант с лямбдой и
SELECT usename, count(*)
FROM pg_stat_activity
GROUP BY usename;
Мне показался туповатым.
❕Я не знаю как это делают правильные инженеры, опишу свой вариант решения, который сделал в выходные.
- создаем в базе данных 10 новых пользователей с нужными правами
- добавляем креды новых юзеров в secret manager
- добавляем аксесс этих юзеров на RDS proxy кредами из secret manager
resource "aws_db_proxy" "this" {
...
auth {
auth_scheme = "SECRETS"
iam_auth = "DISABLED"
client_password_auth_type = "MYSQL_NATIVE_PASSWORD"
secret_arn = aws_secretsmanager_secret.user1_credentials.arn
}
auth {
auth_scheme = "SECRETS"
iam_auth = "DISABLED"
client_password_auth_type = "MYSQL_NATIVE_PASSWORD"
secret_arn = aws_secretsmanager_secret.user2_credentials.arn
}
...
}- создаем новые rds proxy endpoint для каждого из приложений/юзера
resource "aws_db_proxy_endpoint" "this" {
...
db_proxy_endpoint_name = "${var.project}-${var.environment}-user1"
target_role = "READ_WRITE"
...
}resource "aws_db_proxy_endpoint" "this" {
...
db_proxy_endpoint_name = "${var.project}-${var.environment}-user2"
target_role = "READ_WRITE"
...
}- переключаем каждое из приложение на свой собственный RDS proxy endpoint через переменные окружения
Отлично, теперь у нас каждый микросервис подключен к отдельному RDS proxy endpoint с отдельными кредами.
Теперь идём в AWS CloudWatch в Dashboards.
У нас есть метрики и мы их можем смело раскинуть по каждому из RDS proxy Endpoint
- ClientConnections
- DatabaseConnections
- AvailableConnectionPercent
- ConnectionAttempts
- QueryRequests
- QueryRequestsPerSec
Смело строим графики и видим все интересующие параметры по каждому пользователю/приложению.
Итог:
На выходе у нас дашборд, который показывает массу деталей по конкретно каждому юзеру/приложению, что очень важно понять например кто больше делает нагрузки на БД.
Дополнительно:
- перед реализацией не забывайте про ограничения:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html
- всё тоже самое можно сделать создав несколько RDS proxy для каждого приложения, но и платить придётся сильно больше
- есть вы подключили в своей Grafana datasource=CloudWatch, то он пока не умеет выводить метрики дименшна по endpoint, только по отдельным RDS proxy. Пока красивые графики только в CloudWatch Dashboard.
#AWS #observability #cloudwatch
Please open Telegram to view this post
VIEW IN TELEGRAM
👍26❤2
Логи Lambda теперь дешевле
https://aws.amazon.com/blogs/compute/aws-lambda-introduces-tiered-pricing-for-amazon-cloudwatch-logs-and-additional-logging-destinations/
Если у вас их было очень много (терабайты - но зачем?), то экономия существенная.
Возможность слать логи в S3 выглядит привлекательно, но как понимаю, это в довесок к CloudWatch, а не вместо — экономия лишь на хранении (а основной расход - ingestion).
#Lambda #CloudWatch #S3
https://aws.amazon.com/blogs/compute/aws-lambda-introduces-tiered-pricing-for-amazon-cloudwatch-logs-and-additional-logging-destinations/
Если у вас их было очень много (терабайты - но зачем?), то экономия существенная.
Возможность слать логи в S3 выглядит привлекательно, но как понимаю, это в довесок к CloudWatch, а не вместо — экономия лишь на хранении (а основной расход - ingestion).
#Lambda #CloudWatch #S3
Amazon
AWS Lambda introduces tiered pricing for Amazon CloudWatch logs and additional logging destinations | Amazon Web Services
Effective logging is an important part of an observability strategy when building serverless applications using AWS Lambda. Lambda automatically captures and sends logs to Amazon CloudWatch Logs. This allows you to focus on building application logic rather…
🍾2
CloudWatch прокачался:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ServiceMap.html
• Auto-discovers relationships between AWS resources
• Creates interactive topology maps of your entire infrastructure
• Transforms telemetry into actionable insights
• One-click navigation to metrics, logs, and traces
Для того, чтобы видеть и пользоваться всей этой красотой прямо из коробки, требуется включить CloudWatch Application Signals.
P.S. Зачем вам теперь какая-то Grafana или Datadog, когда есть такой похорошевший CloudWatch!
#CloudWatch
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ServiceMap.html
• Auto-discovers relationships between AWS resources
• Creates interactive topology maps of your entire infrastructure
• Transforms telemetry into actionable insights
• One-click navigation to metrics, logs, and traces
Для того, чтобы видеть и пользоваться всей этой красотой прямо из коробки, требуется включить CloudWatch Application Signals.
P.S. Зачем вам теперь какая-то Grafana или Datadog, когда есть такой похорошевший CloudWatch!
#CloudWatch
😁17👍4🔥2🤯2👌2🤡1