Configuring the discovery engine¶
Here is an example of a complete possible configuration of the /etc/centreon/centreon_autodisco.pm file:
%centreon_autodisco_config = (
internal_com_type => 'ipc',
internal_com_path => '/tmp/centreonautodisco/routing.ipc',
# Execute rules in parallel (0) or sequential (1)
sequential => 1,
timeout_wait => 60,
# Use to connect to a Centreon poller
ssh_password => '',
ssh_extra_options => {
user => 'centreon',
stricthostkeycheck => 0,
sshdir => '/var/www/.ssh/',
knownhosts => '/dev/null',
timeout => 60,
},
ssh_exec_options => {
timeout => 60,
timeout_no_data => 120,
parallel => 8, #Max.: 8
},
# Centreon CLAPI parameters
clapi_cmd => '/usr/bin/centreon',
clapi_user => 'admin',
clapi_password => 'centreon',
clapi_reload => 'POLLERRELOAD',
# Parameters to send email report if enable in rule
mail_subject => 'Centreon Auto Discovery',
mail_from => 'centreon-autodisco',
mail_command => '/bin/mail',
);
1;
Distributed architecture¶
When a host is monitored by a remote collector, the discovery will be made from it. Thus to executed distant commands it is necessary to allow the Apache process to access the centreon SSH keys user. To do this run the following commands:
# mkdir /var/www/.ssh/
# cp /var/spool/centreon/.ssh/* /var/www/.ssh/
# chown -R apache. /var/www/.ssh
# chmod 600 /var/www/.ssh/id_rsa