Actions
{{last_updated_at}} by {{last_updated_by}}
Monitoring Drupal¶
Install the Nagios Module¶
drush pm-download nagios
drush -y pm-enable nagios
drush cache-clear all
Manual (Web UI) configuration¶
Note: CLI configuration is much faster, see below.
- Go to Drupal's Configuration menu » Nagios Monitoring.
- Insert a random Unique ID.
- Check "Enable status page?"
- Under "Thresholds", set "Cron duration" to "480" (8 hours) and "Minimum report severity" to CRITICAL.
- Go to Modules menu.
- Next to "CiviCRM", check "Ignore from Nagios" and press "Save".
CLI Configuration¶
- Paste this on the command line:
drush vset nagios_cron_duration '480'
drush vset nagios_enable_nagios 1
drush vset nagios_enable_status_page 1
drush vset nagios_enable_status_page_get 0
drush vset nagios_func_cron 1
drush vset nagios_func_modules 1
drush vset nagios_func_nodes 1
drush vset nagios_func_requirements 1
drush vset nagios_func_session_anon 1
drush vset nagios_func_session_auth 1
drush vset nagios_func_themes 1
drush vset nagios_func_users 1
drush vset nagios_min_report_severity '2'
drush vset nagios_page_callback nagios_status_page
drush vset nagios_page_path nagios
drush vset nagios_show_outdated_names 1
drush vset nagios_status_critical_value '2'
drush vset nagios_status_ok_value '0'
drush vset nagios_status_unknown_value '3'
drush vset nagios_status_warning_value '1'
drush vset --format=json nagios_ignored_modules '{"civicrm":true}'
# This sets a random site key
# Ensure pwgen is installed
drush vset nagios_ua `pwgen -s 32 1`
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
line:
vars.drupal_site_id = "<unique site id here>" (unique ID from /admin/config/system/nagios)
- TODO: Indicate if SSL is required and how to indicate it.
- Test your syntax with:
service icinga2 checkconfig
. - Restart Icinga:
service icinga2 restart
Basic auth¶
If your site is behind basic auth, add this to the Icinga vhost configuration
basic_auth_user = "megaphone"
basic_auth_password = "megaphone"
Updated by Jon Goldberg over 5 years ago · 2 revisions