GithubHelp home page GithubHelp logo

webhook-processor-example's Introduction

Introduction

This project is a simple utility to help integrating New Relic alerting webhooks in to 3rd party systems, even those behind firewalls. It depends on IronMQ, an excellent SaaS message queue service, and Loggly, a SaaS log management service.

New Relic webhooks are routed through to this processor via IronMQ's ability to accept webhooks. From there, the processor pulls the webhook off the queue and passes it in as the event object while executing some custom JavaScript code. The JavaScript environment has access to various utilities, such as an HTTP library, which makes it easy to transform the webhook payload and pass it on to any 3rd party system.

To facilitate with logging, we've also added optional support for Loggly, a popular SaaS log management service. When configured to use Loggly, all log messages will be pushed to the desired Loggly service and you can have the option of updating the custom JavaScript remotely via an "update key".

Building

Building this project requires Maven 3.1 or greater. Once mvn is in your classpath, building is as simple as running mvn install. To prepare the full release, simply run mvn -Prelease install and look in the target directory for the resulting zip file.

The project is also verified to open cleanly in IntelliJ IDEA. Simply open the pom.xml file as your project file.

Running It

Running is as simple as executing the shell script in the bin directory and pipping stdout/stderr to whatever log file you like. This will launch the webhook processor and it will stay running until you kill the process.

Rapid Script Development

You may also optionally run the program with the --update-script argument. This only works if you've configured remote.scriptUpdateKey in the configuration file. This will take the contents of script.js and push them in to the queue, allowing a separate running service to pick up the changes and load them locally. This is ideal for when you've got the webhook processor service running on a separate server and you're using Loggly + this functionality to develop remotely and iterate quickly with changes to the script.

Contribution Guidelines

Contributions are welcome! There are two ways to get involved:

  • Open bugs/feature requests
  • Submit pull requests (preferred)

When submitting bugs, please remember that this is a volunteer effort. As such, we ask that you take the time to explain any bugs in the most detail you can, including manual or automatic test cases that clearly showcase the problem.

When submitting pull requests, we ask that you take the time to squash all commits and comment your code so that we can easily understand what your changes do.

License

This project is licensed under the Apache 2.0 License. Please see LICENSE.txt for more information.

webhook-processor-example's People

Contributors

lightbody 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.