...
- Create configuration files emplacement for new source by copying the /etc/shinken-user/source-data/source-data-cfg-sample folder and renaming it to /etc/shinken-user/source-data/source-data-cfg-source_name.
Also rename /etc/shinken-user/source-data/source-data-cfg-source_name/definition-source-data-cfg-sample.cfg into /etc/shinken-user/source-data/source-data-cfg-source_name/definition-source-data-cfg-source_name.cfg
- Copy /etc/shinken/modules/cfg-file-shinken.cfg into another cfg file name and configure it.
- Change the module name, for example cfg-file-source_name
Remember that the module_name must be unique cfg_path must be set to /etc/shinken-user/source-data/source-data-cfg-source_name/definition-source-data-cfg-source_name.cfg
- Change the module name, for example cfg-file-source_name
- Copy /etc/shinken/sources/cfg-file-shinken.cfg into an other cfg file name and configure it:
- Change the source name, for example cfg-file-source_name
Remember that the source_name must be unique.
- modules must be set to the new module you just defined (cfg-file-source_name)
- Change the source name, for example cfg-file-source_name
- Then you must declare the source_name source in the file /etc/shinken/synchronizers/synchronizer-master.cfg.
Add the source name in the line sources
Code Block define synchronizer { ... sources syncui,cfg-file-shinken,active-dir,sync-vmware,cfg-file-nagios,discovery,cfg-file-source_name ... }
- Restart the synchronizer for it to recognize the new source
- Load your configuration files into the new source emplacement: /etc/shinken-user/source-data/source-data-cfg-source_name
Global datas
Global datas can be configured in /etc/resources.d/. This folder contains files defining global datas for various subjects (email, mysql, oracle, ...) accessible by your objects globally in Shinken.
For easier organisation and a cleaner configuration, global datas can also be configured into the sources.
The sample cfg source folder located in /etc/shinken-user/source-data contains a global-data folder in which global datas definitions can be placed (a sample file is also present in this folder).
When the source is imported, these global datas files will be copied into /etc/resources.d/source_name.
This mecanism also allows you to overload values defined in /etc/resources.d with files defined in sources.