Coder Social home page Coder Social logo

ev2900 / opensearch_kafka_anomaly_detection Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 352 KB

Log data -> Kafka (MSK) - Lambda -> OpenSearch - Anomaly Detection

Python 100.00%
aws elsaticsearch kafka lambda lambda-functions msk opensearch anomaly-detection

opensearch_kafka_anomaly_detection's Introduction

Kafka OpenSearch Anomaly Detection Demo

map-user map-user map-user

Architecture

OpenSearch_demo_Architecture

Instructions

  1. Launch CloudFormation stack

    Launch CloudFormation Stack

  2. Update msk security group to allow inbound traffic from Cloud9 security group

    • Navigate to Security Group page in the AWS console
    • Select msk security group
    • Add inbound bound rule allowing all traffic from the aws-cloud9 security group
  3. Create Kafka topic

  4. Create OpenSearch index

  5. Configure Lambda

    • Navigate to lambda function page in the AWS console

    • Create a lambda function

      • Funcation name = msk-os-lambda
      • Runtime = python 3.7
      • Architecture = x86_64
      • Permissions, Execution role = Use an existing role Lambda-MSK-OpenSearch-Role
    • Add MSK trigger

      • MSK cluster = msk-cluster-workshop
      • Batch size = 500
      • Batch window = 30
      • Topic name = ApplicationMetricTopic
      • Starting position = Latest
    • Add code

      • Copy and past the code from Lambda/1_lambda_function_code_batch.py into the code section of the lambda function
      • Update the os_url variable in the lambda code with the domain endpoint of the OpenSearch cluster deployed by the CloudFormation stack
      • Deploy the lambda function
  6. Send data to OpenSearch

  7. Create + run OpenSearch anomaly detector

  8. Login to the OpenSeach dashboard, navigate to the anomoly detection section. Explore the anomolies OpenSearch detected

Future Improvements Planned for this Repository

  • Automate more of the set up ie. try to minimize the number of steps in the instructions

opensearch_kafka_anomaly_detection's People

Contributors

ev2900 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.