Coder Social home page Coder Social logo

parallel-piper's Introduction

Parallel Piper

Simple mobile web app for sending data to a Splunk HTTP input. It measures the device motion and sends an event with the intensity of the motion to Splunk.

Build/Deploy

  1. Install NPM deps
npm install
  1. Run webpack build

Run build.sh in the source directory.

$ sh build.sh

The following environment variables need to be defined for specifying the Splunk server running the HTTP input.

  • PP_SPLUNK_HOST (default is "localhost")
  • PP_SPLUNK_PORT (default is 8088)
  • PP_SPLUNK_SSL (default is false)
  • PP_SPLUNK_TOKEN (required) token for the HTTP input (See Splunk Setup below.)

Then run the webpack build:

PP_SPLUNK_TOKEN=cafecafecafecafe \
PP_SPLUNK_HOST=my.host.com \
./node_modules/webpack/bin/webpack.js -p

This generates all the page, JS and all the static content in the dist directory. Simply copy it to a webserver-exposed folder.

Splunk Setup

To enable the splunk HTTP Event Collector and create a token follow the instructions posted here:

http://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector

Once you have your token make sure you update your PP_SPLUNK_TOKEN in the previous section.

Parallel Piper makes use of cross-origin resource sharing which requires you to enable CORS on the HTTP event collector.

To do this edit your $SPLUNK_HOME/etc/system/local/server.conf and add the following.

[httpServer]
crossOriginSharingPolicy = *

If you wish to restrict cors calls to a specific domain replace the asterix with the domain name your are hosting Parallel Piper on.

parallel-piper's People

Contributors

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