Administration
Update
- To update the module, run the following command:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
dnf update -y centreon-auto-discovery-server
dnf update -y centreon-auto-discovery-server
apt update && apt update centreon-auto-discovery-server
-
Connect to the Centreon web interface using an account allowed to install products and go to the Administration > Extensions > Manager page.
-
Make sure the License Manager and Monitoring Connector Manager modules are up to date before updating the Auto Discovery module.
-
Click the update icon corresponding to the Auto Discovery module:
The module is now updated:
Uninstallation
Uninstalling the module will also remove all the associated data. Data won't be restorable unless a database backup has been made.
-
Connect to the Centreon web interface using an account allowed to install products and go to the Administration > Extensions > Manager page.
-
Click the delete icon corresponding to the Auto Discovery module:
-
A confirmation popup will appear. Confirm the action:
The module is now uninstalled:
Gorgone module configuration
The Auto Discovery module brings a specific configuration for the Gorgone
service on the Central server. The default configuration is
/etc/centreon-gorgone/config.d/41-autodiscovery.yaml
.
A maximum duration for host discovery jobs is set globally. If it is necessary to change it (large subnet SNMP discovery, for example), edit the configuration and add the global_timeout directive.
If mail notifications are enabled in service discovery rules, mail parameters can be defined to choose the sender, subject or mail command.
Example configuration:
gorgone:
modules:
- name: autodiscovery
package: "gorgone::modules::centreon::autodiscovery::hooks"
enable: true
# Host Discovery
check_interval: 15
global_timeout: 300
# Service Discovery
mail_subject: Centreon Auto Discovery
mail_from: centreon-autodisco
mail_command: /bin/mail
Be sure to restart the Gorgone service after any configuration modification:
systemctl restart gorgoned
Distributed architecture
The host and service discoveries both rely on Gorgone to perform discoveries on both Central and Remote Servers or Pollers.
It is necessary to have a ZMQ communication between the Central server and a Remote Server to perform a discovery on a Poller attached to this Remote Server.
Look at the section presenting the different communication types to know more.
Service Discovery scheduled job
All the active discovery rules are periodically executed through a scheduled job
managed by Gorgone's cron module. The Auto Discovery module brings a cron
definition in the following file:
/etc/centreon-gorgone/config.d/cron.d/41-service-discovery.yaml
.
- id: service_discovery
timespec: "30 22 * * *"
action: LAUNCHSERVICEDISCOVERY
The default configuration runs the discovery every day at 10:30 PM.
If you have changed the legacy crond configuration file to adapt the schedule, you must apply changes to the new configuration file.
It is also possible to run multiple service discoveries with different parameters:
- id: service_discovery_poller_1
timespec: "15 9 * * *"
action: LAUNCHSERVICEDISCOVERY
parameters:
filter_pollers:
- Poller-1
- id: service_discovery_poller_2_linux
timespec: "30 9 * * *"
action: LAUNCHSERVICEDISCOVERY
parameters:
filter_pollers:
- Poller-2
filter_rules:
- OS-Linux-SNMP-Disk-Name
- OS-Linux-SNMP-Traffic-Name
- id: service_discovery_poller_2_windows
timespec: "45 9 * * *"
action: LAUNCHSERVICEDISCOVERY
parameters:
filter_pollers:
- Poller-2
filter_rules:
- OS-Windows-SNMP-Disk-Name
- OS-Windows-SNMP-Traffic-Name
Here is the list of all available parameters:
Key | Value |
---|---|
filter_rules | Array of rules to use for discovery (empty means all) |
force_rule | Run disabled rules ('0': not forced, '1': forced) |
filter_hosts | Array of hosts which will run the discovery (empty means all) |
filter_pollers | Array of pollers for which linked hosts will undergo discovery (empty means all) |
dry_run | Run discovery without configuration changes ('0': changes, '1': dry run) |
no_generate_config | No configuration generation (even if there are some changes) ('0': generation, '1': no generation) |
API accesses
When installing Gorgone, a default configuration to access the Centreon APIs is
located at /etc/centreon-gorgone/config.d/31-centreon-api.yaml
.
It defines accesses to both Centreon CLAPI and RestAPI to allow discovery to communicate with Centreon.
Example configuration:
gorgone:
tpapi:
- name: centreonv2
base_url: "http://127.0.0.1/centreon/api/latest/"
username: api
password: bpltc4aY
- name: clapi
username: cli
password: PYNM5kcc
Access to RestAPI, represented by centreonv2, requires credentials of a user with Reach API Configuration access. It is used for Host Discovery.
Access to CLAPI requires the credentials of an Admin user. It is used for Service Discovery.
One user can be used for both accesses. Furthermore, users don't need access to the Centreon UI.