Auto discovery does not set the check commands

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Auto discovery does not set the check commands

Post by lmiltchev »

Are you sure you didn't have any config errors to start with?

Run the Write Config Tool to verify configuration. Once you verify you don't have any config errors, delete the old scan jobs in the Auto-Discovery, and run a new scan.

Note: You can run it against one IP for faster results.

Select "ALL" or "Common" and proceed with the rest of the steps. See if config will fail again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
cloudcom
Posts: 67
Joined: Tue Jul 02, 2013 1:41 am

Re: Auto discovery does not set the check commands

Post by cloudcom »

I am sure that There is no config error before starting the wizard.

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.0.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 04-11-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 8 services.
Checked 1 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 2 contacts.
Checked 2 contact groups.
Checked 115 commands.
Checked 8 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 1 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 8 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check


After running auto discovery

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.0.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 04-11-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/static/check_mk_templates.cfg', starting at line 88)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/static/check_mk_templates.cfg', starting at line 157)
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/services/10.10.96.1.cfg', starting on line 14)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

# cat 10.10.96.1.cfg
###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2014-06-02 23:29:13
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define service {
host_name 10.10.96.1
service_description HTTPS
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard autodiscovery
register 1
}

define service {
host_name 10.10.96.1
service_description Ping
use xiwizard_genericnetdevice_ping_service
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard autodiscovery
register 1
}

define service {
host_name 10.10.96.1
service_description TCP Port 541 - uucp-rlogin
use xiwizard_tcp_service
check_command check_xi_service_tcp!-p 541
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard autodiscovery
register 1
}

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################

as you see, https service has no "use blaa blaa service" so it gives error
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Auto discovery does not set the check commands

Post by lmiltchev »

I sent you PM. Let me know if your issue has been resolved. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
cloudcom
Posts: 67
Joined: Tue Jul 02, 2013 1:41 am

Re: Auto discovery does not set the check commands

Post by cloudcom »

Thank you lmiltchev,

it worked. :D
Auto discovery is able to set all check commands now.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Auto discovery does not set the check commands

Post by tmcdonald »

Great! I can confirm this works on my end too, on a fresh install of XI 2014 R1.0 with the wizard updated.

Safe to close this thread now?
Former Nagios employee
cloudcom
Posts: 67
Joined: Tue Jul 02, 2013 1:41 am

Re: Auto discovery does not set the check commands

Post by cloudcom »

Yes. lmiltchev has sent me the auto discovery wizard by PM.

After installing it, the problem has gone.

You can close this topic.

thanks.
Locked