statworks

1.5.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i statworks

Weekly Downloads

3

Version

1.5.0

License

GPL

Unpacked Size

58.5 kB

Total Files

21

Last publish

Collaborators

  • null4bl3