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

statworks

v1.5.0

Published

Statworks is a proactive software-as-a-service ( SaaS ) module.

Downloads

78

Readme

Statworks

Statworks is a proactive software-as-a-service ( SaaS ) module.

This is the npm module client for the https://statworks.io service

The module will feed system statistics, of the device the module is running on, to our servers. Here we will keep track of the status of your system, sending you warning notifications when your device reaches any critical levels you have determined. Analyse the gathered data to provide you with weekly or monthly status reports and allow you to monitor your system for running processes and notify you and your team if any process is no longer running as expected.

The module is intended to be running in its own process in order to be able to also monitor more framework specific process watch application and not to be brought down along and applications in use. At the momnet the module has only been developed for systems running Linux and BSD, but we are working on also supporting Microsoft Windows at some point.

NOTE: You will need an account on statworks.io to obtain the account key and client token needed to setup the system monitor and warning notifications.

Installation

Install the module using npm:

npm install -g statworks

Setup

  1. Create a statworks account.
  2. Create a new "client"
  3. Run the "statworks init" command
  4. Copy the client token and account key from the website into your terminal.
  5. Run the command: "statworks start"

Usage

The main command is simply "statworks" where specific functionality is triggered using the parameters Example:

statworks <PARAMETER>

Parameters

init

Initializes the application on the device that you want to monitor. The application prompts you for a client token and an account key. Example:

start

Starts the application as a background daemon.

stop

Stops the application background daemon.

watch

Runs the application attached to the process.

reset

Resets the configuration object.

log

Prints the most recent application logs to the console.

test

Lets you test for the outcome of a process query to use with the watchers functionality.

Running: 'statworks test mysql' could return negative,

while running: 'statworks test mysqld' would return positive.

( the difference being the 'd' at the end, indicating to look for the daemonized process ) This will let you know what to set up your client to look for when applying a process watch.

Concepts

Watchers

A "watcher" is the term for watching a process. From the web application interface you can add one or many watchers to keep a watch on a process that is supposed to be running on your system. This watch function will then trigger if the process is not found running on your system, and send you a notification.

You can use the test parameter of the statworks client in order to learn the instance name of the process you want to watch.

Docker Watch

This functionality will help you ensure your docker containers and images are running as expected. While a Watcher can enable you to make sure that docker itself is running, the docker watch will let you place a watch on individual docker instances, to let you know if they for some reason is not running or working as expected.

Contact Group

A contact group is a way to contact different groups of people depending on the problem that has been detected. While one group of contacts are to be notified on the detection of a database being down, it could be another group of contacts that needs to be informed about disk usage reaching critical levels.

For full API description and documentation please read the documentation:

cli interface