Installing GroundWork Monitor This document lists software prerequisites and hardware recommendations, and provides you with installation and configuration instructions of the GroundWork Monitor system. Instructions for migrating from previous version of GroundWork Monitor are also covered here. Once installation has been completed you can verify the operation of GroundWork Monitor using the guidelines provided. * Chapter 1 Prerequisites o Supported Operating Systems o Software Prerequisites o Browser Recommendations o Hardware Recommendations * Chapter 2 Prerequisite Installation and Configuration o SE Linux Configuration o MySQL Configuration o Network Configuration * Chapter 3 New Installation * Chapter 4 Migrating from Previous Versions o Migrating from Nagios to GroundWork Monitor 4.5 * Chapter 5 Verifying the Operation of GroundWork Monitor Prerequisites Supported Operating Systems GroundWork Monitor 4.5 RPM-based installer enables all GroundWork components to be installed together on standard versions of commercial Linux. These supported operating systems are recommended for stability and performance reasons. SuSE Linux Enterprise Server 9.x Red Hat Linux Enterprise WS 4 * Default install but you might want to remove Office and Graphics tools. * Red Hat 4 comes with MySQL 4.1.10a but it does not install MySQL Client. If you decide to use the default MySQL that comes with the distribution make sure that the MySQL client gets installed. Software Prerequisites * MySQL version 5.0.16 or higher * Linux Kernel version 2.6 * C lib version 2.3 Browser Recommendations GroundWork recommends the following web browsers when using GroundWork Monitor: * Firefox 1.x * Internet Explorer 6.x Hardware Recommendations The minimum hardware configuration for a single GroundWork Monitor server is currently as listed below. Assuming that the system is configured to monitor 100 hosts that are polled at default intervals, and that standard service profiles are used, the minimum configuration will suffice. In extreme cases, more powerful hardware (increased CPU speed and quantity, and RAM) can be used to extend the system. At this time there is no support for 64-bit Linux kernels. Minimum Hardware Configuration * Intel Pentium 4 CPU 1 GHz * 1 GB RAM * 40 GB hard disk * CD ROM drive Recommended Hardware Configuration * Intel Pentium 4 CPU 2 GHz or above * 2 GB RAM * 80 GB hard disk * CD ROM drive Chapter 2 Prerequisite Installation and Configuration SE Linux Configuration The selinux package interferes with MySQL installation and must be disabled. It can be re-enabled after installing MySQL. Edit the /etc/selinux/config file so that it looks like: 1. # This file controls the state of SELinux on the system. 2. # SELINUX= can take one of these three values: * # enforcing - SELinux security policy is enforced. * # permissive - SELinux prints warnings instead of enforcing. * # disabled - SELinux is fully disabled. 3. SELINUX=disabled 4. # SELINUXTYPE= type of policy in use. Possible values are: * # targeted - Only targeted network daemons are protected. * # strict - Full SELinux protection. 5. #SELINUXTYPE=targeted MySQL Configuration Package Install GroundWork Monitor requires the following packages (version 5.0.16 or higher) to be installed on the system. If you are not sure if the correct version of the packages are installed, query the RPM database for each package using rpm -qa |grep MySQL-server. * MySQL-server * MySQL-client * MySQL-devel * MySQL-shared-compat You can install these packages by copying the appropriate MySQL rpm files for your operating system and issuing the command: rpm -Uvh MySQL* This will install the MySQL packages in the correct order. Database Access The installer needs root access for creating new databases and setting the permissions. If your root password for MySQL is empty (not recommended but the default after installing MySQL) no further MySQL configuration is needed and you can proceed with the installation step. If a root password had been specified you can pass it to the installer by setting an environment variable. IMPORTANT NOTE: The root password is only needed for installation. None of the GroundWork Monitor applications require root access to MySQL. The database credentials are stored in /usr/local/groundwork/config/db.properties. 1. Create an environment variable MYSQL_ROOT (all uppercase) with the password value (i.e. export MYSQL_ROOT=password). 2. Perform the installation as described below. 3. Exit the shell so that the variable is no longer visible. Profile Update Add the GroundWork installation path to the PATH variable in /etc/profile. export GW_HOME=/usr/local/groundwork export PATH=$GW_HOME/bin:$PATH Network Configuration MySQL uses the local hosts file on /etc/hosts. Make sure that the localhost entry looks like the example below. Also, make sure that localhost is first after the IP address. Replace 192.168.2.100 with the IP address of the system, and groundworkserver with the real Host name. 127.0.0.1 localhost localhost.localdomain 192.168.2.100 groundworkserver Chapter 3 New Installation The following installation instructions are updated for the current release of GroundWork Monitor 4.5. This install package implements all GroundWork components in a single RPM. Installation For performing the installation you have to be root on the system. This installation places all files in the directory /usr/local/groundwork. GroundWork's version of Apache is installed with this package. If you are running Apache on your system, it will be stopped during the installation process, but not removed. Any content served will be served by the GroundWork version of Apache, but you should be aware that patches applied using the usual patch distribution systems will not be applied to the running version of Apache. Ideally, the GroundWork Monitor package should be installed on a standalone system to avoid this scenario. 1. To install the package, copy the file groundwork-monitor-osv-4.5-M1.xx.i586.rpm to your system by entering the command: rpm -Uvh groundwork-monitor-osv-4.5-M1.xx.i586.rpm. * IMPORTANT NOTE: The install from rpm -Uvh automatically places a default nagios.cfg in the config directory (overwriting whatever was there) and starts it. This means you lose several files, namely status.log and status.sav, RRD's, nagios.log, and apache error and access logs. You should perform a backup. It is good practice to do this whenever performing an upgrade. The minimum you want to keep in this case includes: /usr/local/groundwork/nagios/etc /usr/local/groundwork/nagios/var /usr/local/groundwork/nagios/eventhandlers /usr/local/groundwork/nagios/libexec /usr/local/groundwork/apache2/log /usr/local/groundwork/apache2/cgi-bin /usr/local/groundwork/rrd * After removing groundwork-monitor, a directory has been created called /usr/local/groundwork/backup that creates backup tar-gzip files: apache2-cgi.bin-backup.tar.gz apache2-log-backup.tar.gz etc-backup.tar.gz monarch-backup.tar.gz nagios-etc-backup.tar.gz nagios-eventhandlers-backup.tar.gz nagios-libexec-backup.tar.gz rrd-backup.tar.gz 2. If you need to uninstall the package, enter the command rpm -e groundwork-monitor-osv-4.5-M1-XX.i586. To check which version you have installed, enter the command rpm -qa | grep groundwork-monitor * IMPORTANT NOTE: rpm -e removes all traces of GroundWork Monitor, including any config files. You should back up all the RRDs, config files, and log files at a minimum if you want to keep these around. It is good practice to do this whenever performing a software install. 3. Check the output for error messages. 4. To access Nagios directly, go to URL http:///nagios/. Nagios files are installed in the following directories: * Binaries: /usr/local/groundwork/nagios/bin * Configuration: /usr/local/groundwork/nagios/etc * Eventhandlers: /usr/local/groundwork/nagios/eventhandlers * Plugins: /usr/local/groundwork/nagios/libexec * Share: /usr/local/groundwork/nagios/share * Logs: /usr/local/groundwork/nagios/var * Command: /usr/local/groundwork/nagios/var/spool * CGIs: /usr/local/groundwork/apache2/cgi-bin Chapter 4 Migrating from Previous Versions This chapter will cover the various migration options for the GroundWork Monitor system. Migrating from Nagios 1.2 or 2.0 to GroundWork Monitor 4.5 1. Install GroundWork Monitor on a new server. 2. Copy the plugins from the old Nagios directory: 1. For example; from /usr/lib/nagios/plugins or /usr/local/nagios/libexec to the new Nagios plugin directory: /usr/local/groundwork/nagios/libexec. 2. The plugins should be referencing the resource file resource.cfg for the plugin directory. On the new system, check the reference in Monarch or in the file to make sure this is set to the new directory. The variable $USER1$ should be set to /usr/local/groundwork/nagios/libexec. 3. If any plugin script includes any references to the old Nagios directory structure, it needs to be updated to reflect the new directory structure. 3. Copy any custom CGI programs used for extended service info from the old Nagios directory: 1. For example; /usr/lib/nagios/cgi or /usr/local/nagios/sbin to the new CGI directory /usr/local/groundwork/apache2/cgi-bin/. 2. If any CGI programs have references to the old Apache directory structure, they need to be updated to the new structure. For example, references to style sheets or image directories should be updated. 4. Copy any event handler programs to the new server: 1. Check the performance handler program. 2. If this program was customized, check to make sure the performance handler on the new system has these changes. 3. The new performance handler is /usr/local/groundwork/nagios/eventhandlers/process_service_perf.pl 5. Copy the current Nagios configuration files in /etc/nagios or /usr/local/nagios/etc to the new system directory /usr/local/groundwork/nagios/etc. 1. In Monarch, execute a Load to import the configuration data from the /usr/local/groundwork/nagios/etc directory into Monarch. 2. Check the nagios.cfg configuration to make sure the values and directory references are correct. 3. Check the cgi.cfg configuration to make sure the values and directory references are correct. 4. Execute a Preflight Check to ensure the configuration is valid. 5. Execute a Commit to implement the configuration in the new Nagios system. Chapter 5 Verifying the Operation of GroundWork Monitor Checking Nagios Operation 1. Open a browser to the Nagios URL http:///nagios/. 2. Check to see that the Nagios page appears. 3. Select Service Detail. You should see the local host monitoring services. Checking Guava Framework 1. Open a browser to the GroundWork server URL http:// 2. You should see the login page for GroundWork Monitor 3. Log in with the default operator ID admin/admin 4. Select the Status Tab 5. Review the Overview Status page. 6. Select the NetView menu option 7. Open the host and service information. Check that the status information matches the Nagios status detail page. If the status detail does not match, go to the next step. 8. Open the Console tab. Check to see if Nagios console messages are appearing. Checking connection between Nagios and GroundWork If the Status Viewer status on Nagios detail does not match, check the following. 1. Check to see if the nagios2db_status.pl is executing with the following command: ps -ef | grep nagios2db 2. If this process is not running, restart gwservices with the following command: /etc/init.d/gwservices restart