🚀 DAY 2 OF LAUNCH WEEK: Unify Your Security Stack with Socket Basics.Learn more →
Socket
Book a DemoInstallSign in
Socket

black-pearl

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

black-pearl

Metrics collector that push metrics to Elastic Search + Kibana.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

black-pearl Build Status

Metrics collector that push metrics to Elastic Search + Kibana.

Getting started

Run server :

black-pearl

Push metric from client :

var client = require('black-pearl-client').createClient();
client.push('connectedUsers', { count: 5 });

View metrics in Kibana :

Kibana

Install

npm install black-pearl

Usage

CLI

Usage: black-pearl [options]

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -p, --port [port]    Http port.
    -e, --eshost [host]  Elastic search host, default 9400.

Node

var Server = require('black-pearl').Server;

var server = new Server({ es: { host: 'elasticsearch1' } });
server.listen(9400);

Push metrics

To push metrics, you must use the black-pearl-client module, it's very easy.

var blackPearl = require('black-pearl-client');
var client = blackPearl.createClient('http://localhost:9400');

client.push('connectedUsers', { count: 5 });

Debug mode

To enter in debug mode and view some logs, you have to set the DEBUG env variable.

DEBUG=true black-pearl

License

MIT

Keywords

metrics

FAQs

Package last updated on 24 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts