Migrating from Nagios to Shinken Enterprise is very easy. You can import your previous Nagios configuration using the cfg-file-nagios source.
Configuration
To define a nagios cfg source:
- Configure the module in the file /etc/shinken/modules/cfg-file-nagios.cfg
to define the behaviour of the module - Then configure the source in the file /etc/shinken/sources/cfg-file-nagios.cfg
to enable the source and call the module configured in step 1. - Then you must declare the VMware cfg-file-nagios source in the file /etc/shinken/synchronizers/synchronizer-master.cfg.
| Info | ||
|---|---|---|
| ||
During the Shinken Enterprise installation process, a VMware cfg-file-nagios module called synccfg-file-vmwarenagios is defined but set to inactive. |
sources/
...
cfg-file-
...
nagios.cfg
| Property | Example | Description |
|---|---|---|
source_name | synccfg-file-vmwarenagios | Name of this source. Must be unique. |
| order | 3 | Order in the merge algorithm of this source data. Look in the Synchronizer page for more information about it. |
| import_interval | 5 | Launch this source every import_inverval minutes. If you set it to 0, the module will never be launcher automatically |
| modules | synccfg-file-vmwarenagios | The module to launch |
| enabled | 0 | 1 - Activate the source 0 - Viewed in the interface, but doesn't collect data nor import objects. |
| description | This source is about loading hosts from VMware vSpherea | A description to show on the UI. |
...
modules/
...
cfg-file-
...
nagios.cfg
Here is the list of parameters required by the module to be updated the in cfg file.
| Property | Default (if not set) | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| vcenter | vcenter.fqdn.com | FQDN (Fully Qualified Domain Name) or IP Address of the vSphere server. | ||||||
| user | DOMAIN\user | User used to connect to the vSphere server. Must be a read-only account. | ||||||
| password | PASSWORD | Password for the user access. | ||||||
| esx_templates | esx | Host template to set on the detected esx or esxi hosts. | ||||||
| module_name | cfg-file-nagios | Name of this module. Must be unique. | ||||||
| cfg_path | /etc/nagios/nagios.cfg |
| vm_templates | vmware-vm | Host template to set on the detected virtual servers
|
| Info | ||
|---|---|---|
| ||
The default column shows the value used by the module if the Shinken Enterprise Administrator didn't set update it. |
Here there an example of the module definition:
| Code Block |
|---|
define module{
# Shinken module_nameEnterprise. Lines added by import core. sync-vmware
# Do module_typenot remove it, it's used by sync-vmware
Shinken Enterprise check_esx_pathto update /var/lib/shinken/libexec/synchronizer/esx_discovery.pl
vcenter myesx.ovh.com
user admin
password XYZ
esx_templates esx
vm_templates vmware-vm
} |
Automatic templates for Virtual S
Migrating from Nagios to Shinken Enterprise is very easy
...
your objects if you re-import them.
_SE_UUID XXXXXXXXXXXXXXXX
_SE_UUID_HASH XXXXXXXXXXXXXXXX
# End of Shinken Enterprise part
module_name cfg-file-nagios
module_type cfg-file-import
cfg_path /etc/nagios/nagios.cfg
} |
Having more than 1 cfg-file-nagios source defined.
When you have many source of configuration (for example 2 nagios to import in your shinken), we advise you to create 2 automatic sources.
If you keep only one source, you will have to merge the 2 nagios configurations in the same directory. You may have naming conflict...
To have an additional source:
- Copy /etc/shinken/modules/cfg-file-nagios.cfg into an other cfg
...
All you need to do is to set the following parameters:
- cfg_path /etc/nagios/nagios.cfg
Note: you must copy all your Nagios configuration into the Shinken Enterprise.
...
- file name and configure it.
- Remember that the module_name must be unique (Example: my_module_name)
- Remember that the source_name must be unique.
(Example: my_source_name)
- modules must be set to the new module you just define (my_module_name)
- Remember that the module_name must be unique (Example: my_module_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
sources syncui,cfg-file-shinken,active-dir,sync-vmware,cfg-file-nagios,discovery, my_source_name
| Code Block |
|---|
define synchronizer {
...
sources syncui,cfg-file-shinken,active-dir,sync-vmware,cfg-file-nagios,discovery,my_source_name
...
} |