0.9.23 • Published 8 years ago

host-monitor v0.9.23

Weekly downloads
1
License
MIT
Repository
github
Last release
8 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

8 years ago

0.9.22

8 years ago

0.9.21

8 years ago

0.9.20

8 years ago

0.9.19

8 years ago

0.9.15

8 years ago

0.9.14

8 years ago

0.9.13

8 years ago

0.9.12

8 years ago

0.9.12-0

8 years ago

0.9.11

8 years ago

0.9.10

8 years ago

0.9.10-0

8 years ago

0.9.9

8 years ago

0.9.8

8 years ago

0.9.7

8 years ago

0.9.6

8 years ago

0.9.5

8 years ago

0.9.4

8 years ago

0.9.3

8 years ago

0.9.2

8 years ago

0.9.1

8 years ago

0.9.0

8 years ago