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

sensu-server-metrics

v3.0.0

Published

Sensu metric check is a metrics check written in nodejs that gathers server performance indicators

Downloads

2

Readme

sensu-server-metrics

Sensu metric check is a metrics check written in nodejs that gathers server performance indicators

Prerequisites

  • As this check is written in NodeJS, Node 6+ has to be installed on the system running it.

  • The check was initialy written to store data in InfluxDB. Therefore it outputs metrics on stdin and needs an appropriate handler. I have written one in Node that is available as a Gist.

Installation

In your Sensu plugins directory run:

npm install sensu-server-metrics

Add defaultIface if you want to get stats about your network rx & tx and services (as a list of comma seperated system service names) to get their CPU & RAM usage. Exemple:

{
  "client": {
    "name": "lb1",
    "system": "Ubuntu 16.04",
    "cpu": "Intel(R) Atom(TM) CPU  C2750  @ 2.40GHz",
    "cpu_cores": "8",
    "cpu_threads_per_core": "1",
    "ram": "16010MB",
    "defaultIface": "enp0s20f0",
    "address": "63.17.218.135",
    "subscriptions": ["default", "httpd80"],
    "services": "nginx,fail2ban,exim4"
  }
}

Finally add the check to your checks file:

{
  "checks": {
    "collect_metrics": {
      "type": "metric",
      "command": "/etc/sensu/plugins/node_modules/sensu-server-metrics/serverMetrics.js",
      "interval": 30,
      "handlers": ["influxdb"],
      "subscribers": ["default"]
    }
  }
}

Metrics

The check gathers the following metrics:

  • given system services CPU and RAM usage (in %)
  • cpu load (in %)
  • RAM usage (in %)
  • SWAP usage (in %)
  • disk IOPS (read, write, total)
  • network rx & tx
  • fs usage (in %)