A simple tool to monitor an Apache VCL infrastructure.
Development/testing is done against Apache-VCL version 2.3.x.
npm install vcl-utils
Here is an example for how to use it:
var health = require'vcl-utils'Health;healthon'info'console.log'INFO :: ' + msg;;healthcheckconfig: '/etc/vcl/vcld.conf'sshKey: '/etc/vcl/vcl.key';
Or, you can check only for computers with incorrect image revisions:
var health = require'vcl-utils'Health;healthon'incorrectImage'console.log'Incorrect Image :: ' + host;;healthcheckconfig: '/etc/vcl/vcld.conf'sshKey: '/etc/vcl/vcl.key';
info() - Information about each computer managed by this management node.
error() - Any errors encountered in connecting to computers.
incorrectImage() - All computers with a non-matching image.
available() - All computers in an available state.
failed() - All computers in a failed state.
inuse() - All computers currently in use.
reloading() - All computers currently reloading.
healthcheckconfig: '/path/to/vcld.conf'sshKey: '/path/to/vcl.key';
check() method will find all computers for a given management node, and
(if the computer is 'available'), it will login and check that the image
revisionid matches what is listed in the database. For any other state,
the computer will not be checked, but an event corresponding to that state
will be emitted.