Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zag-daemon

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zag-daemon

aggregate metrics data

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

zag-daemon

The daemons aggregate the raw points sent by zag-agent.

It is also responsible for monitoring and alerting, though that functionality is disabled for now.

Service setup

In order to scale, metrics data can be spread across multiple daemons that are configured as a ring. A list of their address:ports needs to be passed in as the join option.

require('zag-daemon')(
{ host:   "address:port"
, join:  ["address:port"]
, db:     "postgres://postgres:1234@localhost/postgres"
, env:    "prod" or "dev"
, backend: require('zag-backend-pg')
}).on("error", function(err) { })

API

zag-agent uses the UDP API.

UDP

The primary protocol for recording metrics is over UDP. Each daemon is running a UDP server on options.host.

The data should be newline-delimited lines of the form:

<type>:<key>=<value>

where

  • type - counter or histogram.
  • key - [>| \w/._()+:-]+
  • value - Number. Positive or negative, integer or decimal.

HTTP

POST /api/metrics

The POST body should be in the same format as the UDP data. The points are recorded as the arrive, so the client can just keep sending data down a single connection instead of making repeated requests.

Keywords

FAQs

Package last updated on 11 Jun 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc