Our first step is to choose one of the three installation methods: virtual appliance, binary installer, or source. The virtual appliance makes a good choice, if we want to evaluate or demonstrate Zenoss. The virtual appliance runs a functional Zenoss system using VMware Player or VMware Server out-of-the-box and needs no Linux knowledge. When run from VMware, the Zenoss virtual appliance may be used to monitor networks with relatively few devices.
The binary installer makes a good choice if we want to avoid building Zenoss from source, and we run a supported distribution. The Supported Operating Systems section in this tutorial includes a list of distributions that have binary installation support.
We can build from source on a variety of Unix-based environments, like Ubuntu and Mac OS X. A source installation gives us the ability to install Zenoss in the environment of our choice but requires more work. Of the three installation methods, a source install requires the most familiarity with your operating system and presents more points of failure.
As we move beyond installing Zenoss to set up, we focus on firewall policies and Simple Network Management Protocol (SNMP) for Linux and Windows systems. Even though Zenoss can use other methods to monitor devices, SNMP is the default monitoring protocol. We are free to change how we monitor and collect information at any time.
During the installation and the set up, we work from the command line because it's fast and it's consistent from one distribution to the next. If an error does occur, we can see the error immediately printed to the terminal window.
When working from the command line, we assume knowledge of two basic tasks: opening the terminal window and navigating the file structure. For all other tasks, the book provides the exact command to type.
After installation and set up, we spend most of our time working with Zenoss through the web interface. Let's get this installation out of the way so we can discover Zenoss.
Actual server specifications may vary depending on the amount and frequency of the data you collect. Zenoss Inc. recommends the following hardware specifications as a starting point based on feedback from the community:
- Network with up to 250 devices:
- 4 GB RAM
- Core 2 Duo E6300 1.86/1066 RTL
- 75 GB disk storage
- Network with more than 250 devices :
- 8 GB RAM
- XEON 5120 DC 1.86/1066/4MB
- Four 75 GB drives in two RAID-1 pairs
Supported Operating Systems
Zenoss requires a Unix-based platform and installs on systems capable of running a GNU build environment. However, Zenoss supports only a few distributions with binary installers. The following table shows the available installation options.
Red Hat Enterprise Linux 5
Fedora Core 6
Mac 0S X
Other Linux environments
As more binary installers become available, Zenoss posts them to http://www.zenoss.com/download
Virtual appliance users do not need to install any dependencies because they are included in the image. For all other installations, you need to install the following software packages prior to installing Zenoss:
- MySQL 5.0.22 or higher
- MySQL development environment
- Python 2.3.5 or 2.4
- Python development environment
If you plan to build a Zenoss installation from source code, you need to install the following:
- GNU build environment
Dependent software packages are available via your distribution's normal software package manager. However, the package names and installation commands vary based on distribution. Consult your distribution's documentation for more information.
Quick Start with Virtual Appliance
If we know how to download and install software in our host environment, we can get a working Zenoss system with the virtual appliance. The Zenoss virtual appliance packages a working Zenoss Core installation inside a Linux guest that can be booted from a host system, including Windows, using VMware's Player, Server, or Workstation programs.
The virtual appliance is great for:
- Users with little or no Linux knowledge
- Demonstrations and Evaluations
- Monitoring small networks with a few devices
Install Virtual Appliance
We will finish the installation as fast as we can download files and install the VMware Player. Let's begin:
- Download the VMware Player from http://www.vmware.com/player/.Registration is required to complete the download.
- Install VMware Player according to VMware's installation instructions for your operating system.
- Download the Zenoss virtual appliance from http://www.zenoss.com/download/
- Unzip the Zenoss virtual appliance download file to a working directory in your system.
- Open VMware Player:
- On Windows, select Start > Programs > VMware Player.
- On Linux, select VMplayer from the application menu, or type the command: vmware
- VMwarePlayer prompts us to load the virtual machine configuration file we previously unzipped, as shown in the following screenshot:
- Open the Zenoss virtual appliance we unzipped in step 4.
The Zenoss virtual appliance takes a few minutes to load depending on the performance of your system. When the appliance boots, a welcome window opens and displays the IP address of the Zenoss management console and the standard Linux login prompt, as shown in the following screenshot:
When we connect to Zenoss through our web browser, we use the IP address of the Zenoss management console that displays on the welcome screen (e.g. http://192.168.1.125.8080/). We cannot access our virtualized Zenoss installation by navigating to localhost, which is the host name of the Zenoss virtual appliance. If the IP address of the Zenoss console does not display, we can obtain the IP address using the ifconfig command, as described in the next section: Working with The Virtual Appliance.
Zenoss is ready to monitor. Our next step is to set up the servers on our network to be monitored. If you can't wait to see Zenoss in action, feel free to skip the server setup section for now and check out Tutorial 4 for an introduction to web interface. You can come back and set up your servers later.
If this is the first time you are working with VMware or Linux, take a few minutes to get acquainted with the environment.
Working with The Virtual Appliance
The Zenoss virtual appliance is a streamlined but functional Linux system, which means we can log in and have access to the underlying Linux environment. Let's cover a few basic tasks.
In order to type inside the virtual appliance window, use the keyboard shortcut:
Ctrl + G
To return the cursor to the host desktop, use the keyboard shortcut:
Ctrl + Alt
By default, the root login does not have a password assigned. To log in to the virtual appliance, enter the following user name at the login prompt:
To set a password for the root user, enter the command:
The passwd command prompts us to enter a new password. Assigning a password to the root user makes the system more secure and allows us to connect to the virtual appliance as root via SSH.
The IP address of the Zenoss virtual appliance is displayed at the top of the terminal window when the appliance loads. The most confusing part about using the Zenoss virtual appliance may be picking the correct IP address and port number. We connect to Zenoss on port 8080. So if our virtual appliance has an IP address of 192.168.1.103, then we use http://192.168.1.103:8080/o open the Zenoss login screen. If we use port 8003, we access the rPath management console, which is the underlying system used to build the Zenoss virtual appliance.
After login, we can find additional IP configuration as shown in the following screenshot, with the command:
To shut down the virtual appliance, select Player > Exit from the VMware Player. We may also use the the command:
shutdown -h now
If we shut down the virtual appliance, Zenoss no longer monitors the network and the web interface is not accessible.We may now jump ahead to the Server Setup section of this tutorial for help in configuring the servers we wish to monitor.
Zenoss provides a binary installer in RPM format for Red Hat Enterprise Linux, which covers CentOS and Fedora Core. Binaries for additional distributions are added by Zenoss as the market demands and as time allows.
To install Zenoss and its dependencies on Red Hat:
- Download the latest RPM for Red Hat Enterprise Linux from http://www.zenoss.com/download/
- Open a terminal window and become the root user: su -
- If you have not yet installed the Zenoss dependencies, run:
- Install the Zenoss RPM by running the following command from the download directory where x.x-x equals the latest version number:
rpm -ivh zenoss-2.x.x-x.el5.i386.rpm
- Start SNMP:
service snmp start
- Start MySQL:
service mysqld start
- Start Zenoss:
yum -y install mysql mysql-server net-snmp net-snmp-utils /
Let's test our installation. Open a browser and enter the URL of the Zenoss server, which listens on port 8080 (for example http://192.168.115:8080/ ). A screen appears as shown in the following screenshot.
Like any open-source project, we can install Zenoss using the source code on any Linux- or Unix-based system including FreeBSD, Mac OS X, and Ubuntu. The installation requires more setup, but in return for the extra work, we are able to extend Zenoss to a variety of architectures.
Distribution-specific tips for Ubuntu users are included in the Ubuntu Notes section to help make the installation smoother. Additional distribution notes can be found in the INSTALL.TXT file located in the top level of the source code directory.
The Ubuntu installation generally follows the same installation steps as the source install, but the following information will help us get started.
Debian derivative distributions use APT to add, update, and remove software packages from the system. We can use APT from the command line or from the graphical interface Synaptic, available from the System > Administration menu in Ubuntu. Update the repositories with the following two commands:
sudo apt-get update
sudo apt-get upgrade
Now, install the Zenoss dependencies with apt-get. The example commands specify each package installation command on a separate line for clarity.
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient15-dev
sudo apt-get install python2.4
sudo apt-get install python2.4-dev
sudo apt-get install build-essential
sudo apt-get install snmp
sudo apt-get install snmpd
sudo apt-get install autoconf
sudo apt-get install swig
sudo apt-get install python-setuptools
To reduce the amount of typing, we may supply all the package names as arguments to the apt-get install command. For example:
sudo apt-get install mysql-server mysql-client ...
Ubuntu installs Python 2.5, but Zenoss requires we install Python 2.4 to properly build all of its dependencies. Prior to starting the Zenoss installation, update the /usr/bin/python symlink to point to the python2.4 file:
ln -s /usr/bin/python2.4 /usr/bin/python
After the installation, you can change the /usr/bin/python symlink back as follows:
ln -s /usr/bin/pythong2.5 /usr/bin/python
From this point, follow the source installation procedures to set up and install Zenoss.
System Setup for Source Install
Open a terminal window and become the root user:
- Install the dependencies listed earlier in this tutorial.
- Create the Zenoss user: useradd zenoss
- Add the ZENHOME and PYTHONPATH environment variables to the zenoss user's environment by adding the following lines to the zenoss user's .bashrc file (as shown in the following screenshot):
- export ZENHOME=/usr/local/zenoss
- export PYTHONPATH=$ZENHOME/lib/python
- export PATH=$ZENHOME/bin:$PATH
- Create the installation directory: mkdir /usr/local/zenoss
- Change the installation directory's ownership to the zenoss user: chown zenoss /usr/local/zenoss
We can install Zenoss to any directory, but we must set the ZENHOME environment variable in the .bashrc file to match the installation directory.
Download Zenoss Source
Next, we download the Zenoss source file from http://www.zenoss.com/download and unpack it to a working directory on the Zenoss server with the following command, where x.x-x equals the latest version:
tar xzvf zenoss-2.x.x-x.tar.gz
When we build and install Zenoss, we work as the user zenoss, which presents some permission problems during the build, if we download the files as a user other than zenoss. As root, use the following commands to move the source files to /home/zenoss and set ownership:
mv zenoss-2.x.x-x /home/zenoss
chown -R zenoss /home/zenoss/zenoss-2.x.x-x
We are ready to build the source code.
Build And Install Zenoss
To build and install Zenoss, we run the included install.sh script. The script collects configuration information for the web and database components of the Zenoss system, then builds the source files.
We continue our work from the command line:
- Log in as the user zenoss: su - zenoss
- From the Zenoss source directory, run the install script: ./install.sh
- The install script prompts for the following Zenoss database configurations (refer to the following screenshot):
- Admin password for the dashboard
- The host name of the MySQL server
- A root user for the MySQL server
- A password for the MySQL root user
- Name of the MySQL events database
- A user name for the events database
- Password for the events database user name
- After the install completes, set ownership and uid on zensocket. As root, enter the following commands: chown root:zenoss /usr/local/zenoss/bin/zensocket chmod 04750 /usr/local/zenoss/bin/zensocket
If the installation fails, the error message prints to the terminal window and to the zenbuild.log file in the installation source directory. Source installations most often fail because the dependencies are not properly installed.
To continue with a failed installation after we fix the problem, clean the installation source, and run the install script again with the commands:
The make clean command removes the build files and zenbuild.log file.
After a successful installation, we can log in to Zenoss by navigating to port 8080 of the Zenoss server (e.g.,http://192.168.1.115:8080/).
The second part of the installation equation is server setup. We'll examine the following configuration options:
- Start Zenoss at boot time
- Firewall policies
- SNMP on Linux and Windows
Start Zenoss at Boot Time
By default, Zenoss does not automatically start during the boot process and it is required to start the Zenoss daemons manually. As the zenoss user, run the command:
Red Hat users can enable Zenoss at boot time by running the following commands as root:
/sbin/chkconfig -level 345 zenoss on
If you use a Debian based distribution, such as Ubuntu, do the following as root:
cp /usr/local/zenoss/bin/zenoss /etc/init.d/
update-rc.d zenoss defaults 95
The next time the system reboots, use the following command as the zenoss user to verify whether Zenoss started:
If the Zenoss daemons are not running, consult your distribution's documentation for help in automatically starting programs at boot time. Remember, we can run the following command as the zenoss user to start Zenoss:
Zenoss requires access to a few ports on the network in order to communicate with the the systems we want to monitor. The Zenoss server needs to accept connections on the following ports:
- 8080 for HTTP access
- 514 for syslog access
- 22 for SSH access
To facilitate monitoring, the systems on the network need to allow access to the following ports:
- 161 for SNMP
- 22 for SSH
This is a common list of ports, but network and monitoring needs are unique from one site to the next. For example, if you do not plan to connect to your Zenoss server via SSH, then you do not need to open port 22.
Iptables is a popular tool for managing firewall access on Linux systems. Firestarter, a graphical front end to iptables is shown in the following screenshot. Windows has built-in firewall support via the Windows Firewall Control Panel (as shown in the screenshot following the next one). If you are unsure about how to configure port access, consult your firewall documentation or system administrator.
SNMP on Linux
Zenoss uses SNMP to collect information, such as file system statistics, memory usage, and interface status from the systems attached to the network. The network devices report data to Zenoss via an SNMP agent, which is installed on each device, but SNMP is only a collection protocol. The information SNMP collects about each device depends on the device's Management Information base (MIB). MIBs are management, that define the devices on the network and are part of the OSI network management model. MIBs further rely on object identifiers (OIDs) to tell SNMP which data values to return.
As we will see in later tutorials, Zenoss can discover and monitor our networks without using SNMP, but if we choose not to use SNMP, we sacrifice a detailed model of our networks.
Install SNMP on Linux
If we plan to collect device information from the network using SNMP, we need to install SNMP on the Zenoss server and the devices attached to the network. The package names vary from one distribution to the next, so be sure to check with your distribution, if you are unsure of which file you need.
Red Hat users can install SNMP with the command:
yum -y install net-snmp
Ubuntu users can install SNMP with the command:
apt-get install snmpd
Zenoss recommends we add several configuration changes to the snmpd.conf file. Before you make any changes, back up the snmpd.conf file. As root:
cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
In the section that begins First, map the community name into a security name, add:
com2sec notConfigUser default public
In the section that begins Second, map the security names into group names, add:
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
In the section that begins Third, create a view for us to let the groups have rights, add:
view systemview included .1
In the section that begins, Finally, grant the 2 groups access to the 1 view with different write permissions, add the following line:
access notConfigGroup "" any noauth exact systemview none none
Add the following lines to the System Contact Information section:
syslocation Unknown (edit /etc/snmp/snmpd.local.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
Add the following lines to the Further Information section to configure the default community string for sending traps:
WMI And SNMP on Windows
Often, we want to know more about our Windows servers than a simple up or down status. In order to view specific information about Windows services and events, we need to enable Windows Management Instrumentation (WMI) and SNMP.
WMI provides several management options for Windows 2000, Windows XP, and Windows Server 2003, including the ability to access Windows event logs.
WMI and SNMP are enabled from the Windows Management and Monitoring Tools packages. To install WMI and SNMP (refer to the following screenshot):
- Open the Windows Control Panel.
- Select Add/Remove Windows Components.
- Click on Management and Monitoring Tools and select Details.
- Select Simple Network Management Protocol and WMI.
- Save the changes to install the Windows Components.
After WMI installs, we can get detailed information about the services running on server and confirm WMI is properly configured. From the Windows Computer Management control panel:
- Run the command wbemtest from Start < Run.
- Select the Connect. button.
- Change the Namespace field to HOSTrootcimv2.
- Enter user name and password.
- Click the Query button.
- In the search box, type select * from win32_service to see a list of services as shown in the next screen capture.
The Windows SNMP agent does not return information about the server's CPU, memory, or file system. For these stats, Zenoss Inc. recommends we install the third-party SNMP Informant from http://www.snmp-informant.com/. No configuration is necessary for SNMP Informant.