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',
local_url => 'http://127.0.0.1/centreon/',
# Do not check local certificate (1)
no_check_certificate => 0,
# Parameters to send email report if enable in rule
mail_subject => 'Centreon Auto Discovery',
mail_from => 'centreon-autodisco',
mail_command => '/bin/mail',
);
1;
Accessing Centreon web interface through HTTPS¶
If theaccess to your Centreon server is only available via the HTTPS protocol, it is necessary to configure certain parameters of the discovery engine.
The parameters to be modified in the /etc/centreon/centreon_autodisco.pm file are:
local_url => 'https://@IP_CENTREON_SERVER/centreon/',
# Do not check local certificate (1)
no_check_certificate => 0,
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