Installing Zenoss

Exclusive offer: get 50% off this eBook here
Zenoss Core Network and System Monitoring

Zenoss Core Network and System Monitoring — Save 50%

A step-by-step guide to configuring, using, and adapting this free Open Source network monitoring system - with a Foreword by Mark R. Hinkle, VP of Community Zenoss Inc.

$23.99    $12.00
by | April 2009 | Networking & Telephony Open Source

In this tutorial by Michael Badger, we fill in the step-by-step details required to get a functioning Zenoss system. We identify dependencies, review installation options, and take a look at server setup.

Installing Zenoss

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.

Server Specifications

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:

  1. Network with up to 250 devices:
    • 4 GB RAM
    • Core 2 Duo E6300 1.86/1066 RTL
    • 75 GB disk storage
  2. 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.

Installation Type

 

Platform

 

Virtual Appliance

 

Windows

Linux

 

Binary Installer

Red Hat Enterprise Linux 5

Fedora Core 6

SUSE

 

Source

Ubuntu

FreeBSD

Solaris 10

Mac 0S X

Other Linux environments

 

As more binary installers become available, Zenoss posts them to http://www.zenoss.com/download

Zenoss Dependencies

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:

  • SWIG
  • Autoconf
  • 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:

  1. Download the VMware Player from http://www.vmware.com/player/.Registration is required to complete the download.
  2. Install VMware Player according to VMware's installation instructions for your operating system.
  3. Download the Zenoss virtual appliance from http://www.zenoss.com/download/
  4. Unzip the Zenoss virtual appliance download file to a working directory in your system.
  5. Open VMware Player:
    • On Windows, select Start > Programs > VMware Player.
    • On Linux, select VMplayer from the application menu, or type the command: vmware
  6. VMwarePlayer prompts us to load the virtual machine configuration file we previously unzipped, as shown in the following screenshot:
  7. Zenoss Core Network and System Monitoring

  8. Open the Zenoss virtual appliance we unzipped in step 4.
  9.  

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:

 

    

 

Zenoss Core Network and System Monitoring

 

    

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:

root

 

To set a password for the root user, enter the command:     

passwd

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:

ifconfig

 

Zenoss Core Network and System Monitoring

 

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.

Binary Installation

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:

  1. Download the latest RPM for Red Hat Enterprise Linux from http://www.zenoss.com/download/
  2. Open a terminal window and become the root user: su -
  3. If you have not yet installed the Zenoss dependencies, run:
  4. yum -y install mysql mysql-server net-snmp net-snmp-utils / 
    python python-dev
  5. 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
  6. Start SNMP:
    service snmp start
  7. Start MySQL:
    service mysqld start
  8. Start Zenoss:
    /etc/init.d/zenoss start

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.

 

Zenoss Core Network and System Monitoring

Zenoss Core Network and System Monitoring A step-by-step guide to configuring, using, and adapting this free Open Source network monitoring system - with a Foreword by Mark R. Hinkle, VP of Community Zenoss Inc.
Published: June 2008
eBook Price: $23.99
Book Price: $39.99
See more
Select your format and quantity:

Source Installation

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.

Ubuntu Notes

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:

unlink /usr/bin/python
ln -s /usr/bin/python2.4 /usr/bin/python

After the installation, you can change the /usr/bin/python symlink back as follows:

unlink /usr/bin/python
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:

  1. Install the dependencies listed earlier in this tutorial.
  2. Create the Zenoss user: useradd zenoss
  3. 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
    •  

      Zenoss Core Network and System Monitoring

       

  4. Create the installation directory: mkdir /usr/local/zenoss
  5. 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:

  1. Log in as the user zenoss: su - zenoss
  2. From the Zenoss source directory, run the install script: ./install.sh
  3. 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
    •  

      Zenoss Core Network and System Monitoring

       

  4. 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:

make clean
./install.sh

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/).

Server Setup

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:

zenoss start

Red Hat users can enable Zenoss at boot time by running the following commands as root:

/sbin/chkconfig zenoss
/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:

zenoss status

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 start

Firewall Policies

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.

Zenoss Core Network and System Monitoring

Zenoss Core Network and System Monitoring

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:

trapcommunity public
trapsink default

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):

  1. Open the Windows Control Panel.
  2. Select Add/Remove Windows Components.
  3. Click on Management and Monitoring Tools and select Details.
  4. Select Simple Network Management Protocol and WMI.
  5. Save the changes to install the Windows Components.

Zenoss Core Network and System Monitoring

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:

  1. Run the command wbemtest from Start < Run.
  2. Select the Connect. button.
  3. Change the Namespace field to HOSTrootcimv2.
  4. Enter user name and password.
  5. Click the Query button.
  6. In the search box, type select * from win32_service to see a list of services as shown in the next screen capture.

Zenoss Core Network and System Monitoring

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.

Zenoss Core Network and System Monitoring A step-by-step guide to configuring, using, and adapting this free Open Source network monitoring system - with a Foreword by Mark R. Hinkle, VP of Community Zenoss Inc.
Published: June 2008
eBook Price: $23.99
Book Price: $39.99
See more
Select your format and quantity:

About the Author :


Books From Packt

 

trixbox CE 2.6
trixbox CE 2.6

Asterisk Gateway Interface 1.4 and 1.6 Programming
Asterisk Gateway Interface 1.4 and 1.6 Programming

TrixBox: La telefonia VoIP resa semplice [Italian]
TrixBox: La telefonia VoIP resa semplice [Italian]

Learning FreeNAS
Learning FreeNAS

MODx Web Development
MODx Web Development

JBoss Drools Business Rules
JBoss Drools Business Rules

Magento: Beginner's Guide
Magento: Beginner's Guide

Django 1.0 Website Development
Django 1.0 Website Development

 

No votes yet

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
p
G
R
E
p
3
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software