Migrate config
Migrate config
Hi
We have an old installation of Nagios 3.0.6 running on Redhat 5 monitoring around 700 servers, and have recently built a new NagiosXI server on Centos 7. Rather then having to set up each server on the new NagiosXI installation is there a way to move the servers and services across ?
We have an old installation of Nagios 3.0.6 running on Redhat 5 monitoring around 700 servers, and have recently built a new NagiosXI server on Centos 7. Rather then having to set up each server on the new NagiosXI installation is there a way to move the servers and services across ?
Re: Migrate config
https://assets.nagios.com/downloads/nag ... ios-XI.pdf covers migrating from core to XI. Review it and let us know if you have any questions or run into any issues.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Migrate config
Hi
Thanks you for your reply
I have tried this but get an error when I go to apply the changes
Error: Could not find a service matching host name 'XXXX' and description '0' (config file '/usr/local/nagios/etc/serviceextinfo.cfg', starting on line 10264)
Error: Could not expand services specified in extended service info (config file '/usr/local/nagios/etc/serviceextinfo.cfg', starting on line 10264)
/usr/local/nagios/etc/serviceextinfo.cfg does not contain any data so i'm not sure where its getting line 10264 from
more /usr/local/nagios/etc/serviceextinfo.cfg
###############################################################################
#
# Serviceextinfo configuration file
#
# Created by: Nagios CCM 3.0.2
# Date: 2019-06-25 11:08:02
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
###############################################################################
#
# Serviceextinfo configuration file
#
# END OF FILE
#
###############################################################################
Any ideas ?
Thanks you for your reply
I have tried this but get an error when I go to apply the changes
Error: Could not find a service matching host name 'XXXX' and description '0' (config file '/usr/local/nagios/etc/serviceextinfo.cfg', starting on line 10264)
Error: Could not expand services specified in extended service info (config file '/usr/local/nagios/etc/serviceextinfo.cfg', starting on line 10264)
/usr/local/nagios/etc/serviceextinfo.cfg does not contain any data so i'm not sure where its getting line 10264 from
more /usr/local/nagios/etc/serviceextinfo.cfg
###############################################################################
#
# Serviceextinfo configuration file
#
# Created by: Nagios CCM 3.0.2
# Date: 2019-06-25 11:08:02
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
###############################################################################
#
# Serviceextinfo configuration file
#
# END OF FILE
#
###############################################################################
Any ideas ?
Re: Migrate config
It sounds like there's a service with a config named '0' pointing to a host that doesn't exist. Does the 'XXXX' host exist? Do you see a service with a config name '0' under Configure > Core Config Manager > Monitoring > Services ? If so, edit it to review the config and/or disable it.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Migrate config
Ok I trashed the server and started the import again. This time I'm getting a different issue error.
Apply Configuration
Backend login to the Core Config Manager failed.
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
The show errors box is empty. Having a look on google I saw to look in the /usr/local/nagiosxi/var/cmdsubsys.log log file whilst running the apply configuration is running. Below is the output from this file
tail -f /usr/local/nagiosxi/var/cmdsubsys.log
PROCESSED 2 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
..........................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
...................................................PROCESSING COMMAND ID 16...
PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
No entry for terminal type "unknown";
using dumb terminal settings.
--- reset_config_perms.sh ------------
> Setting script permissions
> Setting CCM script permissions
> Setting special script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting libexec directory permissions
> Setting Nagios XI config permissions
> Setting NOM checkpoint user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/extended_service_info_templates.cfg .. ERROR
Table for import definition 'serviceextinfo' is not available!
--------------------------------------
Importing into the CCM failed!
OUTPUT=Importing into the CCM failed!
RETURNCODE=2
PROCESSING COMMAND ID 17...
PROCESS COMMAND: CMD=1150, DATA=remove
CMDLINE=php /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php --cmd=syncall
CMD: syncall
MSG: BPI configuration applied successfully! BPI configuration applied successfully!
OUTPUT=MSG: BPI configuration applied successfully! BPI configuration applied successfully!
RETURNCODE=0
.........
Any ideas on this ?
Apply Configuration
Backend login to the Core Config Manager failed.
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
The show errors box is empty. Having a look on google I saw to look in the /usr/local/nagiosxi/var/cmdsubsys.log log file whilst running the apply configuration is running. Below is the output from this file
tail -f /usr/local/nagiosxi/var/cmdsubsys.log
PROCESSED 2 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
..........................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
...................................................PROCESSING COMMAND ID 16...
PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
No entry for terminal type "unknown";
using dumb terminal settings.
--- reset_config_perms.sh ------------
> Setting script permissions
> Setting CCM script permissions
> Setting special script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting libexec directory permissions
> Setting Nagios XI config permissions
> Setting NOM checkpoint user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/extended_service_info_templates.cfg .. ERROR
Table for import definition 'serviceextinfo' is not available!
--------------------------------------
Importing into the CCM failed!
OUTPUT=Importing into the CCM failed!
RETURNCODE=2
PROCESSING COMMAND ID 17...
PROCESS COMMAND: CMD=1150, DATA=remove
CMDLINE=php /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php --cmd=syncall
CMD: syncall
MSG: BPI configuration applied successfully! BPI configuration applied successfully!
OUTPUT=MSG: BPI configuration applied successfully! BPI configuration applied successfully!
RETURNCODE=0
.........
Any ideas on this ?
Re: Migrate config
- Importing: /usr/local/nagios/etc/import/extended_service_info_templates.cfg .. ERROR
I would skip trying to import your host/serviceextinfo as it's no longer used.
Remove this file:
Continue repeating the processes (fix, verify, fix, verify) until you have a valid config.
If you need help, go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Once they are done being written (don't do anything in between, don't apply config), run this command and send me the resulting /tmp/NAGIOSBADFILES.zip file:
Thank you
Code: Select all
Table for import definition 'serviceextinfo' is not available!Remove this file:
Code: Select all
/usr/local/nagios/etc/import/extended_service_info_templates.cfgIf you need help, go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Once they are done being written (don't do anything in between, don't apply config), run this command and send me the resulting /tmp/NAGIOSBADFILES.zip file:
Code: Select all
zip -r /tmp/NAGIOSBADFILES.zip /usr/local/nagios/etcThank you
Re: Migrate config
Hi
Thanks you for the response. The advice provided has helped to get the import done. In case anybody else has a similar issue in addition to the file you suggested that I remove, I also removed :-
Thanks for all your help.
Thanks you for the response. The advice provided has helped to get the import done. In case anybody else has a similar issue in addition to the file you suggested that I remove, I also removed :-
Code: Select all
/usr/local/nagios/etc/extended_service_info_templates.cfg-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Migrate config
Your welcome. Did you have any other questions or may we close this thread.Thanks for all your help.
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: Migrate config
There is just one more oddity I have noticed. On all the imported servers, the Linux servers now have nrpe services set up, previously we used check_by_ssh, is there any easy way of removing the nrpe checks an re-enabling the check_by_ssh ?
Thanks
Thanks
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Migrate config
Hello @razah,
Probably, the easiest way is to use the Bulk Modifications tool from the CCM to change the check command on those services. Go to Configure > CCM > Tools > Bulk Modifications Tool.
Probably, the easiest way is to use the Bulk Modifications tool from the CCM to change the check command on those services. Go to Configure > CCM > Tools > Bulk Modifications Tool.
You do not have the required permissions to view the files attached to this post.
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!