Skip to content

Instantly share code, notes, and snippets.


Harshit jain harshitj2005

  • Nagarro Software Pvt. Ltd
  • Gurgaon
View GitHub Profile
harshitj2005 /
Last active Feb 3, 2020
Lambda function to fetch classic, application and network Load balancer metrics from cloud watch and send them on ElasticSearch. Using elasticsearch and kibana we can visualise the metric graphs easily

Problem statement

Sometime we want to visalualise all our graph (including metrics and other business data) under single dashboard. Now AWS provides metrics for it's elastic load balancers but we can visualise them only on AWS console.

Solution Description

This function will fetch metrics from cloud watch for mentioned load balancers or all of the available load balancers in a specified region and put them on elastic search. From elastic search we can easily visualise them on various dashboard (for ex: kibana, redash, etc)

Steps to run this application on lambda

  1. create a folder in your system and save index.js and package.json in the same.
  2. Run npm i inside that folder from terminal