This module provides a monitoring API for the Aegir Hosting System. It integrates with Aegir queue system, and runs probes against hosted sites or servers to gather interesting information (e.g. when cron was last run on a site). It is intended mostly to provide an API for more interesting modules like Aegir Reporting and Aegir Site Audit.

On it's own, its UI is very limited. It provides a couple queues (one for sites, the other for servers):

Monitor queues

It also adds a "Run probes" task, to allow probes to triggered manually:

Run probes task

Finally, the Aegir Monitoring API allows for granular scheduling of probes on an individual basis:

Site probe settings

Defining new probes

Defining new probes to gather information on Aegir entities is as simple as providing a simple probe class:

class CpuCountProbe extends HostingProbe {

  use DrushShellExecDispatcher, DrushSystemCommand, SingleResultParser;

  protected $name = 'cpu_count';

  protected $type = 'server';

  protected $enabled = TRUE;

  protected $probe = 'nproc';

  protected $label = 'CPU count';

  protected $description = 'Count of CPUs on the server';

The probe is then registered with the Monitoring API via a simple hook:

 * Implements hook_hosting_monitor_probes().
function hosting_cpu_count_hosting_monitor_probes() {
  return array('cpu_count' => 'CpuCountProbe');

Plenty of other examples can be found in modules like Aegir Reporting and Aegir Site Audit. The latter, in turn, allows probes to be defined as Site Audit checks (see: instead.

Supporting organizations: 
Development and maintenance

Project information