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

mesures

v0.3.2

Published

Downloads

19

Readme

Metrics

Exposing key/value over HTTP as a JSON, even in real time.

Write value on a socket, with nc or other low tech tool. Read it with curl.

Try it

In a terminal

./bin/metricsd.js

You can specify a config file as first argument. Have a look at conf.json

In an other terminnal

echo "answer 42" | nc localhost 8124

In a browser

http://localhost:1337

Event source :

First event a dump, followings are new values.

http://localhost:1337/events

First event is a complete dump, following by a simple key/value for each modifications.

Install as a service

Install the application globaly :

npm install -g metricsd

An init.d script is provided

sudo useradd --system --user-group metricsd

Put a nice Nginx in front, it will handle the port 80 for you.

Modules

Each modules can access to the state object (in read/write mode) and register url patterns.

input/tcp_socket

Set key over a socket, with a minimalistic syntax.

output/vapor

Remember old values with a capped list.

proc/stats

Fetch metrics from /proc folder.

Todo

  • √ expose stack as JSON over HTTP
  • √ set value over a socket
  • √ expose values as Server Sent Event
  • √ homepage with some javascripts.
  • √ registerable modules
  • √ config file
  • _ backup JSON file for crash proof
  • _ not only GAUGE, add COUNTER type

Licence

GPLv3. © Mathieu Lecarme.