Skip to content

aghstrategies/com.aghstrategies.civimonitor

Repository files navigation

This is a CiviCRM extension to make it possible for a Nagios monitoring system to track the functioning of a CiviCRM site.  Initially, services tracked are:
- whether CiviCRM is up-to-date
- how recently cron has run
- extensions that are out-of-date
- what the mailing backend is
- if a payment processor is set up
- if CiviCRM's system check produces any notices

After installing this extension, copy check_civicrm.php to your Nagios server, set up commands calling:
- /usr/bin/php path-to-nagios-plugins/check_civicrm.php $HOSTADDRESS$ $_HOSTHTTP$ $_HOSTCMS$ $_HOSTSITE_KEY$ $_HOSTAPI_KEY$ cron
- /usr/bin/php path-to-nagios-plugins/check_civicrm.php $HOSTADDRESS$ $_HOSTHTTP$ $_HOSTCMS$ $_HOSTSITE_KEY$ $_HOSTAPI_KEY$ version
- /usr/bin/php path-to-nagios-plugins/check_civicrm.php $HOSTADDRESS$ $_HOSTHTTP$ $_HOSTCMS$ $_HOSTSITE_KEY$ $_HOSTAPI_KEY$ paymentprocessors
- /usr/bin/php path-to-nagios-plugins/check_civicrm.php $HOSTADDRESS$ $_HOSTHTTP$ $_HOSTCMS$ $_HOSTSITE_KEY$ $_HOSTAPI_KEY$ extensions
- /usr/bin/php path-to-nagios-plugins/check_civicrm.php $HOSTADDRESS$ $_HOSTHTTP$ $_HOSTCMS$ $_HOSTSITE_KEY$ $_HOSTAPI_KEY$ mailing
- /usr/bin/php path-to-nagios-plugins/check_civicrm.php $HOSTADDRESS$ $_HOSTHTTP$ $_HOSTCMS$ $_HOSTSITE_KEY$ $_HOSTAPI_KEY$ system

and then services for the appropriate host(s) and/or hostgroup(s) that call those commands.

The contact used in the API request must have either "Administer CiviCRM" or "Access CiviMonitor" permissions.

Release Notes
-------------
1.5 - added check for system check (includes debug enabled, time inconsistency, outbound mail, file permissions, and files that shouldn't exist)
      rewrote payment processor check to provide better information (and require fewer permissions granted to the API user)
      rewrote mailing backend check to require fewer permissions granted to the API user

1.4 - added checks for mailing and payment processor
      added "access CiviMonitor" permission (thanks mlutfy!)

1.3 - fixed bugs in check_civicrm.php

1.2 - added check for out-of-date extensions

1.1 - use the version system at latest.civicrm.org rather than having to provide your own version info

1.0 - initial version