Fork me on GitHub
tornjak from Betfair

Overview

The monitor library provides an in-application framework for deriving application status. It does this by representing sub-components and dependencies and providing a mechanism to update the status of those via events. It provides a mechanism for aggregating these individual statuses to provide a headline status for an application.

The library provides beans for exposing this status as a webping, and also for driving LUS entry lodgement.

Usage

Spring

Spring integration requires some basic setup, plus instrumentation|Monitor Usage Spring 2.8 of your application code.

Non-Spring

If you’re not using Spring, then you will interact with the monitor framework programatically|Monitor Usage Non Spring 2.8.

Related Libraries

Aside from the core monitoring framework, there are a number of related libraries that can be used with the framework:

Internals

Monitor

The heart of the framework we have the Monitor interface, with current implementations:

Instances of MethodMonitor provide the ability to record successful and failed method invocations, optionally with an associated stack trace.

Each Monitor can be in one of three states:

Monitor Registry & Status Aggregator

The status a group of monitors can be aggregated to derive overall status, for such purposes as webping pages. Groups of Monitors are represented by a MonitorRegistry. Each MonitorRegistry may have a StatusAggregator for aggregating statuses.

Active / Passive

The framework implements an active-passive monitoring model. See Active-Passive Monitoring (Monitor 1.3)|Active-Passive Monitoring (Monitor 1.3) for more details:

Events

The framework is event-driven, meaning you can drive additional functionality off changes in monitoring state. The following events currently exist * Monitor: **** Change of status ** StatusAggregator** Change of status MonitorRegistry: **** Addition of a Monitor **** Removal of a Monitor **** Change of StatusAggregator