00001 <?php 00002 // $Id: 00003 00004 /** 00005 * @file 00006 * Page multi-nagios 00007 * 00008 * Additional Doxygen documentation 00009 */ 00010 00011 /** 00012 * @page multi_nagios_help multi-nagios 00013 * For the usage as nagios plugin: 00014 * 00015 * Monitores a Drupal installation or a Drupal site and print a message and return with an exit status 00016 * 00017 * @section multi_nagios_root Monitoring of a Drupal installation 00018 * multi_nagios could be run on the with -r /--root supplied Drupal installation 00019 * to check for core updates. 00020 * 00021 * If the Drupal installation is not up to date, 00022 * this command prints the recommended version, 00023 * the type of the update (Bug fixes or Security update), 00024 * the release date and the link to the release note of the recommended version. 00025 * 00026 * <strong>Exit status</strong> 00027 * 00028 * MULTI_NAGIOS_OK (0) if monitored Drupal is up to date 00029 * 00030 * or MULTI_NAGIOS_WARNING (1) if there is a 'Bug fixes' available 00031 * 00032 * or MULTI_NAGIOS_CRITICAL(2) if there is a 'Security update' available 00033 * 00034 * @section multi_nagios_site Monitoring of a Drupal site 00035 * Checks on the the with -l / --uri supplied site for core and module updates. 00036 * 00037 * If the Drupal site is not up to date, 00038 * this command will print the type of the update(Security update, update, unsupported release) 00039 * including the corresponding modules 00040 * and a link to overview page within drupal. 00041 * 00042 * <strong>Exit status</strong> 00043 * 00044 * MULTI_NAGIOS_OK (0) if monitored site is up to date 00045 * 00046 * or MULTI_NAGIOS_WARNING (1) if there are updates or unsupported modules available 00047 * 00048 * or MULTI_NAGIOS_CRITICAL(2) if there are security updates available 00049 * 00050 * @section Aliases 00051 * @subsection multi_nagios_alias_mna mna 00052 * @subsection multi_nagios_alias_nagios nagios 00053 * @section Options 00054 * @subsection multi_nagios_file --file 00055 * Path to release information file, this could 00056 * be a (temp) file to avoid nrpe-socket timeouts. 00057 * It is also possible to supply path via URI, 00058 * like http://updates.drupal.org/release-history/drupal/6.x. 00059 * 00060 * @note This option could only be used to check the Drupal installation. 00061 * @section Examples 00062 * @subsection nagios_root Checking the Drupal installation for core updates 00063 * @code 00064 * drush -r /path/to/drupal/6.x multi-nagios 00065 * @endcode 00066 * We assume that drupal-6.14 is the recommended release. (6.14 was a security update) 00067 * 00068 * With an older version, eg. drupal-6.13 we get: 00069 * @code 00070 * DRUPAL ROOT CRITICAL: drupal-6.13 @ /path/to/drupal/6.x 00071 * - drupal-6.14 (Security update) from 2009-09-16 21:40 available, see http://drupal.org/node/579476 for details. 00072 * @endcode 00073 * with exit status 2 00074 * 00075 * Or if we are running the recommended version: 00076 * @code 00077 * DRUPAL ROOT OK: drupal-6.14 @ /path/to/drupal/6.x is up to date. 00078 * @endcode 00079 * with exit status 0. 00080 * 00081 * @code 00082 * drush -r /path/to/drupal/6.x multi-nagios --file=/path/to/file 00083 * @endcode 00084 * Same as above with a specified file. 00085 * 00086 * 00087 * @subsection nagios_site Checking a Drupal site on core and module updates 00088 * @code 00089 * drush -r /path/to/drupal/6.x -l example.com multi-nagios 00090 * @endcode 00091 * Assuing we have got security updates, updates and a unsupported release of a module, 00092 * 00093 * it will print the following output and exit with MULTI_NAGIOS_CRITICAL (2) because of the security update. 00094 * @code 00095 * DRUPAL SITE CRITICAL - example.com @ /path/to/drupal/6.x/sites/example.com: 00096 * 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. 00097 * @endcode 00098 * 00099 * If there are no updates available, this will produce to following output: 00100 * @code 00101 * DRUPAL SITE OK - example.com @ /path/to/drupal/6.x/sites/example.com: Everything is up to date. 00102 * @endcode 00103 */
1.5.8