Home » Categories » Products » Nagios Log Server » Documentation » Upgrade Instructions

Nagios Log Server - Offline Upgrade

Overview

This KB article will show you how to upgrade Nagios Log Server in an offline environment.

An offline environment is described as one that does not have direct internet access. Normally the server you are upgrading Nagios Log Server on requires internet access to install packages from repositories.

This KB article shows you how to modify the upgrade so it does not require internet access. However you will still need to download some packages on a computer that has internet access and then transfer those packages to your offline server.

This KB article was written using Nagios Log Server 2.0.8 and upgrading it to 2.1.4. Future versions may have additional components that are not addressed in this KB article and will need to be taken in to consideration if the process does not work as expected.

 
Warning

Nagios Enterprises provides this KB article to customers in good faith. However an installation of Nagios Log Server using this method is not officially supported by Nagios Enterprises, future problems caused by using this method is beyond our control. Support may be limited if problems cannot be reproduced on a normal installation of Nagios Log Server.

 

Requirements

This method requires two servers.

  • Internet facing server

    • This server is required for downloading specific files that are normally required by the installation package

    • This server should be the same [ CentOS | RHEL | Oracle Linux | Debian | Ubuntu ] version and architecture as your Nagios Log Server
    • Once these files have been downloaded, this server will need to be able to transfer them to the destination server

    • This guide will refer to this server as Download Server

    • Once Nagios Log Server has been upgrade, this server is no longer required

 

  • Offline Server

    • This is the server that you want to perform the offline upgrade on, it will already have Nagios Log Server installed on it

    • The server will require access to offline yum repositories of:

      • Operating System Repositories

      • EPEL Repository [ CentOS | RHEL | Oracle Linux ]

    • This guide will refer to this server as Offline Server

 

 

Download Server

Establish a terminal session to the download server.

Execute the following commands:

RHEL | CentOS | Oracle Linux

yum install -y epel-release
yum install -y python-pip openssh-clients wget

 

Debian | Ubuntu

apt-get install -y python-pip openssh-client wget

 

Now execute the following commands:

cd /tmp
mkdir /tmp/pipfiles
wget https://assets.nagios.com/downloads/nagios-log-server/nagioslogserver-latest.tar.gz
tar xzf nagioslogserver-latest.tar.gz nagioslogserver/upgrade nagioslogserver/libinstall.sh nagioslogserver/subcomponents/ncpa/install nagioslogserver/subcomponents/wkhtmltox/install --strip-components 1
sed -i 's/^std_checks$/#std_checks/' libinstall.sh
. libinstall.sh
sed -i 's/wget \(.*\)/wget \1; exit 0;/' subcomponents/ncpa/install
sed -i 's/wget \(.*\)/wget \1; exit 0;/' subcomponents/wkhtmltox/install
./subcomponents/ncpa/install "$distro" "$dist" "$ver"
./subcomponents/wkhtmltox/install "$distro" "$dist"

 

Check to make sure pip is installed by running this command:

which pip

 

If pip is installed, the output will be something like:

/usr/bin/pip

 

If pip is NOT installed, the output will be something like:

/usr/bin/which: no pip in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

 

You will not be able to proceed until pip has been installed.

Run this command to download the required Python modules:

grep 'pip install' upgrade | sed 's/pip install --upgrade/pip download -d \/tmp\/pipfiles\//' | source /dev/stdin

 

Now, copy the files to the offline machine, keeping the same directory structure. For these example commands, you would need to change offline_server to the name / address of the offline server. You will also be prompted for the root password of the download server for these commands:

scp -r /tmp/pipfiles root@offline_server:/tmp/pipfiles
scp /tmp/ncpa-* root@offline_server:/tmp/
s
cp /tmp/wkhtmltox-* root@offline_server:/tmp/
scp /tmp/nagioslogserver-latest.tar.gz root@offline_server:/tmp/

 

That completes the steps required on the download server.

  

Offline Server

Establish a terminal session to the offline server.

Execute the following commands:

RHEL | CentOS | Oracle Linux

yum install -y python-pip openssh-clients

 

Debian | Ubuntu

