Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Professional Edition
-
None
Description
Currently all static configuration is loaded only from `config.php`.
However, we commonly have some additions to Observium instance added to config.php. These include, for example, addition of some monitoring plugins not included by Observium Professional by default:
// DNS Probe
|
$config['probes']['check_dns']['enable'] = 1; |
$config['probes']['check_dns']['descr'] = 'Tests DNS'; |
$config['probes']['check_dns']['args']['default'] = "-s %hostname%"; |
|
// NTP Probe
|
$config['probes']['check_ntp_time']['enable'] = 1; |
$config['probes']['check_ntp_time']['descr'] = 'Tests NTP'; |
$config['probes']['check_ntp_time']['args']['default'] = "-H %hostname%"; |
Instead of managing these as custom modification (appended to) config.php file, it would be cleaner to have config.d/ directory. Directory can also be named conf.d/ to conform with linux/unix convention. Contents of this directory should be excluded from version control.
Observium would read config.php first and then include all .php files from config.d/*.php. Dotfiles should be ignored and files having non-php extension.
This way Observium users could dynamically, cleanly and bit more safely add instance specific customizations (or any other static configurations) such as
config.d/config.ntp-probe.php
// NTP Probe
|
$config['probes']['check_ntp_time']['enable'] = 1; |
$config['probes']['check_ntp_time']['descr'] = 'Tests NTP'; |
$config['probes']['check_ntp_time']['args']['default'] = "-H %hostname%"; |
This feature can currently be implemented as custom "footer code" appended to config.php, but it would nice if unmodified Observium Professional provided this.
The rationale behind this suggestion is that some of this custom configuration is coming from management framework injecting configuration files to servers.
It is much easier to bind to such configuration systems with dynamic conf.d structure than modifying/detecting modifications in monolithic configuration file. The same reasoning applies to common unix daemons configured from /etc files and providing conf.d parsers.
I do however see your point. Observium config.php can already be customized with conf.d loader easily if required by the customer.