migration tools for Nagios Core
migration tools for Nagios Core
I have a task here we have a very old Nagios Core 3.2.3
we want to migrate to the latest Nagios core 4.x or even 5
on a virtual Unix (redhat or Ubuntu)
This is going to be a new installation
Is there any Migration tool to migrate all the files from the old to the new without any hiccup
we want to migrate to the latest Nagios core 4.x or even 5
on a virtual Unix (redhat or Ubuntu)
This is going to be a new installation
Is there any Migration tool to migrate all the files from the old to the new without any hiccup
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: migration tools for Nagios Core
The newest version is 4.3.4
For the most part everything should work with the same configuration files, except a few items need to be modified in your nagios.cfg which can be done with the following
make a backup of your existing nagios.cfg
run the following to comment out depreciated directives
For the most part everything should work with the same configuration files, except a few items need to be modified in your nagios.cfg which can be done with the following
make a backup of your existing nagios.cfg
Code: Select all
cd /usr/local/nagios/etc/
cp nagios.cfg nagios.cfg~pre-upgrade
Code: Select all
sed -i --regexp-extended -e "s/^(\s*check_result_buffer_slots\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g" \
-e 's/^(\s*use_embedded_perl_implicitly\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*sleep_time\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*p1_file\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*external_command_buffer_slots\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*enable_embedded_perl\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*command_check_interval\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \ nagios.cfg
Re: migration tools for Nagios Core
I am migrating to a new server and performing a new install
Does this mean I have to configure everything all over again
Does this mean I have to configure everything all over again
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: migration tools for Nagios Core
No, you can use the same configuration files you had before, except you will need to run the above on the nagios.cfg because there are a few directives that are deprecated.DOkuwa wrote:I am migrating to a new server and performing a new install
Does this mean I have to configure everything all over again
Re: migration tools for Nagios Core
Thanks
But this means that we have to copy across all the .cfg from the /usr/local/Nagios/etc(old server)to the new server
But this means that we have to copy across all the .cfg from the /usr/local/Nagios/etc(old server)to the new server
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: migration tools for Nagios Core
That's correct. I would suggest using a tool like Filezilla to help facilitate this.
Re: migration tools for Nagios Core
What is the purpose of this
sed -i --regexp-extended -e "s/^(\s*check_result_buffer_slots\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g" \
-e 's/^(\s*use_embedded_perl_implicitly\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*sleep_time\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*p1_file\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*external_command_buffer_slots\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*enable_embedded_perl\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*command_check_interval\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \ nagios.cfg
sed -i --regexp-extended -e "s/^(\s*check_result_buffer_slots\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g" \
-e 's/^(\s*use_embedded_perl_implicitly\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*sleep_time\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*p1_file\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*external_command_buffer_slots\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*enable_embedded_perl\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*command_check_interval\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \ nagios.cfg
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: migration tools for Nagios Core
This just comments all the commands from your nagios.cfg that are deprecated in in Nagios 4
Re: migration tools for Nagios Core
@scottwilkerson
just looking at the Nagios.cfg
does this mean that I run each command on each line e.g
sed -i --regexp-extended -e "s/^(\s*check_result_buffer_slots\s*=\s*)/ nagios.cfg
please tell me
just looking at the Nagios.cfg
does this mean that I run each command on each line e.g
sed -i --regexp-extended -e "s/^(\s*check_result_buffer_slots\s*=\s*)/ nagios.cfg
please tell me
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: migration tools for Nagios Core
This is one command that you can copy and paste into a terminal
The only caveat is that you should be in the directory that contains your nagios.cfg
Code: Select all
sed -i --regexp-extended -e "s/^(\s*check_result_buffer_slots\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g" \
-e 's/^(\s*use_embedded_perl_implicitly\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*sleep_time\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*p1_file\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*external_command_buffer_slots\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*enable_embedded_perl\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
-e 's/^(\s*command_check_interval\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \ nagios.cfg