Trigger Jenkins Job using AWS Lambda triggered by S3 Event

The problem that we faced:

There was a cron scheduled in our environment at a particular time which used to run at 8AM. This cron read data from the s3 bucket and used to succeed but failed when there were no objects present.

Problem this Integration solves:

  • Eliminates the need of keeping a scheduler in the system. Lambda will work as a Scheduler.
  • No manual intervention will be required in case the file from one service is delayed by a minute or an hour due to any reason. 
  • Data exchange and processing between teams become more efficient and less error-prone.
  • Eliminates the need of checking the presence of files on S3. It all gets automated.

Workflow:

  1. The object is uploaded to S3
  2. S3 event triggers a Lambda function
  3. Lambda starts Jenkins job using Jenkins API
Continue reading “Trigger Jenkins Job using AWS Lambda triggered by S3 Event”

Nginx monitoring using Telegraf/Prometheus/Grafana

Nginx is one of the most popular and widely used web servers mostly because of its speed and reliability. Nevertheless, it is paramount to keep track of the performance and availability that would help you to proactively prepare yourself for the worst scenarios like sudden/unexpected hikes in traffic. It will also keep you updated about the current state and health of your application.

This article will guide you on how to get Nginx Web Server metrics and visualize them. The main goal is a quick deployment and configuration using well-known open-source projects like Grafana, Prometheus, and Telegraf.

Prometheus: An open-source, time-series database for event monitoring and alerting managed by the Cloud Native Computing Foundation (CNCF).

Grafana: An Open-source project for analytics software and visualization of the metrics from any database.

Telegraf: An Open-source project, plugin-driven agent to collect and send metrics.

Continue reading “Nginx monitoring using Telegraf/Prometheus/Grafana”