• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created almost 11 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A standalone, node.js-based beacon receiver for boomerang.

boomcatch

A standalone, node.js-based beacon receiver for boomerang. Read more.

Build status

  • boomcatch version: 3.2.5
  • node.js versions: 0.10 and later

Installation

At the system level

First you must install node.

You can then install boomcatch via npm:

npm install -g boomcatch

Local to a node.js project

Add boomcatch to the dependencies in your project's package.json, then run:

npm install

Usage

From the command line

To see the list of command line options run:

boomcatch --help

Available options are:

  • --host <name>: Host name to accept HTTP connections on. The default is 0.0.0.0 (INADDR_ANY).

  • --port <port>: Port to accept HTTP connections on. Defaults to 80 for HTTP or 443 for HTTPS.

  • --https: Start the server in HTTPS mode.

  • --httpsPfx: PFX/PKCX12 string containing the private key, certificate and CA certs for HTTPS mode.

  • --httpsKey: Path to private key file for HTTPS mode. Ignored if --httpsPfx is set.

  • --httpsCert: Path to certificate file for HTTPS mode. Ignored if --httpsPfx is set.

  • --httpsPass: Passphrase for --httpsPfx or --httpsKey options.

  • --path <path>: URL path to accept requests to. The default is /beacon.

  • --referer <regex>: HTTP referers to accept requests from. The default is .*.

  • --origin <origin>: Comma-separated list of URL(s) for the Access-Control-Allow-Origin header. The default is * (any origin), specify 'null' to force same origin.

  • --limit <milliseconds>: Minimum elapsed time to allow between requests from the same IP address. The default is 0.

  • --maxSize <bytes>: Maximum body size to allow for POST requests. The default is -1 (unlimited).

  • --silent: Prevent the command from logging output to the console.

  • --syslog <facility>: Use syslog-compatible logging, with the specified facility level.

  • --workers <count>: The number of worker processes to spawn. The default is -1 (one worker per CPU).

  • --delayRespawn <milliseconds>: The length of time to delay before respawning worker processes. The default is 0.

  • --maxRespawn <count>: The maximum number of times to respawn worker processes. The default is -1 (unlimited).

  • --validator <path>: Validator used to accept or reject request data. The default is permissive (always accept requests).

  • --mapper <path>: Data mapper used to transform data before forwarding, loaded with require. The default is statsd.

  • --prefix <prefix>: Prefix for mapped metric names. The default is the empty string (no prefix).

  • --forwarder <path>: Forwarder used to send data, loaded with require. The default is udp.

  • --fwdHost <name>: Host name to forward mapped data to. The default is 127.0.0.1. This option is only effective with the UDP forwarder.

  • --fwdPort <port>: Port to forward mapped data on. The default is 8125. This option is only effective with the UDP forwarder.

  • --fwdSize <bytes>: Maximum packet size for forwarded data. The default is 512. This option is only effective with the UDP forwarder.

  • --fwdUrl <url>: URL to forward mapped data to. This option is only effective with the HTTP forwarder.

  • --fwdMethod <method>: Method to forward mapped data with. The default is GET. This option is only effective with the HTTP forwarder.

  • --fwdDir <path>: Directory to write mapped data to. This option is only effective with the file forwarder.

From a node.js project

var path = require('path');
var boomcatch = require('boomcatch');

boomcatch.listen({
	host: 'rum.example.com',                  // Defaults to '0.0.0.0' (INADDR_ANY)
	port: 8080,                               // Defaults to 80 for HTTP or 443 for HTTPS
	https: true,                              // Defaults to false
	httpsKey: 'foo.key',
	httpsCert: 'bar.cert',
	httpsPass: 'baz',
	path: '/perf',                            // Defaults to '/beacon'
	referer: /^\w+\.example\.com$/,           // Defaults to /.*/
	origin: [                                 // Defaults to '*'
	'http://foo.example.com',
	'http://bar.example.com'
	],
	limit: 100,                               // Defaults to 0
	maxSize: 1048576,                         // Defaults to -1
	log: console,                             // Defaults to object with `info`, `warn` and `error` log functions.
	workers: require('os').cpus().length,     // Defaults to 0
	validator: path.resolve('./myvalidator'), // Defaults to 'permissive'
	mapper: path.resolve('./mymapper'),       // Defaults to 'statsd'
	prefix: 'mystats.rum.',                   // Defaults to ''
	forwarder: 'http',                        // Defaults to 'udp'
	fwdUrl: 'https://stats.example.com/',     // No default
	fwdMethod: 'POST'                         // Defaults to 'GET'
});

Extensions

