Page 2 of 2

Re: Configuration Import not working

Posted: Mon Dec 29, 2014 11:55 am
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...

Re: Configuration Import not working

Posted: Mon Dec 29, 2014 12:39 pm
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.

Re: Configuration Import not working

Posted: Mon Dec 29, 2014 12:56 pm
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

Re: Configuration Import not working

Posted: Mon Dec 29, 2014 2:45 pm
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

Re: Configuration Import not working

Posted: Tue Dec 30, 2014 2:43 am
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 | |

Re: Configuration Import not working

Posted: Tue Dec 30, 2014 5:08 am
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.