Page 1 of 1
Error trying to import cfg files manually
Posted: Thu Apr 09, 2020 8:41 am
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.
Re: Error trying to import cfg files manually
Posted: Fri Apr 10, 2020 11:01 am
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.
Re: Error trying to import cfg files manually
Posted: Tue Apr 28, 2020 8:19 am
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.
Re: Error trying to import cfg files manually
Posted: Tue Apr 28, 2020 3:19 pm
by benjaminsmith
@gkramps Glad you were able to get this solved and thanks for sharing your solution. Much appreciated!
Benjamin
Nagios Support Team