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.
Error trying to import cfg files manually
Re: Error trying to import cfg files manually
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.
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.
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 > Serviceshttps://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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Error trying to import cfg files manually
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.
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
@gkramps Glad you were able to get this solved and thanks for sharing your solution. Much appreciated!
Benjamin
Nagios Support Team
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!