New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multilevel configuration #8

usit-gd opened this Issue Oct 17, 2016 · 0 comments


None yet
2 participants
Copy link

ghost commented Oct 17, 2016

Today, we support a singlelevel configuration system with three possible locations for our configuration file:

  1. Configuration file defined with the parameter -c / --config when executing zabbix-cli
  2. $HOME/.zabbix-cli/zabbix-cli.conf
  3. /etc/zabbix-cli/zabbix-cli.conf

Zabbix-cli checks for a configuration file in these locations and in this order and will use the first one that exists. This means that you can always override: 3) with 2) or 1), and 2) with 1).

In a multilevel configuration system we will not override the entire configuration file but we will merge all the defined configuration files and will use the parameters values defined in the configuration file with higher priority if a parameter is defined in more than one file.

  1. /usr/share/zabbix-cli/zabbix-cli.fixed.conf
  2. /etc/zabbix-cli/zabbix-cli.fixed.conf
  3. Configuration file defined with the parameter -c / --config when executing zabbix-cli
  4. $HOME/.zabbix-cli/zabbix-cli.conf
  5. /etc/zabbix-cli/zabbix-cli.conf
  6. /usr/share/zabbix-cli/zabbix-cli.conf

With this implementation:

  • Local configuration will be kept during upgrades
  • The local configuration is separate from the package default
  • Several actors will be allow to have their own files
  • It is possible to provide package, host and user defaults, as well as locking down features on a host, package level.
  • Always well known where the admin made his changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment