GithubHelp home page GithubHelp logo

dgomezny / events-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fugue/events-example

0.0 0.0 0.0 53 KB

Example of using the Fugue API to process drift and compliance events

License: Apache License 2.0

JavaScript 81.29% Makefile 18.71%

events-example's Introduction

Fugue Events

This project is an example of using the Fugue API to retrieve and process compliance and drift JSON events in an AWS Lambda function.

The Lambda retrieves events from the Fugue API and then sends them to Splunk.

Overview

Two Fugue features are used in this project:

  • SNS notifications - Fugue sends summary notifications to your SNS topic when events are detected in your infrastructure.
  • REST API - The Fugue API has an endpoint used to retrieve event details.

By deploying the Cloudformation template in this project, you will begin receiving notifications in your own AWS account and you can build reactive integrations with these infrastructure events.

Requirements

You will need the following to get started:

Confirm you have the required binaries by running these commands:

$ aws --version
$ sam --version
$ make --version

Variables

The following environment variables must be set locally to deploy this application:

  • SPLUNK_URL - Splunk HTTP event collector URL
  • SPLUNK_TOKEN - Splunk authentication token
  • FUGUE_API_ID - Fugue API client ID
  • FUGUE_API_SECRET - Fugue API client secret

See the Fugue Documentation for instructions on creating Fugue API credentials.

Install

AWS SAM is used to build a NodeJS Lambda and deploy it as part of a CloudFormation stack. We recommend using the Makefile and its targets to run the build and deploy, although you could also use the SAM CLI directly if you wish. See the Makefile for more information.

Once you have the environment variables set, run the following commands to build and deploy the application:

$ make deploy
$ make update_secret

The SAM CLI will prompt you for some input prior to deployment.

Secret Management

AWS SecretsManager is used to store credentials for the Fugue and Splunk APIs. The make update_secret command stores several of the variables mentioned above in a SecretsManager secret that is then accessed by the Lambda at runtime.

Cleanup

To remove these resources from your account, delete its CloudFormation stack in the AWS console or use the following command:

$ make teardown

events-example's People

Contributors

curtis-fugue avatar ricardofugue 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.