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

nsolid-graphite

v2.2.0

Published

a daemon that sends N|Solid metrics to graphite

Downloads

9

Readme

nsolid-graphite - a daemon that sends N|Solid metrics to graphite

This package provides a daemon which will monitor N|Solid Storage and send the metrics from the N|Solid runtimes to graphite via the Graphite protocol over UDP.

installation

npm install nsolid-graphite

usage

nsolid-graphite [options] [graphite-address [storage-address]]

where:

graphite-address - the {address} of the graphite UDP server
                 default: localhost:2003

storage-address  - the {address} of the N|Solid storage server's API port
                 default: localhost:4000

See {address} below for the expected format of these addresses.

options are:

-h --help            - print some help text
-v --version         - print the program version
--app <app name>     - the N|Solid application name to monitor
                       default: monitor all applications
--prefix <value>     - prefix graphite metric names with the specified value
                       default: 'nsolid'

Options are parsed with the npm rc module, and so options can be set in environment variables or files, as supported by rc. For example, you can specify options in a file named .nsolid-statsdrc.

The {address} parameter of the graphite-address and storage-address parameters should be in one of the following formats:

:
port
host
host:port

If port is not specified, the default is 2003 for graphite-address, and 4000 for storage-address. If host is not specified, the default is localhost. The host may be a hostname or IPv4 address.

examples

nsolid-graphite example.com

Poll metrics from the N|Solid storage at localhost:4000 and send them to the graphite server at example.com:2003.

docker

NodeSource provides a Docker image to easily get add nsolid-graphite to an environment already using containers.

docker pull nodesource/nsolid-graphite

Running the nsolid-graphite image

docker run -d --name="nsolid-graphite" nsolid-graphite graphite:2003 storage:4000 

Poll metrics every second from the N|Solid storage at storage:4000 and send them to the graphite server at graphite:2003.

nsolid-graphite also supports using environment variables for providing the N|Solid Storage and graphite endpoints

docker run -d --name="nsolid-graphite" -e NSOLID_ADDRESS=storage:4000 -e GRAPHITE_ADDRESS=graphite:2003 nsolid-graphite

graphite metric names

N|Solid gathers an extensive list of metrics from the N|Solid Runtime to provide the greatest insight into your Node.js applications.

The full list of metrics with descriptions can be found at N|Solid Metrics.

The default format of the metric names is:

{prefix}.{app}.{hostname}.{statName}

The {prefix} value can be specified via command-line option, and defaults to nsolid. The {app} value is the name of the N|Solid application.

string value normalization

String values which are provided by N|Solid will be normalized in the following fashion before being used in a graphite metric

  • characters which are not alpha-numeric or "-" or "_" will be converted to "-"
  • strings that are greater than 200 characters will be truncated to 200 characters

The values which are affected are:

  • N|Solid application name
  • N|Solid hostname

contributing

To submit a bug report, please create an issue at GitHub.

If you'd like to contribute code to this project, please read the CONTRIBUTING.md document.

Authors and Contributors

License & Copyright

nsolid-graphite is Copyright (c) 2017 NodeSource and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.