Remote Database Installation

Overview

To install the GroundWork databases on a separate machine, you will run the same installer package as is used for the main body of the GroundWork Monitor software. In general, the procedure to install GroundWork Monitor 7.2.1 with a separated database is the following:

  1. Decide where you want the /usr/local/groundwork/ directory to reside. See the Disk Layout instructions for your options and how to exercise them.
  2. Download the installation package to the database server which matches the requirements and specifications described in the System Requirements document.
  3. Make sure you know the fully-qualified hostname and IP address of the GroundWork Monitor server which will access this database, see note below.
  4. Run the installer on the database server and select the database installation only, detailed steps are provided in the steps below. Don't install the GroundWork Monitor component. Make sure the database is installed and running, and that you know the database password.
  5. Install GroundWork Monitor on the server where the non-database components will run, see the Installing or Upgrading GroundWork Monitor document.

CONTENTS

RELATED RESOURCES

WAS THIS PAGE HELPFUL?

Remote Database Install Considerations

Having a separate database instance on a different machine than the GroundWork Monitor installation is supported in GWMEE 7.2.1. There are a few considerations you should be aware of if you choose this option.

Controlling GroundWork Monitor Components
In a remote-database configuration, probing for current status of the GroundWork Monitor system only reflects the components which are operating on the system where the probe is run. Thus, on the remote database server, you will see:
# service groundwork status
postgresql already running

while on the GroundWork Monitor server, you will see the rest of the monitoring components:

# service groundwork status
noma is already running
Checking for GroundWork Services:
GroundWork Services:                                        [ running ]
syslog-ng already running
ntop is already running
snmptrapd already running
snmptt already running
nagios is already running
apache already running

In the current release, stopping and starting these components can only be carried out directly on their respective machines. The GroundWork Monitor server does not remotely control starting and stopping of the PostgreSQL database in this type of installation.

With Rights Come Responsibilities
In an all-in-one GroundWork Monitor server, where the database runs locally, the component control scripting logic ensures that when you stop and start the whole system, the database is always started first and stopped last. That way, it should always be up when other components reach out to read or store information in it.

In a remote-database setup, the two sides are independently managed; there is no logic that will automatically start the database simply because you wanted all the other components to be running. So if you choose to install a remote database, you will also be assuming the responsibility for always starting it up before all other components, and shutting it down only after all other components are down. Any violation of this practice will risk damaging the database content. If you do sometimes get things out of order, it may be necessary to shut down all the components on the GroundWork Monitor server, ensure that the database is up, and bring the GroundWork Monitor components back up again. That might be the only way to get them once again properly initialized in synchrony with the database content.

Setting the GroundWork server hostname
While installing the database, if you wish to specify the GroundWork Monitor server as a hostname instead of an IP address (recommended), you will need to know how the database server resolves the IP address of the GroundWork Monitor server into a hostname. You will need to specify that form of the hostname (fully qualified, or unqualified) in response to a question the installer will ask, if you don't specify the IP address. An easy way to find the proper form is to run a ping command on the database server, trying to sense the GroundWork Monitor server:
# ping mygwservername | head -1
PING mygwservername.localdomain.mycompany.com (192.168.115.52) 56(84) bytes of data.
# ping anotherserver | head -1
PING anotherserver (192.168.115.60) 56(84) bytes of data.

The form of the hostname that shows up in the PING line (fully qualified, or unqualified, as shown in these examples) is what you will need to use.

Step-by-step Instructions for Installing the Database

  1. On your database machine, look at the /etc/hosts file. Make sure that the database-machine name(s), qualified and/or unqualified as will be known by the GroundWork Monitor server, are defined using an IP address accessible from the GroundWork Monitor server, and not something like 127.0.1.1 instead. If it is not there, you must add it, or the database may not be accessible on the external interface.
  2. Decide where you want the /usr/local/groundwork/ directory to reside. See the Disk Layout instructions for your options and how to exercise them.
  3. Download the installer (e.g., groundworkenterprise-7.2.1-br494-gw3901-linux-64-installer.run) to the database machine.
  4. Make the installer executable:
    chmod +x groundworkenterprise-7.2.1-br494-gw3901-linux-64-installer.run
    
  5. Run the installer on the database machine in either text or GUI mode. An unattended-mode install won't work, because you need to answer certain questions to get the remote database configured properly.
    # ./groundworkenterprise-7.2.1-br494-gw3901-linux-64-installer.run
    
  6. After some preliminaries, the installer will ask what parts of the GroundWork Monitor product should be installed. For a remote database server, you want only the PostgreSQL database component. Do not select the GroundWork Monitoring server.
    ----------------------------------------------------------------------------
    Welcome to the GroundWork Monitor Enterprise Setup Wizard.
    
    ----------------------------------------------------------------------------
    Select the components you want to install; clear the components you do not want
    to install. Click Next when you are ready to continue.
    
    PostgreSQL Database [Y/n] :y
    
    GroundWork Monitoring Server [Y/n] :n
    
    Is the selection above correct? [Y/n]: y
    
  7. The installer will ask a couple of questions so it can set up remote access by the GroundWork Monitor server to the PostgreSQL database. Read the questions carefully before answering. For the second question, if you want to specify a hostname, use the unqualified or fully qualified form determined above.
    ----------------------------------------------------------------------------
    Database Server Parameters
    
    Please enter the IP address or hostname of the database server as visible by the
    GroundWork Monitor server.
    
    Note:
    For remote database installs, the IP/Hostname must be a name or an address other
    than localhost.
    
    IP / Hostname []: mydbservername.localdomain.mycompany.com
    
    ----------------------------------------------------------------------------
    Database Server External connection permissions
    
    Please enter the IP address or hostname of the GroundWork Monitor server
    
    IP / Hostname []: mygwservername.localdomain.mycompany.com
    
  8. Specify the power-user password for the PostgreSQL database. Remember what you type here, as this password will be needed for future database maintenance.
    ----------------------------------------------------------------------------
    Please enter your database 'postgres' user password.
    
    PostgreSQL postgres user password :
    Re-enter password :
    
  9. Answer the remaining questions, and allow the installation of the database components to complete.
  10. You may have a firewall surrounding your database server. This might be either iptables(8) running on the database server itself, or some external network equipment that serves the same purpose. If such a firewall is in play, you must configure it to allow access to port 5432 on the database server from the GroundWork Monitor server.
    Setup for an iptables Firewall
    See How to determine ports used by GroundWork in the GroundWork Knowledge Base for some clues as to how to configure an iptables firewall with regard to a remote PostgreSQL server.
  11. Check to make sure that the database is accessible on port 5432 on the external interface with a netstat or similar command:
    netstat -plnt
    

    This should show output like:

    tcp        0      0 192.169.43.23:5432          0.0.0.0:*               LISTEN      -
    

    indicating that the databases is listening (the IP address will be that of the external interface). It should not show only:

    tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      -
    

    that is, a local IP only. In this case, the other server will fail to connect.

After these configuration steps are completed, the database component will be installed and started. You can now continue and install or upgrade GroundWork Monitor Enterprise on a different server pointing to the database server.