Posts

Showing posts from September, 2024

[Solved] Overcoming the 'No Data' Challenge in CloudWatch Logs Insights with Grafana

  Introduction When monitoring application health, it's crucial to have reliable alerting systems. In our case, we needed to set up an alert for DatabaseConnectionErrors using CloudWatch Logs Insights and Grafana. However, we encountered a significant challenge: how to handle periods when no errors occurred without breaking our alerting system. This article details our journey from facing this issue to implementing a robust solution. The Challenge What We Were Trying to Do Our goal was to create a Grafana alert that would trigger whenever a DatabaseConnectionError appeared in our CloudWatch logs. We wanted to check for these errors every 5 minutes and alert if any were found. The Issue We Faced When using a straightforward CloudWatch Logs Insights query, we encountered a problem: during periods with no errors, our query returned no data. This led to two significant issues: Grafana displayed "No Data" instead of 0, making it difficult to distinguish between periods...

Understanding Amazon SQS: Normal vs FIFO Queues - with Practical Examples

Image
  This guide will walk you through the differences between Amazon SQS Standard and FIFO queues, demonstrating various functionalities with practical Python examples. Each example will be in its own file, with clear instructions on how to run and what to expect. Repo for Code Reference aws/sqs/normal-fifo-queue-examples https://github.com/ankit630/unixcloudfusion-devops-solutions.git https://gitlab.com/ankit630/unixcloudfusion-devops-solutions.git Prerequisites An AWS account with appropriate permissions to create and manage SQS queues. Python 3.6 or later installed on your system. AWS CLI configured with your credentials. Boto3 library installed ( pip install boto3 ). Table of Contents Setting Up Your Environment Creating Standard and FIFO Queues Sending and Receiving Messages Visibility Timeout Message Deduplication and Grouping Dead-Letter Queues Long Polling Cleanup Setting Up Your Environment Create a new directory for this project and navigate into it: mkdi...