statsd-agent-js
Statsd client to monitor CPU, Memory, Disk and Network based on Node JS
Last updated 2 years ago by eran.betzalel .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install statsd-agent-js 
SYNC missed versions from official npm registry.

statsd-agent

Statsd client to monitor CPU, Memory, Disk and Network based on Node JS

Installation

git clone https://github.com/eranbetzalel/statsd-agent-js.git

Configuration

The configuration is loaded from config.custom.js. If the file does not exists - it will be created from config.default.js.

  • monitorFilenames - The monitor filenames relative to the monitors directory.
    • Default: ['cpu-monitor', 'memory-monitor', 'disk-monitor', 'network-monitor']
  • collectStatisticsInterval - The time interval (ms) to collect statistics.
    • Default: 10000
  • sendStatisticsInterval - The time interval (ms) to send statistics.
    • Default: 10000
  • statsdConfig - The statsd-client package configuration
    • host (default: 'localhost') - Where to send the stats
    • prefix (default: 'system') - Prefix all stats with this value
    • debug (default: 'false') - Print what is being sent to stderr
  • statisticBlackList - Array of statistic names ([monitor].[statistic]) to ignore while sending data to statsd.
    • Example: ['memory.used']

Running/Stopping (Linux)

Use forever service to install the agent as linux service.

sudo forever-service install statsd-agent-js -s src/app.js

Use the following commands to run/stop statsd-agent-js:

service statsd-agent-js start
service statsd-agent-js stop
service statsd-agent-js restart
service statsd-agent-js status

Running/Stopping (Windows)

Working on it...

Monitors

A monitor has 2 purposes collect and send statistics. The statsd name pattern is "hostname.monitor.statistic".

The package delivers with the following monitors:

  • CPU - Sends the usage percentage of the common CPU states.
    • cpu.user - running user space processes (%)
    • cpu.nice - running niced (priority) processes (%)
    • cpu.sys - running the kernel (%)
    • cpu.idle - processor was idle (%)
    • cpu.irq - idle while waiting for an I/O operation to complete (%).
  • Memory - Sends the memory usage and total
    • memory.total - total memory (bytes)
    • memory.free - free memory (bytes)
    • memory.used - used memory (bytes)
  • Disk - Sends the usage percentage for any available mount points.
    • disk.[mount-point].total - total memory (bytes)
    • disk.[mount-point].free - free memory (bytes)
    • disk.[mount-point].used - used memory (bytes)
  • Network - Sends a count of the current connection states.
    • network.established - The socket has an established connection
    • network.syn_sent - The socket is actively attempting to establish a connection
    • network.syn_recv - A connection request has been received from the network
    • network.fin_wait1 - The socket is closed, and the connection is shutting down
    • network.fin_wait2 - Connection is closed, and the socket is waiting for a shutdown from the remote end
    • network.time_wait - The socket is waiting after close to handle packets still in the network
    • network.close - The socket is not being used
    • network.close_wait - The remote end has shut down, waiting for the socket to close
    • network.last_ack - The remote end has shut down, and the socket is closed. Waiting for acknowledgement
    • network.listen - The socket is listening for incoming connections
    • network.closing - Both sockets are shut down but we still don't have all our data sent
    • network.unknown - The state of the socket is unknown

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

8 Versions

  • 2.0.0                                ...           2 years ago
  • 1.3.1                                ...           3 years ago
  • 1.3.0                                ...           3 years ago
  • 1.2.2                                ...           3 years ago
  • 1.2.1                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (11)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |