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

collectdout

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collectdout

Periodically send values out to a Collectd server for statistics

  • 0.0.9
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Synopsis

Periodically send values out to a Collectd server for statistics.

This piece of code has been sponsored by Superfeedr. They are awesome and you should really consider their service if you process RSS feeds!

Installation

npm i collectdout

Usage

Spawn a client that sends the data every 60s to myserver:

var Collectd = require('collectdout');
var client = new Collectd(60000, "collectd_server", 25826, "my_server");

Fourth argument is optional, default is os.hostname()

To transmit data securely with username 'alice' and password '12345', you can select authentication (HMAC) by setting the security level to 1.

var client = new Collectd(60000, "collectd_server", 25826, "my_server",
                          1, 'alice', '12345');

You can also encrypt the trasmitted data by setting the security level to 2.

var client = new Collectd(60000, "collectd_server", 25826, "my_server",
                          2, 'alice', '12345');

Create your plugin instance:

var plugin = client.plugin('myapp', 'worker13');

Set gauges, they are averaged within a sampling period:

plugin.setGauge('users', 'total', 23);
plugin.setGauge('load', '0', [1.0, 0.85, 0.7]);

Manipulate counters:

plugin.setCounter('if_octets', 'eth0', [0, 0]);
plugin.addCounter('uptime', '0', 1);

Change log

  • v0.0.8
    • Adding crypto support
  • v0.0.7
    • Fix counter bug
  • v0.0.6
    • Possibility to send notification
  • v0.0.5
    • Add this changelog
    • Possibility to send data to more than one server
  • v0.0.4
    • Fix interval issue
    • Add optionnal parameter to set hostname
  • v0.0.3
    • Fix multiple value sending

FAQs

Package last updated on 06 Aug 2016

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