Error trying to import cfg files manually

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
gkramps
Posts: 11
Joined: Tue Apr 17, 2018 9:47 am

Error trying to import cfg files manually

Post by gkramps »

I'm trying to import some config files from "Import Config Files" screen in Nagios XI and I get the following error:

Field 'name' doesn't have a default value

This was for hosts, but I get a similar error when I try to import the contactgroups.

I am using NagiosXI 5.6.10.
The Nagios Core is Nagios Core 4.4.5

Importing contacts works fine.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Error trying to import cfg files manually

Post by jbrunkow »

Thankyou for providing the version number and specific error message.

Did you import the configuration in the following order? It is fairly important that you do.

Code: Select all

Commands > Time Periods > Contact Templates > Contacts > Contact Groups > Host Templates > Hosts > Host Groups > Service Templates > Services >Services Groups > Services
It may also help to run the Nagios XI Config Import Prep Tool. Refer to the following liked documentation for information on how to use this.
https://assets.nagios.com/downloads/nag ... p_Tool.pdf

Please try those things and let me know if you are still having trouble.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
gkramps
Posts: 11
Joined: Tue Apr 17, 2018 9:47 am

Re: Error trying to import cfg files manually

Post by gkramps »

I'm sorry for a late response. I was finally able to get it to work. I did import them in the correct order, but it didn't seem to help. I followed some instructions in other posts I found. I ultimately made these changes and reset the database and reimported everything. I don't know if Puppet automatically updated the database/Nagios on our test system or not.

Here is some information I used from another post I found:

The issue is the STRICT_TRANS_TABLES setting in the my.cnf file. It has to be removed so that Nagios can update the MYSQL tables.
Edit the my.cnf file on the remote server and change this line from

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

to
sql_mode=NO_ENGINE_SUBSTITUTION

Save the file and restart MYSQL by running
service mysqld restart


I looked in the my.cnf on the database servers and didn’t see that setting, but I found this query that would tell me what it is set to:
SELECT @@SQL_MODE, @@GLOBAL.SQL_MODE;

This issue can be closed.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Error trying to import cfg files manually

Post by benjaminsmith »

@gkramps Glad you were able to get this solved and thanks for sharing your solution. Much appreciated!

Benjamin
Nagios Support Team
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked