mc_icinga / icinga functions¶
The first level of subdictionaries is for distinguish configuration files. There is one subdictionary per configuration file. The key used for subdictionary correspond to the name of the file but the ”.” is replaced with a “_”
The subdictionary “modules” contains a subsubdictionary for each module. In each module subdictionary, there is a subdictionary per file. The key “enabled” in each module dictionary is for enabling or disabling the module.
The “nginx” and “uwsgi” sub-dictionaries are given to macros in **kwargs parameter.
The key “package” is for listing packages installed between pre-install and post-install hooks
The keys “has_pgsql” and “has_mysql” determine if a local postgresql or mysql instance must be installed. The default value is computed from default database parameters If the connection is made through a unix pipe or with the localhost hostname, the booleans are set to True.
Function to remove global variables # TODO: find how to call this function
edit_configuration_object_settings(filen, attr, value, auto_host, definition, **kwargs)¶
Settings for edit_configuration_object macro
get_settings_for_object(target=None, obj=None, attr=None)¶
expand the subdictionaries which are not cached in mc_icinga.settings.objects
icinga objects settings
this dictionary is the subdictionary of icinga.settings.objects but because of it is too big, we can’t put it in the cache
- dictionary to configure objects
- directory in which objects will be stored. All the files in this directory are removed when salt is executed
- dictionary to store objects configuration like commands, contacts, timeperiods, ... each subdictionary is given to configuration_add_object macro as **kwargs parameter
- list of files which will be deleted. It is used to delete a host or specific service the file paths are given relative to directory specified above (in the “directory” key) each element in the list is given to configuration_remove_object macro as **kwargs parameter
- dictionary to store hosts auto configurations ; each subdictionary is given to configuration_add_auto_host macro as **kwargs parameter
remove_configuration_object(filen=None, get=False, **kwargs)¶
Add the file in the file’s list to be removed