3
Upgrading Nagios Core 4. "How to Upgrade Nagios Core 4." See Also https://assets.nagios.com/downloads/nagioscore /docs/nagioscore/4/en/upgrading.html Up To: Contents See Also: Quickstart Installation Guide Contents Upgrading from previous Nagios 3 or 4 releases Upgrading from Nagios 2.x Upgrading from packages to a source code installation Upgrading a packaged installation Upgrading From Previous Nagios 3 or 4 Releases As newer alpha, beta, and stable releases of Nagios are released, you should strongly consider upgrading as soon as possible. Newer Nagios Core 4 and other releases usually contain critical bug fixes, so its important to stay up to date. Assuming you've already installed Nagios from source code as described in the quickstart guide, you can install newer versions of Nagios easily. You don't even need root access to do it, as everything that needed to be done as root was done during the initial install. Here's the process for upgrading Nagios Core 4: Make sure you have a good backup of your existing Nagios installation and configuration files. If anything goes wrong or doesn't work, this will allow you to rollback to your old version. Become the nagios user. Debian/Ubuntu users should use sudo -s nagios. su -l nagios Removed the following old HTML files that were used by the web frontend. They have been replaced by PHP equivalents. rm /usr/local/nagios/share/{main,side,index}.html Download the source code tarball of the latest version of Nagios (visit https://www.nagios.org/download/ for the link to the latest version). wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-x.y.z.tar.gz Extract the Nagios source code tarball.

Upgrading Nagios Core 4. "How to Upgrade Nagios Core 4."

Embed Size (px)

DESCRIPTION

Upgrading From Previous Nagios 3 or 4 ReleasesAs newer alpha, beta, and stable releases of Nagios are released, you should strongly consider upgrading as soon as possible. Newer Nagios Core 4 and other releases usually contain critical bug fixes, so its important to stay up to date. Assuming you've already installed Nagios from source code as described in the quickstart guide, you can install newer versions of Nagios easily. You don't even need root access to do it, as everything that needed to be done as root was done during the initial install.Here's the process for upgrading Nagios Core 4:Make sure you have a good backup of your existing Nagios installation and configuration files. If anything goes wrong or doesn't work, this will allow you to rollback to your old version.https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/upgrading.html

Citation preview

Upgrading Nagios Core 4."How to Upgrade Nagios Core 4." See Also https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/upgrading.html Up To: Contents See Also: Quickstart Installation Guide Contents Upgrading from previous Nagios 3 or 4 releases Upgrading from Nagios 2.x Upgrading from packages to a source code installation Upgrading a packaged installation Upgrading From Previous Nagios 3 or 4 Releases As newer alpha, beta, and stable releases of Nagios are released, you should strongly consider upgrading as soon as possible. Newer Nagios Core 4 and other releases usually contain critical bug fixes, so its important to stay up to date. Assuming you've already installed Nagios from source code as described in the quickstart guide, you can install newer versions of Nagios easily. You don't even need root access to do it, as everything that needed to be done as root was done during the initial install. Here's the process for upgrading Nagios Core 4: Make sure you have a good backup of your existing Nagios installation and configuration files. If anything goes wrong or doesn't work, this will allow you to rollback to your old version. Become the nagios user. Debian/Ubuntu users should use sudo -s nagios. su -l nagios Removed the following old HTML files that were used by the web frontend. They have been replaced by PHP equivalents. rm /usr/local/nagios/share/{main,side,index}.html Download the source code tarball of the latest version of Nagios (visit https://www.nagios.org/download/ for the link to the latest version). wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-x.y.z.tar.gz Extract the Nagios source code tarball. tar xzf nagios-x.y.z.tar.gz cd nagios Run the Nagios configure script, passing the name of the group used to control external command file permissions like so: ./configure --with-command-group=nagcmd Compile the Nagios source code. make all Install updated binaries, documentation, and web web interface. Your existing configuration files will not be overwritten by this step. make install Verify your configuration files. Correct any errors shown here before proceeding with the next step. /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Restart Nagios. Debian/Ubuntu users should use /etc/init.d/nagios restart. /sbin/service nagios restart That's it - you're done! Upgrading From Nagios 2.x It shouldn't be too difficult to upgrade from Nagios 2.x to Nagios 4. The upgrade is essentially the same as what is described above for upgrading to newer 3 or 4 releases. You will, however, have to change your configuration files a bit so they work with Nagios 4: The old service_reaper_frequency variable in the main config file has been renamed to check_result_reaper_frequency. The old $NOTIFICATIONNUMBER$ macro has been deprecated in favor of new $HOSTNOTIFICATIONNUMBER$ and $SERVICENOTIFICATIONNUMBER$ macros. The old parallelize directive in service definitions is now deprecated and no longer used, as all service checks are run in parallel. The old aggregate_status_updates option has been removed. All status file updates are now aggregated at a minimum interval of 1 second. Extended host and extended service definitions have been deprecated. They are still read and processed by Nagios, but it is recommended that you move the directives found in these definitions to your host and service definitions, respectively. The old downtime_file file variable in the main config file is no longer supported, as scheduled downtime entries are now saved in the retention file. To preserve existing downtime entries, stop Nagios 2.x and append the contents of your old downtime file to the retention file. The old comment_file file variable in the main config file is no longer supported, as comments are now saved in the retention file. To preserve existing comments, stop Nagios 2.x and append the contents of your old comment file to the retention file. Also make sure to read the "What's New" section of the documentation. It describes all the changes that were made to the Nagios 3 code since the latest stable release of Nagios 2.x. Quite a bit has changed, so make sure you read it over. Upgrading From Packages to a Source Code Installation If you currently have an RPM- or Debian/Ubuntu APT package-based installation of Nagios and you would like to transition to installing Nagios from the official source code distribution, here's the basic process you should follow: 1.Stop Nagios 2.Backup your existing Nagios installation oConfiguration files Main config file (usually nagios.cfg) Resource config file (usually resource.cfg) CGI config file (usually cgi.cfg) All your object definition files oRetention file (usually retention.dat) oCurrent Nagios log file (usually nagios.log) oArchived Nagios log files 3.Uninstall the original RPM or APT package 4.Install Nagios from source by following the quickstart guide 5.Restore your original Nagios configuration files, retention file, and log files 6.Verify your configuration and start Nagios Note that different RPMs or APT packages may install Nagios in different ways and in different locations. Make sure you've backed up all your critical Nagios files before removing the original RPM or APT package, so you can revert back if you encounter problems. Upgrading a Packaged Installation Package-based installations of Nagios can be upgraded using the normal package management tools for your system. Note that the latest version available from repositories for a system may be considerably older than the latest Nagios source release. Most packages will keep existing configuration files, but a back up of your critical Nagios files will allow you to revert back if you encounter problems.