Configuration Import not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Configuration Import not working

Post by morabanc »

Hello,

Sorry for the delay....

The test works.. but not for all the files. it works with commands file and timeperiod, but it not worked with contacts file. I tried to add a test contact following the same method, but it not works... Same issue with hosts, services...
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Configuration Import not working

Post by lmiltchev »

Can you give us an example of a contacts config, that you are trying to import? You mentioned that you didn't have issues importing commands and timeperiods. What about contact templates? They need to be imported prior to contacts.
Be sure to check out our Knowledgebase for helpful articles and solutions!
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Configuration Import not working

Post by morabanc »

I just upgrade to last nagiosxi version, now I'm seeing errors I did not see before the upgrade. After to try to import the contacts file, for every contact that the file contains this error appears.

Entry contact_name::xxxxxx inside tbl_contact could not be inserted: Filed 'name' doesn't have a default value
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Configuration Import not working

Post by lmiltchev »

Can you give us an example of a contacts config, that you are trying to import? You mentioned that you didn't have issues importing commands and timeperiods. What about contact templates? They need to be imported prior to contacts.
In addition to this, run the following command and show us the output.

Code: Select all

echo 'desc tbl_contact;' | mysql -t -pnagiosxi nagiosql | grep name
Be sure to check out our Knowledgebase for helpful articles and solutions!
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Configuration Import not working

Post by morabanc »

A contact example:

define contact {
contact_name adm
alias Administrator
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,r
service_notification_options w,c,r
host_notification_commands host-notify-by-email
service_notification_commands notify-by-email
email [email protected]
}

We're using default contact template, there are not customized contact templates.

And the output of the command:

echo 'desc tbl_contact;' | mysql -t -pnagiosxi nagiosql | grep name

| contact_name | varchar(255) | NO | MUL | NULL | |
| name | varchar(255) | NO | MUL | NULL | |
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Configuration Import not working

Post by morabanc »

Problem solved! The problem was related to DB. character set text fields (char, text) was configured in latin1, normally we configure it in utf8, after to change this fields to utf8 the import worked correctly.

Thanks for the support.
Locked