Hello everybody,
I'm trying to import an old nagios 3.0.6 configuration in nagios xi using the importing tools. I'm following this guide:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
After preparing all files and following this sequence: commands -> timeperiods -> contacttemplates -> contacts -> contactgroups ->
hosttemplates -> hosts -> hostgroups -> servicetemplates -> services -> servicegroups
I had some trouble with "contacttemplates". Got this error:
Duplicate entry '1' for key 'config_name'Entry name::basic-contact inside tbl_contacttemplate successfully inserted
Entry contact_name:: inside tbl_contact could not be inserted: Duplicate entry '1' for key 'config_name'
Entry contact_name:: inside tbl_contact could not be inserted: Duplicate entry '1' for key 'config_name'
1 items failed to import successfully
The file I'm trying to import is:
cat contacts-TEMPLATE.cfg
define contact{
name basic-contact
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,f,s
service_notification_options w,u,c,r,f,s
retain_status_information 0
retain_nonstatus_information 0
can_submit_commands 0
register 0
}
define contact{
use basic-contact
name email-contact
host_notification_commands host-notify-by-email
service_notification_commands service-notify-by-email
}
define contact{
use basic-contact
name sms-contact
host_notification_commands host-notify-by-sms
service_notification_commands service-notify-by-sms
}
The nagios xi I'm using is just installed and has not customization jet.
Do you have any idea?
What version of Nagios XI are you using? Nagios XI 2014R2.7
Linux Distribution and version? Red Hat Enterprise Linux Server release 6.7 (Santiago)
32 or 64bit? 64
VMware Image or Manual Install of XI? offline install with rpms
Thanks in advance
Nagios xi import from nagios core
Re: Nagios xi import from nagios core
Did you run the Config Import Prep Tool prior to importing the configs from Nagios Core?
https://assets.nagios.com/downloads/nag ... p-Tool.pdf
Did you have the "Overwrite Database" check-box selected under the "Configuration Import" page?
https://assets.nagios.com/downloads/nag ... p-Tool.pdf
Did you have the "Overwrite Database" check-box selected under the "Configuration Import" page?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios xi import from nagios core
Hi, thanks for your reply.
I already use the import tool and I had "Overwrite Database" check-box selected.
I hope you can suggest me how to proceed or how to troubleshot this problem
Regards
Armando
I already use the import tool and I had "Overwrite Database" check-box selected.
I hope you can suggest me how to proceed or how to troubleshot this problem
Regards
Armando
Re: Nagios xi import from nagios core
Import the contact template first, make sure you have "host-notify-by-email", "service-notify-by-email", "host-notify-by-sms", and "service-notify-by-sms" commands defined. Run the Write Config tool to check for config errors. If there are no errors, import the contacts but change the "name" to "contact_name":
Run the Write Config Tool to check for errors. Let me know if this helped.define contact{
use basic-contact
contact_name email-contact
host_notification_commands host-notify-by-email
service_notification_commands service-notify-by-email
}
define contact{
use basic-contact
contact_name sms-contact
host_notification_commands host-notify-by-sms
service_notification_commands service-notify-by-sms
}
Be sure to check out our Knowledgebase for helpful articles and solutions!