Scheduled job

All the active discovery rules are periodically executed through a scheduled job managed by the cron daemon. The execution’s description is available into the /etc/cron.d/centreon-auto-disco file:

#####################################
# Centreon Auto Discovery
#

30 22 * * * centreon /usr/share/centreon/www/modules/centreon-autodiscovery-server//cron/centreon_autodisco --config='/etc/centreon/conf.pm' --config-extra='/etc/centreon/centreon_autodisco.pm' --severity=error >> /var/log/centreon/centreon_auto_discovery.log 2>&1

The default configuration runs the discovery every day at 10:30 PM.

Information and errors relative to the execution will be saved into the /var/log/centreon/centreon_auto_discovery.log file.

Command line tests

You can run manually discovery using following options:

  • –filter-rule=<rule_name>: Run selected rule
  • –filter-host=<host_name>: Run all rules linked to hosttemplates used by host
  • –dry-run: Run tests without configuration change

Note

You can use both –filter-rule=<rule_name> and –filter-host=<host_name> to run a selected rule to a predifined host.

Note

–dry-run option is not linked to other two options.

Example

Run all rules:

# /usr/share/centreon/www//modules/centreon-autodiscovery-server/cron/centreon_autodisco

Test all rules:

# /usr/share/centreon/www//modules/centreon-autodiscovery-server/cron/centreon_autodisco --dry-run

Test specific rule:

# /usr/share/centreon/www//modules/centreon-autodiscovery-server/cron/centreon_autodisco --filter-rule="OS-Linux-SNMP-Network-Interfaces-Discovery" --dry-run

Test all rules linked to hosttemplates used by specific host:

# /usr/share/centreon/www//modules/centreon-autodiscovery-server/cron/centreon_autodisco --filter-host="centreon-server" --dry-run

Test specific rule on predifined host:

# /usr/share/centreon/www//modules/centreon-autodiscovery-server/cron/centreon_autodisco --filter-rule="OS-Linux-SNMP-Network-Interfaces-Discovery" --filter-host="centreon-server" --dry-run