Project

General

Profile

Monitoring CiviCRM » History » Version 1

Jon Goldberg, 06/09/2017 02:44 PM

1 1 Jon Goldberg
{{last_updated_at}} by {{last_updated_by}}
2
# Monitoring CiviCRM
3
4
### CiviCRM 4.6 and below
5
Install CiviMonitor:
6
7
-   Log into the website, browse to CiviCRM.
8
-   Go to **Administer menu > System Settings > Manage
9
    Extensions**.
10
    -   On Civi sites that have been updated from much older versions,
11
        this may be **Administer menu > Customize Data and
12
        Screens > Manage Extensions**.
13
-   Click on the "Add New" tab.
14
-   Click "Download" next to "CiviCRM Monitoring for Nagios".
15
-   Continue with the "All versions" directions.
16
17
### All versions
18
19
-   **NOTE**: The next two items use `drush` on Drupal. If using
20
    Wordpress, substitute `wp cv civicrm-sql-query` for
21
    `drush civicrm-sql-query`.
22
-   Determine if there's an existing administrative user with an API
23
    key:
24
25
        drush civicrm-sql-query 'SELECT display_name, api_key FROM civicrm_contact WHERE api_key IS NOT NULL;'
26
27
-   If so, grab that API key. If not, use `pwgen` or similar to generate
28
    a random string, then update CiviCRM with it:
29
30
        drush civicrm-sql-query 'UPDATE civicrm_contact SET api_key = "<api key here>" WHERE id = 2;'
31
32
-   Get the site key:
33
34
        grep SITE_KEY sites/default/civicrm.settings.php #(Drupal)
35
        grep SITE_KEY wp-content/plugins/civicrm/civicrm.settings.php #(Wordpress)
36
37
Icinga Configuration
38
--------------------
39
40
-   Log into the Icinga server: `ssh icinga`
41
-   If necessary, define the new host by making a copy of an existing
42
    host file in `/etc/icinga2/conf.d/hosts`.
43
-   Add the lines:
44
45
          vars.cms = "drupal" 
46
          vars.crm_site_key = "<site key here>"
47
          vars.crm_api_key = "<api key here>"
48
49
-   Other valid values for CMS are "wordpress" and "joomla".
50
-   TODO: Indicate if SSL is required and how to indicate it.
51
-   Test your syntax with: `service icinga2 checkconfig`.
52
-   Restart Icinga: `service icinga2 restart`