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.1.4. 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 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 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 [ CentOS | RHEL | Oracle Linux | Debian | Ubuntu ]

    • 64-bit
    • The server will require access to offline 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

 

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.

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

NOTE: If the last command doesn't produce any output, try this one:

grep '\$pipbin install' fullinstall | sed 's/\$pipbin 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/
rm -rf /tmp/nagioslogserver
tar zxf nagioslogserver-latest.tar.gz
grep 'pip install' nagioslogserver/fullinstall | sed 's/pip install/& --no-index --find-links \/tmp\/pipfiles\//' | source /dev/stdin

NOTE: If the last command doesn't produce any output, try this one:

grep '\$pipbin install' nagioslogserver/fullinstall | sed 's/\$pipbin install/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
mv ../ncpa-* subcomponents/ncpa/
mv ../wkhtmltox-* subcomponents/wkhtmltox/
sed -i '/add_yum_repo*/s/^/#/' fullinstall
sed -i '/ntpq -p/s/^/echo Skipping NTP step #/' fullinstall
sed -i '/ntpdate -u \$NTP_SERVER/s/^/echo Skipping NTP step #/' fullinstall
sed -i '/pip install*/s/^/#/' fullinstall
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 fullinstall
sed -i '/logstash-plugin update/s/^/#/' subcomponents/logstash/post-install
./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/



Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.

Get 60% Off Nagios Log Server!

Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!

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
Installation errors on customized corporate builds of CentOS or RHEL
Viewed 11923 times since Tue, Jan 26, 2016
Nagios Log Server - License Entitlements
Viewed 5173 times since Tue, Aug 13, 2019
Nagios Log Server - How To Create A Nagios Log Server Instance In The Amazon EC2 Cloud Environment
Viewed 3809 times since Thu, Jan 28, 2016
Nagios Log Server - How To Select A Download
Viewed 3644 times since Wed, Jul 19, 2017
Nagios Log Server - Conversion for VirtualBox
Viewed 3393 times since Thu, Mar 16, 2017
Nagios Log Server - Logging In
Viewed 4429 times since Wed, Jul 19, 2017
Nagios Log Server - Manual Installation Instructions
Viewed 5721 times since Tue, Jul 7, 2015
Nagios Log Server - How To Install Using VMware
Viewed 4434 times since Wed, Jul 19, 2017