0.9.23 • Published 7 years ago

host-monitor v0.9.23

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

host-monitor

Build Status npm version

node.js tool for host status monitoring

Install

$ npm install host-monitor

Usage

By default monitor will check host availability each 30 mins

Register host

monitor will start to check host constantly right after registration

    monitor.register(host, onUpFunction, onDonwFunction);

Example:

    var monitor = require("host-monitor");

    var onUp = function () {
        console.log("Host is UP");
    };
    var onDown = function () {
        console.log("Host is DOWN");
    }

    monitor.register("127.0.0.1:8080", onUp, onDown);

Config

You can override monitor's default config.

To check current available options use:

    monitor.config();

To override option use:

    monitor.config({
        defaultInterval: 5000
    })

It will force monitor to check host availability each 5 seconds


Remove

You can remove host from monitor by:

    monitor.remove(hostName);

Get

If you need some extra manipulations with monitor object you can get Instance by:

    monitor.get(hostName);

check Instance.js for additional info about Instance methods

0.9.23

7 years ago

0.9.22

7 years ago

0.9.21

7 years ago

0.9.20

7 years ago

0.9.19

7 years ago

0.9.15

7 years ago

0.9.14

7 years ago

0.9.13

7 years ago

0.9.12

7 years ago

0.9.12-0

7 years ago

0.9.11

7 years ago

0.9.10

7 years ago

0.9.10-0

7 years ago

0.9.9

7 years ago

0.9.8

7 years ago

0.9.7

7 years ago

0.9.6

7 years ago

0.9.5

7 years ago

0.9.4

7 years ago

0.9.3

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago