multi-nagios

For the usage as nagios plugin:

Monitores a Drupal installation or a Drupal site and print a message and return with an exit status

Monitoring of a Drupal installation

multi_nagios could be run on the with -r /--root supplied Drupal installation to check for core updates.

If the Drupal installation is not up to date, this command prints the recommended version, the type of the update (Bug fixes or Security update), the release date and the link to the release note of the recommended version.

Exit status

MULTI_NAGIOS_OK (0) if monitored Drupal is up to date

or MULTI_NAGIOS_WARNING (1) if there is a 'Bug fixes' available

or MULTI_NAGIOS_CRITICAL(2) if there is a 'Security update' available

Monitoring of a Drupal site

Checks on the the with -l / --uri supplied site for core and module updates.

If the Drupal site is not up to date, this command will print the type of the update(Security update, update, unsupported release) including the corresponding modules and a link to overview page within drupal.

Exit status

MULTI_NAGIOS_OK (0) if monitored site is up to date

or MULTI_NAGIOS_WARNING (1) if there are updates or unsupported modules available

or MULTI_NAGIOS_CRITICAL(2) if there are security updates available

Aliases

mna

nagios

Options

--file

Path to release information file, this could be a (temp) file to avoid nrpe-socket timeouts. It is also possible to supply path via URI, like http://updates.drupal.org/release-history/drupal/6.x.

Note:
This option could only be used to check the Drupal installation.

Examples

Checking the Drupal installation for core updates

 drush -r /path/to/drupal/6.x multi-nagios
We assume that drupal-6.14 is the recommended release. (6.14 was a security update)

With an older version, eg. drupal-6.13 we get:

 DRUPAL ROOT CRITICAL: drupal-6.13 @ /path/to/drupal/6.x
 - drupal-6.14 (Security update) from 2009-09-16 21:40 available, see http://drupal.org/node/579476 for details.
with exit status 2

Or if we are running the recommended version:

 DRUPAL ROOT OK: drupal-6.14 @ /path/to/drupal/6.x is up to date.
with exit status 0.

 drush -r /path/to/drupal/6.x multi-nagios --file=/path/to/file
Same as above with a specified file.

Checking a Drupal site on core and module updates

 drush -r /path/to/drupal/6.x -l example.com multi-nagios 
Assuing we have got security updates, updates and a unsupported release of a module,

it will print the following output and exit with MULTI_NAGIOS_CRITICAL (2) because of the security update.

 DRUPAL SITE CRITICAL - example.com @ /path/to/drupal/6.x/sites/example.com: 
  SECURITY UPDATES available for image,lightbox2, Updates available for drupal,bueditor,imce, Installed version not supported: transliterations, see http://example.com/?q=admin/reports/updates for datails.

If there are no updates available, this will produce to following output:

 DRUPAL SITE OK - example.com @ /path/to/drupal/6.x/sites/example.com: Everything is up to date.

Generated on Wed Dec 29 13:43:21 2010 for drush_multi by  doxygen 1.5.8