Giter VIP home page Giter VIP logo

smon's Introduction

smon

Simple MONitoring tool

Features

smon includes these probes:

  • TCP for testing TCP connections;
  • HTTP for testing HTTP responses, status codes and response lengths;
  • PING for testing ICMP replies;
  • CERT for validating X.509 certificates and days until their expiration.

The following reporting methods are available:

  • setting an exit code;
  • logging to a standard output;
  • mailing via sendmail;
  • writing to a syslog;
  • making an HTTP request (chat bots and other external tools).

Installation

git clone https://github.com/ondras/smon.git

Configuration

  1. Create the conf/ subdirectory
  2. Put all your configuration inside: 1. Configuration files are CommonJS modules (i.e. JavaScript files) 1. All files in conf/ are used; you can either create one-file-per-configuration-element or use one file for all configuration 1. The conf-example/ directory shows several examples for probes and reporters

The configuration API has these methods:

require("..").addProbe({ /* probe configuration */ });
require("..").addReporter({ /* reporter configuration */ });
require("..").configure({ /* global options */ });

A very simple configuration might look like this:

var app = require("..");

// make sure this web is reachable
app.addProbe({
   type: "http",
   url: "http://www.example.com/",
   status: 200
});

// if not, send me an e-mail
app.addReporter({
   type: "sendmail",
   to: "[email protected]",
   subject: "smon probe failure"
});

Running

node .

If you have a recent node (6.2+) and your symlinked conffiles are broken, try:

node --preserve-symlinks .

Why?

I needed something trivial, easy-to-configure, easy-to-hack. smon is written in less than 9kB of JS. Also, I needed a new pet project for my start learning vim again chore.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.