Skip to content

fingltd/fing-heartbeat-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

A node.js package with a usable client for Fing Heartbeat infrastructure. The package comes with a Command Line Interface that might help in the configuration.

Installation

npm install fing-heartbeat
fing-heartbeat-cli --help

Usage

  • Setup
var Heartbeat = require(“fing-heartbeat”);

var server = "hb.example.com";
var api_key = "xxxxxxxxx"; # Ask to repo owner
var mac = "00:70:07:00:70:07";
var gatewayMac = "DE:AD:C0:DE:BE:EF"
 
var checkPeriod = 10 * 60 * 1000;

var hb = new Heartbeat(server, api_key, mac, gatewayMac);

hb.start();

setInterval(function () {
  var status = hb.status();
  console.log(status);
}, checkPeriod);

  • Teardown
hb.stop();

Parameters

# Parameter Mandatory Description
1 server YES Host Name of server implementing Fing Heartbeat Protocol
2 apiKey YES Api Key (required for authentication)
3 macAddress YES MAC address of device
4 gwMacAddress YES MAC address of network gateway. If in a router, same as mac.
5 uuid NO Unique ID of the device, if available. E.g. serial number.
6 brand NO Brand name
7 model NO Model of the device
8 hwPlatform NO Hardware platform of the device

Modifications

  • v1.0.3
    • Compatibility since node v0.10
  • v1.0.2
    • Fix README w/ per-version modifications
  • v1.0.1
    • Server and ApiKey as external input
  • v1.0.0
    • Heartbeat client
    • CLI to provide examples of usages

License

(c) 2016-2019 Fing LTD, MIT license.

Author

Tommaso Latini

About

Client for Fing Internet Outage Detector System.

Resources

License

Stars

Watchers

Forks

Packages

No packages published