Home » Categories » Products » Nagios Log Server » Installation

Nagios Log Server - Offline Installation

Overview

This KB article will show you how to install 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 installing Nagios Log Server onto requires internet access to install packages from repositories.

This KB article shows you how to modify the installation 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.0. Future versions may have additional components that are not addressed in this KB article and will need to be taken into 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 CentOS / RHEL 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 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 installed, this server is no longer required

 

  • Offline Server

    • This is the server that you want to perform the offline install on

    • It must be a clean minimal build of RHEL/CentOS 6/7

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

      • Operating System Repositories

      • EPEL Repository

    • This guide will refer to this server as Offline Server

 

 

Download Server

Establish a terminal session to the download server.

Execute the following commands:

cd /tmp
yum install -y epel-release
yum install -y python-pip openssh-clients wget
mkdir /tmp/pipfiles
wget https://assets.nagios.com/downloads/nagios-log-server/nagioslogserver-latest.tar.gz
tar xzf nagioslogserver-latest.tar.gz nagioslogserver/fullinstall --strip-components 1

 

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' fullinstall | sed 's/pip install/& --download \/tmp\/pipfiles\//' | source /dev/stdin

 

That completes the steps required on the download server. The next steps will copy these downloaded files across to the offline server.

 

Offline Server

Establish a terminal session to the offline server.

Execute the following commands:

cd /tmp
yum install -y python-pip openssh-clients
mkdir /tmp/pipfiles

 

The next two commands require you to change download_server to the name / address of the download server. You will also be prompted for the root password of the download server for these commands.

scp root@download_server:/tmp/nagioslogserver-latest.tar.gz /tmp/
scp root@download_server:/tmp/pipfiles/* /tmp/pipfiles/

 

Then:

tar xzf nagioslogserver-latest.tar.gz

 

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 install the required Python modules:

grep 'pip install' nagioslogserver/fullinstall | 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 argparse
Collecting jsonselect
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)
Collecting urllib3<2.0,>=1.8 (from elasticsearch<2.1.0,>=1.8.0->elasticsearch-curator==3.4.0)
Installing collected packages: argparse, jsonselect, click, urllib3, elasticsearch, elasticsearch-curator
  Running setup.py install for jsonselect
  Running setup.py install for click
Successfully installed argparse-1.4.0 click-6.6 elasticsearch-2.0.0 elasticsearch-curator-3.4.0 jsonselect-0.2.3 urllib3-1.15.1

 

Now run these commands to install Nagios Log Server:

cd /tmp/nagioslogserver
awk '/ntpdate -u pool.ntp.org/{sub(/else/, "#    else", last)} NR>1{print last} {last=$0} END {print last}' fullinstall > fullinstall_tmp && mv -f fullinstall_tmp fullinstall
sed -i '/ntpdate -u pool.ntp.org/s/^/#/' fullinstall
sed -i '/python get-pip.py/s/^/#/' fullinstall
sed -i '/pip install*/s/^/#/' fullinstall
chmod 755 fullinstall
./fullinstall

 

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

Nagios Log Server Installation Success!

You can finish the final setup steps for Nagios Log Server by visiting:
    http://xxx.xxx.xxx.xxx/nagioslogserver/

 

Proceed to the URL provided in the output above to complete the Nagios Log Server installation.

 

 

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/

0 (0)
Article Rating (No 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 - Manual Installation Instructions
Viewed 4327 times since Tue, Jul 7, 2015
Nagios Log Server - How To Create A Nagios Log Server Instance In The Amazon EC2 Cloud Environment
Viewed 1953 times since Thu, Jan 28, 2016
Nagios Log Server - Conversion for VirtualBox
Viewed 1318 times since Thu, Mar 16, 2017
Installation errors on customized corporate builds of CentOS or RHEL
Viewed 8285 times since Tue, Jan 26, 2016
Nagios Log Server - Logging In
Viewed 1097 times since Wed, Jul 19, 2017
Nagios Log Server - How To Select A Download
Viewed 1040 times since Wed, Jul 19, 2017
Nagios Log Server - How To Install Using VMware
Viewed 1313 times since Wed, Jul 19, 2017