Details
-
Improvement
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
Description
This patch introduces configurable filebased logging to Observium using a template to describe the notification.
Configuration is done in the local configuration.
Default configuration is extended with 3 options:
// File log backend settings
$config['filelog']['enable'] = FALSE; // Enable/Disable filelog globally
$config['filelog']['log_dir'] = $config['install_dir'] . '/logs'; // Log dir. No trailing /
$config['filelog']['log_name'] = 'alerts.log'; // Log name.
The code has been formatted according to the syntax described on the Observium wiki.
In order to make this work the alerter needs a described contact_method.
Insert a contact_method = filelog in the alert_contacts table, and create your mappings by inserting the desired records into alert_contact_assoc.
These mappings are based on the alert_tests id’s.