npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

strong-agent-statsd

v1.0.6

Published

strong-agent middleware for publishing metrics via statsd protocol.

Downloads

14

Readme

strong-agent-statsd

strong-agent middleware for publishing metrics via statsd protocol.

The statsd protocol is supported by large ecosystem of servers and plugins, allowing publishing into on-premise or custom infrastructure.

See strong-agent.

Integration points

There are a number of integration points where strong-agent metrics can be published into hosted or on-premise monitoring and reporting infrastructure.

  1. strong-agent metrics can be collected directly using the require('strong-agent').use() API, the strong-agent-statsd source may be used as an example.
  2. strong-agent-statsd can publish metrics using the statsd protocol to any of a number of servers
    1. statsd is the original server, it has:
      1. a built-in graphite backend, where graphite might be local or hosted
      2. other backends, such as for Zabbix, etc.
      3. support for custom backends, they are easy to write, one of the above backends can be used as an example
    2. other metrics consumers, such as datadog, have agents that support the statsd-protocol
  3. strong-agent-statd can publish into a custom server written to support existing on-premise infrastructure, the statsd protocol is quite simple.

Most metrics reported by strong-agent are 'gauges', a measured value, but a few metrics are best reported as 'counts', values that count events. There are other statsd data types, but none are relevant to the metrics currently published by strong-agent.

This publisher uses the lynx client.

publisher = require('strong-agent-statsd')([options])

Module returns a constructor for a publisher function. The publisher requires no options, but the following are allowed:

  • options.host (String) The host to connect to, the default is localhost, as statsd servers usually run on the same host as the client.

  • options.port (Number) The port to connect to, the default is 8125, the default port used by the original statsd server and by most others.

  • options.scope (String) A scope to prepend to the metric name before publication, default is none.

Metrics names are hierarchical dot-seperated strings. When reported by statsd, they will most likely need to fit into a larger hierarchy of all the applications, or perhaps an entire system or company.

Statsd servers usually have the ability to scope metrics reported to them, but if there are multiple clients reporting to the same server, or if the scope should contain information best known to the client (process ID, application name, cluster worker ID) the scoping can occur at source.

Example

Example integration with strong-agent:

require('strong-agent').use(
  require('strong-agent-statsd')()
);