apt-get install -y python-pip openssh-client

 

Check to make sure pip is installed by running this command:

which pip

 

If pip is installed, the output will be something like:

/usr/bin/pip

 

If pip is NOT installed, the output will be something like:

/usr/bin/which: no pip in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

 

You will not be able to proceed until pip has been installed.

Run these commands to install the required Python modules:

cd /tmp
tar xzf nagioslogserver-latest.tar.gz
grep 'pip install' nagioslogserver/upgrade | sed 's/pip install/& --no-index --find-links \/tmp\/pipfiles\//' | source /dev/stdin

 

The output should be something like:

Ignoring indexes: https://pypi.python.org/simple
Collecting setuptools
Installing collected packages: setuptools
  Found existing installation: setuptools 0.6rc11
    DEPRECATION: Uninstalling a distutils installed project (setuptools) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling setuptools-0.6rc11:
      Successfully uninstalled setuptools-0.6rc11
Successfully installed setuptools-20.9.0
Ignoring indexes: https://pypi.python.org/simple
Collecting elasticsearch-curator==3.4.0
Collecting click>=3.3 (from elasticsearch-curator==3.4.0)
Collecting elasticsearch<2.1.0,>=1.8.0 (from elasticsearch-curator==3.4.0)
Requirement already up-to-date: urllib3<2.0,>=1.8 in /usr/lib/python2.6/site-packages (from elasticsearch<2.1.0,>=1.8.0->elasticsearch-curator==3.4.0)
Installing collected packages: click, elasticsearch, elasticsearch-curator
  Running setup.py install for click
  Found existing installation: elasticsearch 1.9.0
    Uninstalling elasticsearch-1.9.0:
      Successfully uninstalled elasticsearch-1.9.0
  Found existing installation: elasticsearch-curator 1.2.2
    Uninstalling elasticsearch-curator-1.2.2:
      Successfully uninstalled elasticsearch-curator-1.2.2
Successfully installed click-6.6 elasticsearch-2.0.0 elasticsearch-curator-3.4.0

 

Now run these commands to upgrade Nagios Log Server:

cd /tmp/nagioslogserver
mv ../ncpa-* subcomponents/ncpa/
mv ../wkhtmltox-* subcomponents/wkhtmltox/
sed -i '/pip install*/s/^/echo Skipping: /' upgrade
sed -i s/^....\$backenddir/#\$backenddir/g upgrade
sed -i '/wget*/s/^/#/' subcomponents/ncpa/install
sed -i '/wget*/s/^/#/' subcomponents/wkhtmltox/install
sed -i '/rm -rf wkhtm*/s/^/#/' subcomponents/wkhtmltox/install
sed -i 's/logstash-plugin install --version 4.2.4 logstash-input-tcp.4.2.4-java.gem/logstash-plugin install --local logstash-input-tcp-4.2.4-java.gem/' subcomponents/logstash/post-install
sed -i 's/logstash-plugin install --version 4.0.4 logstash-filter-geoip.4.0.4-java.gem/logstash-plugin install --local logstash-filter-geoip-4.0.4-java.gem/' subcomponents/logstash/post-install
chmod 755 upgrade
sed -i '/logstash-plugin update/s/^/#/' subcomponents/logstash/post-install
./upgrade

 

You will be prompted to confirm that you want to perform an upgrade.

 

Wait for the install to complete. If it is successful it should end with:

Nagios Log Server Upgrade Complete!

You can access the Nagios Log Server web interface by visiting:
    http://10.25.5.87/nagioslogserver/

 

 

Additional Notes

Certain components of Nagios Log Server require an internet connection. For example the Home page has News feeds, or the check for updates functionality. These will simply report errors like "An error occurred while trying to fetch the Nagios Core feed", which can be ignored.

The following documentation shows you how to configure Nagios Log Server to use a proxy server:

Documentation - Using A Proxy Server


 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

2 (2)
Article Rating (2 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios Log Server - Upgrade Instructions
Viewed 3261 times since Thu, Jan 28, 2016
Nagios Log Server - Updating Logstash Patterns
Viewed 3516 times since Wed, Mar 2, 2016