Page 1 of 2
Configuration Error vSphere wizard
Posted: Wed Jun 12, 2024 6:21 pm
by VictorB
Dear all
Today I was trying to add vCenter to Nagios XI using the vSphere beta wizard. When running it, I have no problems configuring its parameters, however, in the last step it throws the following error:
"Configuration Error
An error occurred while attempting to apply your configuration to the monitoring engine. Contact your Nagios administrator if this problem persists."
Any idea what could be causing this?
Re: Configuration Error vSphere wizard
Posted: Thu Jun 13, 2024 9:05 am
by gwesterman
Hi @VictorB,
Could you "View the latest configuration snapshots" (if you are no longer on this page, you can go to CCM -> Snapshots)? Then find the configuration that failed, and select "View Command Output" (the angled brackets). Please send what it says.
Thank you!
Re: Configuration Error vSphere wizard
Posted: Thu Jun 13, 2024 11:30 am
by VictorB
Thank you for your response, I am testing a demo to present Nagios XI to the management, and I encountered this issue when trying to add the vcenter. Following your instructions, I got the following report:
"
Nagios Core 4.4.13
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2023-06-01
License: GPL
Website:
https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Command name of command line is NULL
Error: Could not register command (config file '/usr/local/nagios/etc/commands.cfg', starting on line 306)
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 definitions. 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.
"
I also searched for the mentioned command line and found the following:
define command {
command_name check_vsphere_datastore_xi
}
Where do I find that command?
Re: Configuration Error vSphere wizard
Posted: Thu Jun 13, 2024 11:53 am
by sgardil
VictorB wrote: ↑Thu Jun 13, 2024 11:30 am
Thank you for your response, I am testing a demo to present Nagios XI to the management, and I encountered this issue when trying to add the vcenter. Following your instructions, I got the following report:
"
Nagios Core 4.4.13
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2023-06-01
License: GPL
Website:
https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Command name of command line is NULL
Error: Could not register command (config file '/usr/local/nagios/etc/commands.cfg', starting on line 306)
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 definitions. 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.
"
Hey
@VictorB
When you try to run other wizards do they also fail? Also could you check your /usr/local/nagios/etc/commands.cfg file and see if you have the check_vsphere_* commands in there. There should be 3, one for hosts, one for guests and one for datastores.
Re: Configuration Error vSphere wizard
Posted: Thu Jun 13, 2024 2:47 pm
by VictorB
I hadn’t noticed, the error also occurs when using other wizards, even when trying to create a host group. It seems to be related to the Nagios configuration files. But I don’t know where to start looking, what would you do in my place?
eading configuration data...
Read main config file okay...
Error: Command name of command line is NULL
Error: Could not register command (config file '/usr/local/nagios/etc/commands.cfg', starting on line 306)
Error processing object config files!
306 define command {
307 command_name check_vsphere_datastore_xi
308 }
define command {
command_name check_vsphere_host_xi
}
I did not find the check_vsphere_guest command yet.
Re: Configuration Error vSphere wizard
Posted: Thu Jun 13, 2024 6:09 pm
by VictorB
To solve this last error I used a snapshot, however I still have the error to enter the vcenter, I copy the error below for you:
Error: Service check command 'check_vsphere_host_xi!/usr/local/nagiosxi/etc/components/vsphere/10_216_45_6_auth.txt!CPU! -w 80 -c 90' specified in service 'CPU Usage for vSphere Host' for host '10.216.45.6' not defined anywhere!
Warning: Service 'CPU Usage for vSphere Host' on host '10.216.45.6' has no default contacts or contactgroups defined!
Error: Service check command 'check_vsphere_datastore_xi!/usr/local/nagiosxi/etc/components/vsphere/10_216_45_6_auth.txt!ESC3-ESC3-M-PROD-01!' specified in service 'Datastore ESC3-ESC3-M-PROD-01 for vSphere Host' for host '10.216.45.6' not defined anywhere!
Warning: Service 'Datastore ESC3-ESC3-M-PROD-01 for vSphere Host' on host '10.216.45.6' has no default contacts or contactgroups defined!
Error: Service check command 'check_vsphere_datastore_xi!/usr/local/nagiosxi/etc/components/vsphere/10_216_45_6_auth.txt!ESC3-ESC3-M-PROD-02!' specified in service 'Datastore ESC3-ESC3-M-PROD-02 for vSphere Host' for host '10.216.45.6' not defined anywhere!
Warning: Service 'Datastore ESC3-ESC3-M-PROD-02 for vSphere Host' on host '10.216.45.6' has no default contacts or contactgroups defined!
Error: Service check command 'check_vsphere_datastore_xi!/usr/local/nagiosxi/etc/components/vsphere/10_216_45_6_auth.txt!ESC3-ESC3-M-PROD-03!' specified in service 'Datastore ESC3-ESC3-M-PROD-03 for vSphere Host' for host '10.216.45.6' not defined anywhere!
Warning: Service 'Datastore ESC3-ESC3-M-PROD-03 for vSphere Host' on host '10.216.45.6' has no default contacts or contactgroups defined!
Error: Service check command 'check_vsphere_host_xi!/usr/local/nagiosxi/etc/components/vsphere/10_216_45_6_auth.txt!VMFS! -w 80 -c 90' specified in service 'Datastore usage for vSphere Host' for host '10.216.45.6' not defined anywhere!
Warning: Service 'Datastore usage for vSphere Host' on host '10.216.45.6' has no default contacts or contactgroups defined!
Error: Service check command 'check_vsphere_host_xi!/usr/local/nagiosxi/etc/components/vsphere/10_216_45_6_auth.txt!IO! -w 50 -c 80' specified in service 'Input / Output for vSphere Host' for host '10.216.45.6' not defined anywhere!
Warning: Service 'Input / Output for vSphere Host' on host '10.216.45.6' has no default contacts or contactgroups defined!
Error: Service check command 'check_vsphere_host_xi!/usr/local/nagiosxi/etc/components/vsphere/10_216_45_6_auth.txt!MEM! -w 80 -c 90' specified in service 'Memory for vSphere Host' for host '10.216.45.6' not defined anywhere!
Warning: Service 'Memory for vSphere Host' on host '10.216.45.6' has no default contacts or contactgroups defined!
Error: Service check command 'check_vsphere_host_xi!/usr/local/nagiosxi/etc/components/vsphere/10_216_45_6_auth.txt!NET! -w 50 -c 80' specified in service 'Networking for vSphere Host' for host '10.216.45.6' not defined anywhere!
Warning: Service 'Networking for vSphere Host' on host '10.216.45.6' has no default contacts or contactgroups defined!
Error: Service check command 'check_vsphere_host_xi!/usr/local/nagiosxi/etc/components/vsphere/10_216_45_6_auth.txt!SERVICE!' specified in service 'Services for vSphere Host' for host '10.216.45.6' not defined anywhere!
Warning: Service 'Services for vSphere Host' on host '10.216.45.6' has no default contacts or contactgroups defined!
Error: Service check command 'check_vsphere_host_xi!/usr/local/nagiosxi/etc/components/vsphere/10_216_45_6_auth.txt!RUNTIME!' specified in service 'VM Status for vSphere Host' for host '10.216.45.6' not defined anywhere!
Re: Configuration Error vSphere wizard
Posted: Fri Jun 14, 2024 10:11 am
by jsimon
Victor,
If your core config breaks due to the vsphere wizard not working properly, that will cause what you saw with all your other wizards failing as well. Restoring a snapshot should fix this as you saw, so keep that in mind in case you end up with a broken core config again while troubleshooting this.
Are the commands you posted redacted at all? If not, it looks to me like you have two commands with names defined but no command_line argument, so they aren't fully set up to work.
I've posted what I have on a local XI instance for my vsphere command definitions. Take a look at these and try updating your own commands to include the command_line arguments. You'll want to do this by going into your XI interface. Go to the Core Config Manager->Commands and search for the commands you're looking to update. Click edit and enter the command line arguments that correspond from below. Make sure to click "Apply Configuration" when you're done, at the bottom of the Commands table.
Code: Select all
#########################################
## TEMPLATES
#########################################
define host {
name xiwizard_vsphere_host
use xiwizard_generic_host
check_command check_xi_host_ping!3000.0!80%!5000.0!100%
register 0
}
define host {
name xiwizard_vsphere_guest
use xiwizard_generic_host
check_command check_xi_host_ping!3000.0!80%!5000.0!100%
register 0
}
#########################################
## COMMANDS
#########################################
define command {
command_name check_vsphere_host_xi
command_line python3 $USER1$/check_vsphere_xi.py -H "$HOSTADDRESS$" -f "$ARG1$" -l "$ARG2$" "$ARG3$" "$ARG4$" "$ARG5$" "$ARG6$" "$ARG7$" "$ARG8$"
}
define command {
command_name check_vsphere_guest_xi
command_line python3 $USER1$/check_vsphere_xi.py -H "$HOSTADDRESS$" -f "$ARG1$" -N "$ARG2$" -l "$ARG3$" "$ARG4$" "$ARG5$" "$ARG6$" "$ARG7$" "$ARG8$"
}
define command {
command_name check_vsphere_datastore_xi
command_line python3 $USER1$/check_vsphere_xi.py -H "$HOSTADDRESS$" -f "$ARG1$" -l vmfs -s "$ARG2$" "$ARG3$" "$ARG4$" "$ARG5$" "$ARG6$" "$ARG7$" "$ARG8$"
}
Hopefully this resolves your issue, or is a step in the right direction. Let us know how this goes, or if you have any questions.
Re: Configuration Error vSphere wizard
Posted: Fri Jun 14, 2024 11:34 am
by bbahn
@VictorB,
I agree with jsimon. The issue seems to be that your check commands for the wizard are not properly defined. Have you modified/removed them? They should have been installed alongside the wizard and should be defined as jsimon posted.
Have you removed/edited your Nagios Core templates? It seems your wizard isn't applying the default contacts correctly, though this could just be a result of the above issue.
Re: Configuration Error vSphere wizard
Posted: Wed Jul 03, 2024 4:50 am
by Mikasa23
You can check the Nagios XI logs for detailed error messages, typically found in `/usr/local/nagios/var/nagios.log` and `/var/log/messages`. Then,
Slope Game verify the accuracy of the configuration parameters entered in the vSphere Monitoring Wizard, such as IP addresses and credentials.
Re: Configuration Error vSphere wizard
Posted: Wed May 28, 2025 2:05 am
by willie34
That error in Nagios XI when using the vSphere Beta Wizard often points to a misconfiguration in the object definitions that Nagios
Pokemon Gamma Emerald is trying to apply.