As an intern I am tasked to migrate a Nagios 3 server on a defective ubuntu 14.04 VM to a new Nagios 4.3.2 server on a new debian stretch server.
I've finished the install of Nagios 4 and it works, but I monitor only localhost.
I'm trying the barbarian way (but safely, on a clone of the new VM) to see if there's an easier path than rewriting all (I'm entirely new at monitoring): I copied the old configuration directory in /usr/local/nagios/etc/my_old_conf and added
Code: Select all
cfg_dir=/usr/local/nagios/etc/my_old_conf
From journalctl I get that there are deprecated commands in my old configuration's files.
I found on this forum which advise to do
Code: Select all
/usr/local/nagios/bin/nagios -vvv /usr/local/nagios/etc/nagios.cfg
I found this too which advise to sed the nagios.cfg file and I did it :
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
I wasn't able to find good and easy to understand documentation on the migration I'm doing (basically, what is deprecated and by what should I replace it), are there some somewhere?