Project

General

Profile

Actions

Monitoring CiviCRM » History » Revision 3

« Previous | Revision 3/7 (diff) | Next »
Jon Goldberg, 12/18/2017 10:14 PM


{{last_updated_at}} by {{last_updated_by}}

Monitoring CiviCRM

CiviCRM 4.6 and below

Install CiviMonitor:

  • Log into the website, browse to CiviCRM.
  • Go to Administer menu > System Settings > Manage Extensions.
    • On Civi sites that have been updated from much older versions, this may be Administer menu > Customize Data and Screens > Manage Extensions.
  • Click on the "Add New" tab.
  • Click "Download" next to "CiviCRM Monitoring for Nagios".
  • Continue with the "All versions" directions.

All versions

  • NOTE: The next two items use drush on Drupal. If using Wordpress, substitute wp cv civicrm-sql-query for drush civicrm-sql-query.
  • Determine if there's an existing administrative user with an API
drush civicrm-sql-query 'SELECT display_name, api_key FROM civicrm_contact WHERE api_key IS NOT NULL;'
  • If so, grab that API key. If not, use pwgen or similar to generate a random string, then update CiviCRM with it:
drush civicrm-sql-query 'UPDATE civicrm_contact SET api_key = "<api key here>" WHERE id = 2;'
  • Get the site key:
grep SITE_KEY sites/default/civicrm.settings.php #(Drupal)
grep SITE_KEY wp-content/plugins/civicrm/civicrm.settings.php #(Wordpress)

Icinga Configuration

  • Log into the Icinga server: ssh icinga
  • If necessary, define the new host by making a copy of an existing host file in /etc/icinga2/conf.d/hosts.
  • Add the lines:
cms = "drupal" 
crm_site_key = "<site key here>"
crm_api_key = "<api key here>"
  • Other valid values for CMS are "wordpress" and "joomla".
  • TODO: Indicate if SSL is required and how to indicate it.
  • Test your syntax with: service icinga2 checkconfig.
  • Restart Icinga: service icinga2 restart

Updated by Jon Goldberg almost 7 years ago · 3 revisions