Boomcatch implements four extension points to control how beacon requests are handled: validators, filters, mappers and forwarders. These extension points are invoked as a pipeline when a beacon request is received.

boomcatch extensions' diagram

Several extensions are shipped as part of Boomcatch, or you can implement your own custom extensions.

You can read more details in the documentation about extensions.

Development

Before submitting any pull requests, please ensure that you have adhered to the contribution guidelines.

To clone the repository:

git clone [email protected]:nature/boomcatch.git

To set up the development environment:

npm install

To lint the code:

npm run lint

To run the unit tests:

npm test

Change log

History

Support

You can have a look at the Springer Nature Frontend Playbook for an explanation of how we support our open source projects.

License

GPL 3

Copyright © 2014, 2015, 2016 Springer Nature

More Repositories

1

frontend-playbook

The Frontend Playbook
464
star
2

shunter

A Node.js application built to read JSON and translate it into HTML
JavaScript
237
star
3

kotlin-playbook

How we write Kotlin code
99
star
4

webpagetest-mapper

Maps JSON result data from marcelduran/webpagetest-api into human-readable document formats.
JavaScript
96
star
5

immagine

Service that serves images and resize them if need be.
Ruby
93
star
6

scigraph

A Linked Open Data platform for the scholarly domain.
Java
73
star
7

bandiera

Simple Feature Flagging
Ruby
59
star
8

hasbin

Check whether a binary exists in the PATH environment variable from Node.js
JavaScript
31
star
9

truffler

Access web pages programmatically with PhantomJS, for running tests or scraping information
JavaScript
24
star
10

frontend-toolkits

Frontend Component Toolkits for the Elements Design System
SCSS
13
star
11

halfpipe

CLI for interacting with halfpipe
Go
12
star
12

fs2-pdf

Streaming PDF processor for Scala
Scala
12
star
13

thundermole

Proxy or redirect requests to different applications based on an API response
JavaScript
10
star
14

qs-middleware

Connect querystring middleware
JavaScript
9
star
15

cf-sonarqube-buildpack

Cloud Foundry SonarQube Buildpack
Shell
7
star
16

bandiera-client-php

A PHP client for the Bandiera feature flagging service
PHP
6
star
17

cf-rundeck-buildpack

Cloud Foundry Rundeck Buildpack
Shell
5
star
18

gcs-proxy

Google Cloud Storage proxy which supports file listing.
Go
5
star
19

bandiera-client-ruby

A Ruby client for the Bandiera feature flagging service
Ruby
5
star
20

cf-buildpack-update-action

A GitHub Action to allow you to scan projects for out-of-date Cloud Foundry buildpacks.
Kotlin
4
star
21

open-source-directory

A public listing of all the open source software published by Springer Nature.
4
star
22

halfpipe-cf-plugin

CF Plugin for doing cool deployments.
Go
4
star
23

vpat

Contains VPAT documents for SpringerNature products
3
star
24

sapTechWorkshopApp

a little sapui5 app for the NY workshop
JavaScript
3
star
25

eslint-config-springernature

ESLint shareable config used at Springer Nature
JavaScript
3
star
26

macmillan-utils

A collection of useful patterns we use in our Ruby applications.
Ruby
3
star
27

concourse-badger

Concourse pipeline badges
Go
2
star
28

frontend-express-demo

PUBLIC express demo
JavaScript
2
star
29

bandiera-client-node

A Node.js client for the Bandiera feature flagging service
JavaScript
2
star
30

diversity-hiring

2
star
31

accessibility-guide

Creating an accessibility guide for Springer Nature
CSS
2
star
32

buildpack-update-action

Please use cf-buildpack-update-action in place of this.
Kotlin
2
star
33

frontend-package-manager

Handles the creation, validation, and publication of frontend components in a monorepo
JavaScript
2
star
34

frontend-techtest-backend

Node backend for the frontend tech test
JavaScript
2
star
35

bandiera-client-scala

Scala
1
star
36

slack-channel-archiver

Simple archiver for infrequently used Slack channels.
Ruby
1
star
37

ux-elements-docs

UX Documentation for Elements design system
1
star
38

ee-snpaas-cli

SNPaaS client and docker image
Shell
1
star
39

varnish-boshrelease

Bosh release for Varnish HTTP Cache
Shell
1
star
40

omelet

Web Automation Framework for Selenium WebDriver built on top of TestNG
Java
1
star
41

DUL-Protocol-Validator

Distributed Usage Logging Protocol Validator
Scala
1
star
42

sasslint-config-springernature

Sass Lint shareable config used at Springer Nature
1
star
43

codingtests

Coding challenge for SNTPS recruitment candidates for java developers
Java
1
star