Installing the Enterprise-Ready Network Monitor Zenoss

258

 

I recently wrote about Nagios, an enterprise-worthy network monitor. For many, Nagios is all they need: It’s powerful, flexible, and very reliable. However, for system administrators working with larger networks and who need auto-detection of devices, Zenoss shines as a serious enterprise-ready solution for any size network.

Of course this power comes at a cost. The cost? Complexity of installation. Whereas Nagios is incredibly simple to get up and running, Zenoss is not. In this article, I will show you how to install Zenoss so you can get it ready to be your one and only network monitoring tool. I will be demonstrating the installation on a Ubuntu 10.04 machine. You can easily modify the process to fit your distribution.

And with that said, on to the installation.

Installing Pre-Requisites

Before you install Zenoss you have to install numerous pre-requisites. To do this open up a terminal window and issue the following commands:

  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install mysql-server mysql-client libmysqlclient15-dev python2.4 python2.4-dev build-essential snmp snmpd autoconf swig svn-buildpackage

NOTE: If apt returns that it can’t find certain packages, you might have to add universe to your sources. If this is the case, open up /etc/apt/sources.list and add the following two lines to the bottom of the file:

  • deb http://ca.archive.ubuntu.com/ubuntu lucid universe
  • deb-src http://ca.archive.ubuntu.com/ubuntu lucid universe

Once you have added those lines, issue the command sudo apt-get update.

The first two commands (in the first command listing above) will make sure your distribution is up to date and the last command will install all of the Zenoss dependencies. You will notice the installation of Python 2.4. This is necessary because Zenoss requires 2.4 (to build all dependencies) and Ubuntu 10.04 will install with 2.5. This installation will not remove 2.5. What we will do is trick Zenoss into thinking 2.4 is the default Python installation and then, once installed, we will reset your system so that the default is 2.5.

To do this, issue the following commands:

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

After the installation is complete don’t forget to issue the following commands to relink python back to 2.4:

  • unlink /usr/bin/python
  • ln -s /usr/bin/python2.5 /usr/bin/python

It’s very important that you issue those last two commands, as without them many of your installed packages could be broken.

Now a new user, zenoss, must be created. This is done with the command:

sudo adduser zenoss

You will need to give the zenoss user a password. Do not leave this blank (for security reasons).

You are almost ready for the actual installation process. But there are a couple of steps left. First, create an installation directory with the commands:

  • sudo mkdir /usr/local/zenoss
  • sudo chown zenoss /usr/local/zenoss

Now log in as the user zenoss and set up the necessary variables in the user’ ~/.bashrc file. Follow these steps:

  1. Change to the zenoss user with the command su zenoss (you will have to enter the password you created).
  2. Change to the zenoss user home directory with the command cd
  3. Open up the .bashrc file for editing with your favorite text editor.
  4. Add the following lines:
  • export ZENHOME=/usr/local/zenoss
  • export PYTHONPATH=$ZENHOME/lib/python
  • export PATH=$ZENHOME/bin:$PATH

You now need to add the zenoss user to the /etc/sudoers file so all of the zenoss daemons can run (some of them require root access). Issue the command visudo and add the following to the end of that file:

zenoss monitor = NOPASSWD: /usr/local/zenoss/bin/*,/bin/kill
Defaults env_keep += “PYTHONPATH ZENHOME”

The last thing you need to do is make sure your mysql has a root password. Zenoss will NOT work if your MySQL root password is blank. I prefer to do this from within mysql like so:

mysql -u root

mysql> UPDATE user SET Password=PASSWORD(‘mynewpassword‘) -> WHERE User=’root’;

Where mynewpassword is the password you want to use for the root user.

Getting and Installing

I prefer to get the source using svn. Do this with the commands:

  • su zenoss
  • cd
  • svn co http://dev.zenoss.org/svn/trunk/inst zenossinst

Now it’s time to install. It’s very simple:

  • cd zenoss*
  • ./install.sh
  • zenoss restart

During the installation you will be asked for the mysql root password (which you created above). You will also be asked to create a password for zenoss. If this is successful, it’s time to browse to zenoss in your browser. The link you want is http://ADDRESS_OF_MACHINE/zport/dmd. The default login credentials are:

  • username: admin
  • password: the password you just created.

First step of the web installOnce you have successfully logged into Zenoss you will have to walk through a simple, two-step process of creating accounts and discovering devices. The first step (shown in Figure 1) requires you add a user account. This user account will be the account you will log in with and run most of the tasks. If you want to reset the admin password you can here.

The next step is where you will begin the process of detecting your network. There are two ways to do this:

  • Manually enter your devices.
  • Auto-detect your devices.

If you have a small network you might want to enter devices manually.If you have a larger network, you will most likely want to have your devices auto-detected. Select Autodiscover devices (see Figure 2) and then click the Submit button.

The auto-discover of your devices can take a while (especially if you have a large network). So don’t expect to see those devices listed, right away, in the dashboard (see Figure 3). But even though all of the devices have not been discovered as soon as you hit the dashboard, there are still plenty of administration tasks that can be taken care of.

The Zenoss dashboardFinal Thoughts

You have now begun your journey with Zenoss. Be prepared to spend plenty of time looking around on the dashboard getting to know the system. Zenoss is incredibly powerful so also take the time to read up on the user documentation (click the Getting Started Guide link on your dashboard main page for starters).

Hopefully you will find Zenoss as powerful and useful as I have. Once installed, this tool can easily become your single point of contact for all of your network monitoring needs.